Skip to content

chore: fix ci

chore: fix ci #5

Workflow file for this run

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Unit Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml: Anchors are not currently supported. Remove the anchor 'exclude_group'
name: Unit Test
on: pull_request
jobs:
build:
strategy:
max-parallel: 4
matrix:
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x]
runner_arch: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
exclude:
- &exclude_group
runner_arch: [ubuntu-24.04-arm, macos-latest] # arm not support
go-version: 1.17.x
- <<: *exclude_group
go-version: 1.18.x
- <<: *exclude_group
go-version: 1.19.x
runs-on: ${{ matrix.runner_arch }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
${{ github.workspace }}/go.sum
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Unit Test JIT
run: |
GOMAXPROCS=4 go test -race -covermode=atomic -coverprofile=coverage.txt ./...
- name: Unit Test VM
run: |
SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 GOMAXPROCS=4 go test -race -covermode=atomic -coverprofile=coverage.txt ./...
- name: Loader Test
run: |
cd ./loader
go test -v -race ./...
- name: Data Race
run: |
./scripts/test_race.sh
- name: PCSP Test
env:
GOVERSION: ${{ matrix.go-version }}
run: python3 ./scripts/test_pcsp.py
- name: Generic Test JIT
if: ${{ !startsWith(matrix.go-version, '1.17.') }}
run: GOMAXPROCS=4 go test -v -race ./generic_test
- name: Generic Test VM
if: ${{ !startsWith(matrix.go-version, '1.17.') }}
run: GOMAXPROCS=4 SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 go test -v -race ./generic_test
- name: Codecov
run: bash <(curl -s https://codecov.io/bash)