Skip to content

Commit c7fe518

Browse files
committed
CI: split compilation and tests
1 parent 146429f commit c7fe518

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

.github/workflows/ci.yml renamed to .github/workflows/compile.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Compilation
22

33
on:
44
push:
@@ -16,14 +16,13 @@ jobs:
1616
- name: Install Zig
1717
uses: mlugg/setup-zig@v1
1818

19-
- name: Unit tests
20-
run: |
21-
zig build test
22-
zig build test -Drelease
23-
2419
- name: Compilation to multiple targets
2520
run: |
21+
zig build
2622
zig build -Drelease
23+
zig build -Drelease -Dfavor-performance
24+
zig build -Drelease -Dwith-benchmark
25+
zig build -Drelease -Dwith-benchmark -Dfavor-performance
2726
2827
zig build -Dtarget=x86_64-linux -Dcpu=baseline
2928
zig build -Dtarget=aarch64-linux -Dcpu=baseline+aes+crypto
@@ -40,5 +39,4 @@ jobs:
4039
zig build -Dtarget=x86_64-macos -Dcpu=znver4
4140
zig build -Dtarget=aarch64-macos -Dcpu=apple_m2
4241
zig build -Dtarget=wasm32-wasi
43-
44-
rm -fr zig-cache zig-out
42+
zig build -Dtarget=wasm32-freestanding

.github/workflows/tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os:
14+
- ubuntu-latest
15+
- ubuntu-24.04-arm
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Zig
23+
uses: mlugg/setup-zig@v1
24+
25+
- name: Unit tests
26+
run: |
27+
zig build test
28+
zig build test -Drelease

.github/workflows/version_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ jobs:
1616
run: |
1717
grep -E 'const version =' build.zig | grep -E '"${{ github.ref_name }}"' || exit 78
1818
echo "Zig build version check passed."
19-
grep -E 'COMPATIBILITY AnyNewerVersion' CMakeLists.txt | grep -E ' ${{ github.ref_name }} ' || exit 78
19+
grep -E 'COMPATIBILITY AnyNewerVersion' CMakeLists.txt | grep -E ' ${{ github.ref_name }} ' || exit 78
2020
echo "CMake version check passed."

0 commit comments

Comments
 (0)