Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
phuslu committed Apr 26, 2024
1 parent 28e03c6 commit c8217a9
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go_version: ['1.22', '1.21', '1.20', '1.19', '1.18']
go-version: ['tip', '1.22', '1.21', '1.20', '1.19', '1.18']
steps:
- uses: actions/setup-go@v4
- name: Setup Go
if: matrix.go-version != 'tip'
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go_version }}
check-latest: true
go-version: ${{ matrix.go-version }}
- name: Setup Go tip if needed
if: matrix.go-version == 'tip'
run: |
set -ex
commit=$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1}')
curl -LOJ https://storage.googleapis.com/go-build-snap/go/linux-amd64/${commit}.tar.gz
rm -rf /usr/local/go
sudo tar xzf ${commit}.tar.gz -C /usr/local
sudo ln -sf /usr/local/go/bin/go /usr/bin/go
go version
- uses: actions/checkout@v4
- name: Build
run: go build -v -race
Expand Down

0 comments on commit c8217a9

Please sign in to comment.