-
Notifications
You must be signed in to change notification settings - Fork 408
59 lines (54 loc) · 2.18 KB
/
zig-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This workflow is for zig-based build/test running on Linux/x86_64.
name: zig build
on: [push, pull_request]
jobs:
build:
name: thr:${{ matrix.enable_threads }} gcdeb:${{ matrix.gc_debug }} unmap:${{ matrix.unmap }} redir:${{ matrix.redirect_malloc }} parmark:${{ matrix.parallel_mark }} thrlocal:${{ matrix.thread_local_alloc }} rwlock:${{ matrix.rwlock }}
runs-on: ubuntu-latest
strategy:
# Deliver the feedback for all matrix combinations.
fail-fast: false
matrix:
disable_handle_fork: [ false ]
enable_threads: [ false, true ]
gc_assertions: [ true ]
gc_debug: [ false, true ]
large_config: [ true ]
munmap: [ false, true ]
parallel_mark: [ false, true ]
redirect_malloc: [ false, true ]
rwlock: [ false, true ]
shared_libs: [ false ] # FIXME: gctest fail if shared lib
thread_local_alloc: [ false, true ]
exclude:
- enable_threads: false
disable_handle_fork: true
- enable_threads: false
parallel_mark: true
- enable_threads: false
rwlock: true
- enable_threads: false
thread_local_alloc: true
# TODO: move from nightly to zig 0.12 when released.
steps:
- uses: actions/checkout@v4
- name: "Install zig"
run: |
mkdir zig && curl https://ziglang.org/builds/zig-linux-x86_64-0.12.0-dev.1814+5c0d58b71.tar.xz | tar Jx --directory=zig --strip-components=1
- name: Build
run: >
zig/zig build
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}
-Dbuild_tests=true
-Ddisable_handle_fork=${{ matrix.disable_handle_fork }}
-Denable_gc_assertions=${{ matrix.gc_assertions }}
-Denable_gc_debug=${{ matrix.gc_debug }}
-Denable_large_config=${{ matrix.large_config }}
-Denable_munmap=${{ matrix.munmap }}
-Denable_parallel_mark=${{ matrix.parallel_mark }}
-Denable_redirect_malloc=${{ matrix.redirect_malloc }}
-Denable_rwlock=${{ matrix.rwlock }}
-Denable_thread_local_alloc=${{ matrix.thread_local_alloc }}
-Denable_threads=${{ matrix.enable_threads }}
-Denable_werror=true
test