2020-06-29 23:41:13 +08:00
|
|
|
name: Validate 'setup-go'
|
2022-12-15 23:12:57 +08:00
|
|
|
|
2020-02-09 13:21:39 +08:00
|
|
|
on:
|
2020-06-29 23:41:13 +08:00
|
|
|
push:
|
|
|
|
branches:
|
2020-07-22 20:04:56 +08:00
|
|
|
- main
|
2020-06-29 23:41:13 +08:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
schedule:
|
|
|
|
- cron: 0 0 * * *
|
|
|
|
|
2020-02-09 13:21:39 +08:00
|
|
|
jobs:
|
2022-12-12 17:58:49 +08:00
|
|
|
stable:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-12 17:58:49 +08:00
|
|
|
- name: Setup Go Stable
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: stable
|
|
|
|
- name: Verify Go
|
|
|
|
run: go version
|
|
|
|
|
|
|
|
oldstable:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-12 17:58:49 +08:00
|
|
|
- name: Setup Go oldStable
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: oldstable
|
|
|
|
- name: Verify Go
|
|
|
|
run: go version
|
2023-03-08 16:45:16 +08:00
|
|
|
|
2022-12-12 17:58:49 +08:00
|
|
|
aliases-arch:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
version: [stable, oldstable]
|
|
|
|
architecture: [x64, x32]
|
|
|
|
exclude:
|
2023-03-08 16:45:16 +08:00
|
|
|
- os: macos-latest
|
|
|
|
architecture: x32
|
2022-12-12 17:58:49 +08:00
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-12 17:58:49 +08:00
|
|
|
- name: Setup Go ${{ matrix.version }} ${{ matrix.architecture }}
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.version }}
|
|
|
|
architecture: ${{ matrix.architecture }}
|
|
|
|
- name: Verify Go
|
|
|
|
run: go version
|
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
local-cache:
|
|
|
|
name: Setup local-cache version
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-02-09 13:21:39 +08:00
|
|
|
strategy:
|
2020-06-29 23:41:13 +08:00
|
|
|
fail-fast: false
|
2020-02-09 13:21:39 +08:00
|
|
|
matrix:
|
2020-06-29 23:41:13 +08:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2022-08-12 18:29:48 +08:00
|
|
|
go: [1.17, 1.18, 1.19]
|
2020-02-09 13:21:39 +08:00
|
|
|
steps:
|
2020-06-29 23:41:13 +08:00
|
|
|
- name: Checkout
|
2023-09-05 23:42:39 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-02-09 13:21:39 +08:00
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
- name: setup-go ${{ matrix.go }}
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
2020-02-09 13:21:39 +08:00
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
- name: verify go
|
|
|
|
run: __tests__/verify-go.sh ${{ matrix.go }}
|
|
|
|
shell: bash
|
2020-02-10 08:25:28 +08:00
|
|
|
|
2022-02-09 19:59:04 +08:00
|
|
|
check-latest:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
go-version: [1.16, 1.17]
|
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-09 19:59:04 +08:00
|
|
|
- name: Setup Go and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
check-latest: true
|
|
|
|
- name: Verify Go
|
|
|
|
run: go version
|
|
|
|
|
2022-05-12 16:04:39 +08:00
|
|
|
go-version-file:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-05-12 16:04:39 +08:00
|
|
|
- name: Setup Go and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version-file: __tests__/data/go.mod
|
|
|
|
- name: verify go
|
|
|
|
run: __tests__/verify-go.sh 1.14
|
|
|
|
shell: bash
|
|
|
|
|
2022-11-01 18:13:57 +08:00
|
|
|
go-version-file-with-gowork:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-01 18:13:57 +08:00
|
|
|
- name: Setup Go and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version-file: __tests__/data/go.work
|
|
|
|
- name: verify go
|
|
|
|
run: __tests__/verify-go.sh 1.19
|
|
|
|
shell: bash
|
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
setup-versions-from-manifest:
|
|
|
|
name: Setup ${{ matrix.go }} ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
|
|
go: [1.12.16, 1.13.11, 1.14.3]
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-05 23:42:39 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-04-01 03:29:52 +08:00
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
- name: setup-go ${{ matrix.go }}
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
2022-04-01 03:29:52 +08:00
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
- name: verify go
|
|
|
|
run: __tests__/verify-go.sh ${{ matrix.go }}
|
|
|
|
shell: bash
|
2020-02-10 08:25:28 +08:00
|
|
|
|
2020-06-29 23:41:13 +08:00
|
|
|
setup-versions-from-dist:
|
|
|
|
name: Setup ${{ matrix.go }} ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2022-02-22 23:25:23 +08:00
|
|
|
go: [1.9, 1.8.6]
|
2020-06-29 23:41:13 +08:00
|
|
|
steps:
|
2021-11-08 18:28:08 +08:00
|
|
|
- name: Checkout
|
2023-09-05 23:42:39 +08:00
|
|
|
uses: actions/checkout@v4
|
2021-11-08 18:28:08 +08:00
|
|
|
|
|
|
|
- name: setup-go ${{ matrix.go }}
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
|
|
|
|
- name: verify go
|
|
|
|
run: __tests__/verify-go.sh ${{ matrix.go }}
|
|
|
|
shell: bash
|
2022-08-12 18:29:48 +08:00
|
|
|
|
|
|
|
architecture:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
go-version: [1.16, 1.17]
|
|
|
|
steps:
|
2023-09-05 23:42:39 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-12 18:29:48 +08:00
|
|
|
- name: Setup Go and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
architecture: x64
|
|
|
|
- name: Verify Go
|
2022-11-01 18:13:57 +08:00
|
|
|
run: go version
|