Skip to content

Commit 9ec481f

Browse files
committed
simplify CI
It seems rather wasteful to test this many different configurations.
1 parent 3b254c3 commit 9ec481f

File tree

1 file changed

+18
-40
lines changed

1 file changed

+18
-40
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Build and Test
1+
name: CI
2+
23
on:
34
push:
45
branches: [main]
@@ -11,49 +12,26 @@ jobs:
1112
fail-fast: false
1213
matrix:
1314
os: [windows-latest, ubuntu-latest, macos-latest]
14-
target: [
15-
native,
16-
x86_64-linux-gnu,
17-
x86_64-linux-musl,
18-
x86_64-windows,
19-
aarch64-macos,
20-
aarch64-linux-gnu,
21-
aarch64-linux-musl
22-
# TODO: bsd
23-
]
24-
optimize: [
25-
Debug,
26-
ReleaseSafe,
27-
ReleaseFast,
28-
ReleaseSmall
29-
]
3015
runs-on: ${{ matrix.os }}
3116
steps:
32-
- uses: actions/checkout@v2
33-
with:
34-
submodules: recursive
17+
uses: actions/checkout@v4
3518

3619
- name: Setup Zig
37-
uses: mlugg/[email protected]
38-
with:
39-
version: 0.15.1
40-
- name: Build
41-
run: zig build -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }}
42-
test:
43-
strategy:
44-
fail-fast: false
45-
matrix:
46-
os: [windows-latest, ubuntu-latest, macos-latest]
47-
runs-on: ${{ matrix.os }}
48-
steps:
49-
- uses: actions/checkout@v2
50-
with:
51-
submodules: recursive
20+
uses: mlugg/setup-zig@v2
5221

53-
- name: Setup Zig
54-
uses: mlugg/[email protected]
55-
with:
56-
version: 0.15.1
22+
- name: Check Formatting
23+
run: zig fmt --ast-check --check .
24+
25+
- name: Build
26+
run: zig build --summary all
5727

5828
- name: Test
59-
run: zig build test
29+
run: zig build test --summary all
30+
31+
- name: Cross Compile
32+
if: matrix.os == 'ubuntu-latest'
33+
uses: |
34+
zig build -Dtarget=native-linux-gnu
35+
zig build -Dtarget=native-linux-musl
36+
zig build -Dtarget=native-freebsd
37+
zig build -Dtarget=native-netbsd

0 commit comments

Comments
 (0)