-
-
Notifications
You must be signed in to change notification settings - Fork 34
115 lines (108 loc) · 3.74 KB
/
ci.yaml
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
111
112
113
114
115
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# test-macos:
# runs-on: macos-latest
# steps:
# - name: Install homebrew
# run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# - name: Install pcre
# run: brew install pcre
# - name: Checkout project
# uses: actions/[email protected]
# - name: Checkout submodules
# run: git submodule update --init --recursive
# - name: Setup nightly Zig
# uses: mlugg/setup-zig@v1
# with:
# version: master
# - name: Build test ffi lib
# run: zig build-lib -dynamic tests/utils/foreign.zig && mv libforeign.* tests/utils/
# - name: Run tests Debug
# run: zig build test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests Debug with JIT always on
# run: zig build -Djit_always_on test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests ReleaseSafe
# run: zig build -Doptimize=ReleaseSafe test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests ReleaseSafe with JIT always on
# run: zig build -Doptimize=ReleaseSafe -Djit_always_on test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests ReleaseFast
# run: zig build -Doptimize=ReleaseFast test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests ReleaseFast with JIT always on
# run: zig build -Doptimize=ReleaseFast -Djit_always_on test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
test-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/[email protected]
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup nightly Zig
uses: mlugg/setup-zig@v1
with:
version: master
- name: Build test ffi lib
run: zig build-lib -dynamic tests/utils/foreign.zig && mv libforeign.* tests/utils/
- name: Run tests Debug
run: zig build test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests Debug with JIT always on
run: zig build -Djit_always_on test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests ReleaseSafe
run: zig build -Doptimize=ReleaseSafe test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests ReleaseSafe with JIT always on
run: zig build -Doptimize=ReleaseSafe -Djit_always_on test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests ReleaseFast
run: zig build -Doptimize=ReleaseFast test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests ReleaseFast with JIT always on
run: zig build -Doptimize=ReleaseFast -Djit_always_on test
- name: Cleanup
run: rm -rf zig-out zig-cache
wasm-build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/[email protected]
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup nightly Zig
uses: mlugg/setup-zig@v1
with:
version: master
- name: Build for wasm
run: zig build -Dtarget=wasm32-freestanding -freference-trace -Doptimize=ReleaseSmall
- name: Cleanup
run: rm -rf zig-out zig-cache
lint:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- name: Setup nightly Zig
uses: mlugg/setup-zig@v1
with:
version: master
- run: zig fmt --check src/*.zig src/**/*.zig