fix: upgrade sonic loader for go1.26 #82
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: [ push, pull_request ] | |
| jobs: | |
| unit-benchmark-test: | |
| strategy: | |
| matrix: | |
| go: [ 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, 1.25.x, 1.26.x] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Unit Test | |
| run: go test -race -covermode=atomic -coverprofile=coverage.out ./... | |
| - name: Benchmark | |
| run: cd ./bench && go test -bench=. -benchmem -run=none ./... | |
| go126-loader-test: | |
| name: Go 1.26 Loader Test (macos amd64) | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.26.x | |
| - name: Test loader compatibility | |
| run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go test -run 'TestEncoder|TestDecoder|TestSubrCompatibilitySymbols' -count=1 -v . | |
| fallback-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: ubuntu-x86 noasm | |
| go: 1.20.x | |
| os: ubuntu-24.04 | |
| command: go test -tags noasm . | |
| - name: ubuntu-x86 appengine | |
| go: 1.20.x | |
| os: ubuntu-24.04 | |
| command: go test -tags appengine . | |
| - name: macos arm64 | |
| go: 1.20.x | |
| os: macos-14 | |
| command: go test . | |
| - name: ubuntu arm64 | |
| go: 1.20.x | |
| os: ubuntu-24.04-arm | |
| command: go test . | |
| - name: riscv64 compile | |
| go: 1.20.x | |
| os: ubuntu-24.04 | |
| command: GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -run '^$' -exec=/usr/bin/true . | |
| name: Fallback Test (${{ matrix.name }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Test fallback path | |
| run: ${{ matrix.command }} |