Skip to content

Commit d135c37

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

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Zig
17+
uses: mlugg/setup-zig@v1
18+
19+
- name: Unit tests
20+
run: |
21+
zig build test
22+
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)