add support for Go 1.16

This commit is contained in:
Marten Seemann
2020-12-23 15:56:29 +07:00
parent 68e8c4d1dd
commit 57e3f55279
12 changed files with 151 additions and 5 deletions

View File

@@ -11,7 +11,10 @@ for dist in $(go tool dist list); do
if [[ "$goos" == "darwin" && $goarch == "arm64" ]]; then continue; fi # ... darwin/arm64 neither
if [[ $GOVERSION == "1.14" && $goos == "darwin" && $goarch == "arm" ]]; then continue; fi # Go 1.14 lacks syscall.IPV6_RECVTCLASS
cgo=0
if [[ "$goos" == "ios" ]]; then cgo=1; fi # iOS builds require CGO, see https://github.com/golang/go/issues/43343
echo "$dist"
GOOS=$goos GOARCH=$goarch go build -o main example/main.go
GOOS=$goos GOARCH=$goarch CGO_ENABLED=$cgo go build -o main example/main.go
rm main
done

View File

@@ -3,13 +3,14 @@ jobs:
crosscompile:
strategy:
matrix:
go: [ "1.14.x", "1.15.x" ]
go: [ "1.14.x", "1.15.x", "1.16.0-beta1" ]
runs-on: ubuntu-latest
name: "Cross Compilation (Go ${{matrix.go}})"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: !contains(${{ matrix.go }}, "beta") && !contains(${{ matrix.go }}, "rc")
go-version: ${{ matrix.go }}
- name: Install build utils
run: sudo apt-get install -y gcc-multilib

View File

@@ -4,13 +4,14 @@ jobs:
unit:
strategy:
matrix:
go: [ "1.14", "1.15" ]
go: [ "1.14.x", "1.15.x", "1.16.0-beta1" ]
runs-on: ubuntu-latest
name: Integration Tests, Go ${{ matrix.go }})
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: !contains(${{ matrix.go }}, "beta") && !contains(${{ matrix.go }}, "rc")
go-version: ${{ matrix.go }}
- run: go version
- name: Install Ginkgo

View File

@@ -7,13 +7,14 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu", "windows", "macos" ]
go: [ "1.14", "1.15" ]
go: [ "1.14.x", "1.15.x", "1.16.0-beta1" ]
runs-on: ${{ matrix.os }}-latest
name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }})
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
with:
stable: !contains(${{ matrix.go }}, "beta") && !contains(${{ matrix.go }}, "rc")
go-version: ${{ matrix.go }}
- run: go version
- name: Install test tools