-
Notifications
You must be signed in to change notification settings - Fork 407
110 lines (105 loc) · 4.05 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# This workflow is for zig-based build/test running on Linux and MacOS (x64).
name: zig build
on: [ push, pull_request ]
jobs:
build:
name: ${{ matrix.os }} thr:${{ matrix.enable_threads }} rwlock:${{ matrix.enable_rwlock }} redir:${{ matrix.redirect_malloc }} gcdeb:${{ matrix.enable_gc_debug }} munmap:${{ matrix.enable_munmap }} paramark:${{ matrix.parallel_mark }} thrlocal:${{ matrix.thread_local_alloc }} dll:${{ matrix.shared_libs }}
runs-on: ${{ matrix.os }}
timeout-minutes: 7
strategy:
fail-fast: false
matrix:
# TODO: move from nightly to zig 0.12 final when released.
zig_version: [ "0.12.0-dev.2076+8fd15c6ca" ]
os: [ macos-latest, ubuntu-latest ]
gc_assertions: [ true ]
large_config: [ false ]
enable_threads: [ false, true ]
disable_handle_fork: [ false ]
enable_rwlock: [ false, true ]
redirect_malloc: [ false, true ]
enable_gc_debug: [ false, true ]
enable_munmap: [ false, true ]
parallel_mark: [ false, true ]
thread_local_alloc: [ false, true ]
shared_libs: [ false, true ]
exclude:
- enable_threads: false
disable_handle_fork: true
- enable_threads: false
parallel_mark: true
- enable_threads: false
enable_rwlock: true
- enable_threads: false
thread_local_alloc: true
- os: ubuntu-latest # TODO: illegal instruction in GC_clear_stack
enable_gc_debug: true
enable_threads: false
redirect_malloc: true
shared_libs: false
# The following ones are long-running jobs, thus excluded.
- os: macos-latest
enable_gc_debug: true
enable_rwlock: true
# The following ones just to reduce amount of jobs.
- enable_munmap: false
shared_libs: true
- enable_munmap: true
enable_threads: false
shared_libs: false
- enable_gc_debug: true
enable_rwlock: true
thread_local_alloc: false
- parallel_mark: false
redirect_malloc: true
- enable_gc_debug: true
thread_local_alloc: false
- os: macos-latest
enable_munmap: false
enable_threads: false
- os: macos-latest
enable_munmap: false
enable_rwlock: true
- os: macos-latest
enable_rwlock: true
thread_local_alloc: false
- os: macos-latest
enable_rwlock: true
parallel_mark: false
- os: macos-latest
enable_munmap: false
redirect_malloc: false
- os: macos-latest
enable_threads: true
redirect_malloc: false
thread_local_alloc: false
- os: macos-latest
enable_threads: true
parallel_mark: false
redirect_malloc: false
steps:
- uses: actions/checkout@v4
- name: "Install zig on Linux/x86_64"
if: runner.os == 'Linux'
run: |
mkdir zig && curl https://ziglang.org/builds/zig-linux-x86_64-${{matrix.zig_version}}.tar.xz | tar Jx --directory=zig --strip-components=1
- name: "Install zig on MacOS/x86_64"
if: runner.os == 'macOS'
run: |
mkdir zig && curl https://ziglang.org/builds/zig-macos-x86_64-${{matrix.zig_version}}.tar.xz | tar Jx --directory=zig --strip-components=1
- name: Build
run: >
zig/zig build
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}
-Ddisable_handle_fork=${{ matrix.disable_handle_fork }}
-Denable_gc_assertions=${{ matrix.gc_assertions }}
-Denable_gc_debug=${{ matrix.enable_gc_debug }}
-Denable_large_config=${{ matrix.large_config }}
-Denable_munmap=${{ matrix.enable_munmap }}
-Denable_parallel_mark=${{ matrix.parallel_mark }}
-Denable_redirect_malloc=${{ matrix.redirect_malloc }}
-Denable_rwlock=${{ matrix.enable_rwlock }}
-Denable_thread_local_alloc=${{ matrix.thread_local_alloc }}
-Denable_threads=${{ matrix.enable_threads }}
-Denable_werror
test