forked from ziglang/zig
-
Notifications
You must be signed in to change notification settings - Fork 0
215 lines (215 loc) · 10.3 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
name: ci
on:
push:
branches:
- ci-scripts
env:
ci-zig-version: 0.13.0-dev.76+dee9f82f6
jobs:
x86_64-linux-debug:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Linux, x86_64]
steps:
- name: Download Zig
run: 'mkdir -p ~/deps && ! mkdir ~/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}} 2> /dev/null || curl https://jacobly.com/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: ~/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 21000000000 -Dbuild-type=Debug -Dextra-target=arm-linux-musleabihf cmake-bootstrap tidy update-stage1
x86_64-linux-release:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Linux, x86_64]
steps:
- name: Download Zig
run: 'mkdir -p ~/deps && ! mkdir ~/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}} 2> /dev/null || curl https://jacobly.com/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: ~/deps/zig-x86_64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 21000000000 -Dbuild-type=Release -Dextra-target=arm-linux-musleabihf -Dcc=cc cc-bootstrap cmake-bootstrap tidy reproducible update-stage1
aarch64-linux-debug:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Linux, aarch64]
steps:
- name: Download Zig
run: 'mkdir -p ~/deps && ! mkdir ~/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}} 2> /dev/null || curl https://jacobly.com/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: ~/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 24696061952 -Dbuild-type=Debug -Dextra-target=arm-linux-musleabihf cmake-bootstrap tidy update-stage1
aarch64-linux-release:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Linux, aarch64]
steps:
- name: Download Zig
run: 'mkdir -p ~/deps && ! mkdir ~/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}} 2> /dev/null || curl https://jacobly.com/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: ~/deps/zig-aarch64-linux-musl-${{env.ci-zig-version}}/bin/zig build --maxrss 24696061952 -Dbuild-type=Release -Dextra-target=arm-linux-musleabihf cmake-bootstrap tidy reproducible update-stage1
x86_64-macos-debug:
if: github.repository_owner == 'ziglang'
runs-on: "macos-11"
steps:
- name: Restore Zig Cache
id: zig-cache
uses: actions/cache/restore@v4
with:
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
key: zig-x86_64-macos-none-${{env.ci-zig-version}}
- name: Download Zig
if: steps.zig-cache.outputs.cache-hit != 'true'
run: 'mkdir -p ~/deps && curl https://jacobly.com/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Save Zig Cache
if: steps.zig-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
key: ${{steps.zig-cache.outputs.cache-primary-key}}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore Package Cache
id: package-cache
uses: actions/cache/restore@v4
with:
path: ~/.cache/zig
key: x86_64-macos-package-${{hashFiles('ci/build.zig.zon')}}
restore-keys: x86_64-macos-package-
- name: Build and Test
working-directory: ci
run: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Debug -Dskip-non-native cmake-bootstrap tidy update-stage1
- name: Save Package Cache
if: steps.package-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/.cache/zig
key: ${{steps.package-cache.outputs.cache-primary-key}}
x86_64-macos-release:
if: github.repository_owner == 'ziglang'
runs-on: "macos-11"
steps:
- name: Restore Zig Cache
id: zig-cache
uses: actions/cache/restore@v4
with:
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
key: zig-x86_64-macos-none-${{env.ci-zig-version}}
- name: Download Zig
if: steps.zig-cache.outputs.cache-hit != 'true'
run: 'mkdir -p ~/deps && curl https://jacobly.com/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Save Zig Cache
if: steps.zig-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}
key: ${{steps.zig-cache.outputs.cache-primary-key}}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore Package Cache
id: package-cache
uses: actions/cache/restore@v4
with:
path: ~/.cache/zig
key: x86_64-macos-package-${{hashFiles('ci/build.zig.zon')}}
restore-keys: x86_64-macos-package-
- name: Build and Test
working-directory: ci
run: ~/deps/zig-x86_64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Release -Dcc=cc -Dskip-non-native cc-bootstrap cmake-bootstrap tidy reproducible update-stage1
- name: Save Package Cache
if: steps.package-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/.cache/zig
key: ${{steps.package-cache.outputs.cache-primary-key}}
aarch64-macos-debug:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, macOS, aarch64]
steps:
- name: Download Zig
run: 'mkdir -p ~/deps && ! mkdir ~/deps/zig-aarch64-macos-none-${{env.ci-zig-version}} 2> /dev/null || curl https://jacobly.com/deps/zig-aarch64-macos-none-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: ~/deps/zig-aarch64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Debug -Dskip-non-native cmake-bootstrap tidy update-stage1
aarch64-macos-release:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, macOS, aarch64]
steps:
- name: Download Zig
run: 'mkdir -p ~/deps && ! mkdir ~/deps/zig-aarch64-macos-none-${{env.ci-zig-version}} 2> /dev/null || curl https://jacobly.com/deps/zig-aarch64-macos-none-${{env.ci-zig-version}}.tar.xz | tar xJ -C ~/deps'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: ~/deps/zig-aarch64-macos-none-${{env.ci-zig-version}}/bin/zig build -Dbuild-type=Release -Dskip-non-native cmake-bootstrap tidy reproducible update-stage1
x86_64-windows-debug:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Windows, x86_64]
steps:
- name: Download Zig
run: |
if (New-Item -Path $Env:USERPROFILE\deps\zig-x86_64-windows-gnu-${{env.ci-zig-version}} -ItemType Directory -ErrorAction Ignore) {
Invoke-WebRequest -Uri https://jacobly.com/deps/zig-x86_64-windows-gnu-${{env.ci-zig-version}}.zip -OutFile zig-x86_64-windows-gnu-${{env.ci-zig-version}}.zip
Expand-Archive -LiteralPath zig-x86_64-windows-gnu-${{env.ci-zig-version}}.zip -DestinationPath $Env:USERPROFILE\deps
}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: '& $Env:USERPROFILE\deps\zig-x86_64-windows-gnu-${{env.ci-zig-version}}\bin\zig.exe build -Dbuild-type=Debug -Dskip-non-native cmake-bootstrap tidy update-stage1 msvc'
x86_64-windows-release:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Windows, x86_64]
steps:
- name: Download Zig
run: |
if (New-Item -Path $Env:USERPROFILE\deps\zig-x86_64-windows-gnu-${{env.ci-zig-version}} -ItemType Directory -ErrorAction Ignore) {
Invoke-WebRequest -Uri https://jacobly.com/deps/zig-x86_64-windows-gnu-${{env.ci-zig-version}}.zip -OutFile zig-x86_64-windows-gnu-${{env.ci-zig-version}}.zip
Expand-Archive -LiteralPath zig-x86_64-windows-gnu-${{env.ci-zig-version}}.zip -DestinationPath $Env:USERPROFILE\deps
}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: '& $Env:USERPROFILE\deps\zig-x86_64-windows-gnu-${{env.ci-zig-version}}\bin\zig.exe build -Dbuild-type=Release -Dskip-non-native cmake-bootstrap tidy update-stage1' # reproducible
aarch64-windows-release:
if: github.repository_owner == 'ziglang'
runs-on: [self-hosted, Windows, aarch64]
steps:
- name: Download Zig
run: |
if (New-Item -Path $Env:USERPROFILE\deps\zig-aarch64-windows-gnu-${{env.ci-zig-version}} -ItemType Directory -ErrorAction Ignore) {
Invoke-WebRequest -Uri https://jacobly.com/deps/zig-aarch64-windows-gnu-${{env.ci-zig-version}}.zip -OutFile zig-aarch64-windows-gnu-${{env.ci-zig-version}}.zip
Expand-Archive -LiteralPath zig-aarch64-windows-gnu-${{env.ci-zig-version}}.zip -DestinationPath $Env:USERPROFILE\deps
}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test
working-directory: ci
run: '& $Env:USERPROFILE\deps\zig-aarch64-windows-gnu-${{env.ci-zig-version}}\bin\zig.exe build -Dbuild-type=Release -Dskip-non-native cmake-bootstrap tidy' # reproducible