Skip to content

Commit

Permalink
chore: fix ci (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 authored Feb 13, 2025
1 parent d8ef674 commit 2d5c1c6
Show file tree
Hide file tree
Showing 15 changed files with 119 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
os: [X64, macos-latest]
os: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Clear repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compatibility_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x]
os: [X64, macos-latest]
os: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Clear repository
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/fuzzing-linux-x64.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
os: [macos-latest, X64]
os: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Clear repository
Expand All @@ -30,4 +30,4 @@ jobs:
run: |
cd ./fuzz
make fuzz
make runopt
make runopt
27 changes: 0 additions & 27 deletions .github/workflows/generic_test-opt.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/generic_test.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ on: pull_request

jobs:
build:
runs-on: [self-hosted, X64]
runs-on: ubuntu-latest
steps:
- name: Clear repository
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE

- uses: actions/checkout@v2

- name: Check License Header
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: spell check
uses: codespell-project/actions-codespell@v2
with:
skip: loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/x86_64/encodings.go:720,loader/internal/iasm/x86_64/program.go,loader/internal/iasm/x86_64/program.go,loader/internal/iasm/x86_64/program.go,loader/internal/iasm/expr/ast.go,loader/internal/iasm/expr/errors.go
skip: ./loader/internal/iasm/obj/macho.go,./loader/internal/iasm/x86_64/encodings.go,./loader/internal/iasm/x86_64/program.go,./loader/internal/iasm/expr/ast.go,./loader/internal/iasm/expr/errors.go
46 changes: 46 additions & 0 deletions .github/workflows/test-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

name: Unit Test

on: pull_request

jobs:
build:
strategy:
max-parallel: 4
matrix:
go-version: [1.20.x, 1.21.x, 1.22.x, 1.23.x]
runner_arch: [ubuntu-24.04-arm]

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
run: |
GOMAXPROCS=4 go test -race -covermode=atomic -coverprofile=coverage.txt $(go list ./... | grep -v -E 'loader|jit|avx|x86|sse')
- name: Data Race
run: |
./scripts/test_race.sh
- name: Generic Test
if: ${{ !startsWith(matrix.go-version, '1.17.') }}
run: GOMAXPROCS=4 go test -v -race ./generic_test

- name: Codecov
run: bash <(curl -s https://codecov.io/bash)
64 changes: 64 additions & 0 deletions .github/workflows/test-x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

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]

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)
42 changes: 0 additions & 42 deletions .github/workflows/unit_test-linux-arm.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/unit_test-linux-opt-x64.yml

This file was deleted.

Loading

0 comments on commit 2d5c1c6

Please sign in to comment.