1
1
name : CI (bors)
2
2
3
3
on :
4
- push :
5
- branches :
6
- - auto-libc
7
- - try
4
+ pull_request :
5
+ types : [opened, synchronize, reopened]
8
6
9
7
permissions : {}
10
8
jobs :
11
- docker_linux_tier1 :
12
- permissions :
13
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
14
- contents : read # to fetch code (actions/checkout)
15
-
16
- name : Docker Linux Tier1
17
- runs-on : ubuntu-22.04
18
- strategy :
19
- fail-fast : true
20
- matrix :
21
- target : [
22
- i686-unknown-linux-gnu,
23
- x86_64-unknown-linux-gnu,
24
- ]
25
- steps :
26
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
27
- with :
28
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
29
- - uses : actions/checkout@v4
30
- - name : Setup Rust toolchain
31
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
32
- - name : Execute run-docker.sh
33
- run : LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}
34
-
35
- macos :
36
- permissions :
37
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
38
- contents : read # to fetch code (actions/checkout)
39
-
40
- name : macOS
41
- runs-on : macos-13
42
- strategy :
43
- fail-fast : true
44
- matrix :
45
- target : [
46
- x86_64-apple-darwin,
47
- ]
48
- steps :
49
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
50
- with :
51
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
52
- - uses : actions/checkout@v4
53
- - name : Setup Rust toolchain
54
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
55
- - name : Execute run.sh
56
- run : LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
57
-
58
- windows :
59
- permissions :
60
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
61
- contents : read # to fetch code (actions/checkout)
62
-
63
- name : Windows
64
- runs-on : windows-2022
65
- env :
66
- OS : windows
67
- strategy :
68
- fail-fast : true
69
- matrix :
70
- include :
71
- - target : x86_64-pc-windows-gnu
72
- env :
73
- ARCH_BITS : 64
74
- ARCH : x86_64
75
- - target : x86_64-pc-windows-msvc
76
- - target : i686-pc-windows-gnu
77
- env :
78
- ARCH_BITS : 32
79
- ARCH : i686
80
- - target : i686-pc-windows-msvc
81
- steps :
82
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
83
- with :
84
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
85
- - uses : actions/checkout@v4
86
- - name : Self-update rustup
87
- run : rustup self update
88
- shell : bash
89
- - name : Setup Rust toolchain
90
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
91
- shell : bash
92
- - name : Execute run.sh
93
- run : LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
94
- shell : bash
95
-
96
- style_check :
97
- permissions :
98
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
99
- contents : read # to fetch code (actions/checkout)
100
-
101
- name : Style check
102
- runs-on : ubuntu-22.04
103
- steps :
104
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
105
- with :
106
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
107
- - uses : actions/checkout@v4
108
- - name : Setup Rust toolchain
109
- run : sh ./ci/install-rust.sh
110
- - name : Check style
111
- run : sh ci/style.sh
112
-
113
9
docker_linux_tier2 :
114
10
permissions :
115
11
actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
116
12
contents : read # to fetch code (actions/checkout)
117
13
118
14
name : Docker Linux Tier2
119
- needs : [docker_linux_tier1, style_check]
120
15
runs-on : ubuntu-22.04
121
16
strategy :
122
17
fail-fast : true
123
18
max-parallel : 12
124
19
matrix :
125
20
target : [
126
21
aarch64-linux-android,
127
- aarch64-unknown-linux-gnu,
128
- aarch64-unknown-linux-musl,
129
22
arm-linux-androideabi,
130
- arm-unknown-linux-gnueabihf,
131
- arm-unknown-linux-musleabihf,
132
23
i686-linux-android,
133
- i686-unknown-linux-musl,
134
- powerpc-unknown-linux-gnu,
135
- powerpc64-unknown-linux-gnu,
136
- powerpc64le-unknown-linux-gnu,
137
- s390x-unknown-linux-gnu,
138
- riscv64gc-unknown-linux-gnu,
139
- # FIXME: A recent nightly causes a linker failure:
140
- # https://github.com/rust-lang/rust/issues/76679
141
- # See this comment for more details:
142
- # https://github.com/rust-lang/libc/pull/2225#issuecomment-880696737
143
- # wasm32-wasi,
144
- sparc64-unknown-linux-gnu,
145
- wasm32-unknown-emscripten,
146
24
x86_64-linux-android,
147
- # FIXME: Exec format error (os error 8)
148
- # x86_64-unknown-linux-gnux32,
149
- x86_64-unknown-linux-musl,
150
- # FIXME: It seems some items in `src/unix/mod.rs`
151
- # aren't defined on redox actually.
152
- # x86_64-unknown-redox,
153
25
]
154
26
steps :
155
27
- uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
@@ -160,213 +32,3 @@ jobs:
160
32
run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
161
33
- name : Execute run-docker.sh
162
34
run : LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}
163
-
164
- # These targets are tier 3 or otherwise need to have CI build std via -Zbuild-std.
165
- # Because of this, only the nightly compiler can be used on these targets.
166
- docker_linux_build_std :
167
- permissions :
168
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
169
- contents : read # to fetch code (actions/checkout)
170
-
171
- if : ${{ false }} # This is currently broken
172
- name : Docker Linux Build-Std Targets
173
- needs : [docker_linux_tier1, style_check]
174
- runs-on : ubuntu-22.04
175
- strategy :
176
- fail-fast : true
177
- max-parallel : 12
178
- matrix :
179
- target : [
180
- armv7-unknown-linux-uclibceabihf
181
- ]
182
- steps :
183
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
184
- with :
185
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
186
- - uses : actions/checkout@v4
187
- - name : Setup Rust toolchain
188
- run : TOOLCHAIN=nightly INSTALL_RUST_SRC=1 sh ./ci/install-rust.sh
189
- - name : Execute run-docker.sh
190
- run : LIBC_CI=1 TOOLCHAIN=nightly LIBC_CI_ZBUILD_STD=1 sh ./ci/run-docker.sh ${{ matrix.target }}
191
-
192
- # devkitpro's pacman needs to be connected from Docker.
193
- docker_switch :
194
- permissions :
195
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
196
- contents : read # to fetch code (actions/checkout)
197
-
198
- name : Docker Switch
199
- needs : [docker_linux_tier1, style_check]
200
- runs-on : ubuntu-22.04
201
- steps :
202
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
203
- with :
204
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
205
- - uses : actions/checkout@v4
206
- - name : Setup Rust toolchain
207
- run : sh ./ci/install-rust.sh
208
- - name : Execute run-docker.sh
209
- run : LIBC_CI=1 sh ./ci/run-docker.sh switch
210
-
211
- build_channels_linux :
212
- permissions :
213
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
214
- contents : read # to fetch code (actions/checkout)
215
-
216
- name : Build Channels Linux
217
- needs : docker_linux_tier2
218
- runs-on : ubuntu-22.04
219
- env :
220
- OS : linux
221
- strategy :
222
- fail-fast : true
223
- max-parallel : 5
224
- matrix :
225
- toolchain : [
226
- stable,
227
- beta,
228
- nightly,
229
- # FIXME: Disabled due to:
230
- # error: failed to parse registry's information for: serde
231
- # 1.13.0,
232
- 1.19.0,
233
- 1.24.0,
234
- 1.25.0,
235
- 1.30.0,
236
- ]
237
- steps :
238
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
239
- with :
240
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
241
- - uses : actions/checkout@v4
242
- - name : Setup Rust toolchain
243
- run : TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
244
- - name : Execute build.sh
245
- run : LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
246
-
247
- build_channels_macos :
248
- permissions :
249
- contents : read # to fetch code (actions/checkout)
250
-
251
- name : Build Channels macOS
252
- needs : macos
253
- env :
254
- OS : macos
255
- strategy :
256
- fail-fast : true
257
- max-parallel : 4
258
- matrix :
259
- target :
260
- - { toolchain: stable, os: macos-13 }
261
- - { toolchain: beta, os: macos-13 }
262
- - { toolchain: nightly, os: macos-13 }
263
- # Use macOS 11 for older toolchains as newer Xcode donesn't work well.
264
- # FIXME: Disabled due to:
265
- # error: failed to parse registry's information for: serde
266
- # - { toolchain: 1.13.0, os: macos-11 }
267
- - { toolchain: 1.19.0, os: macos-11 }
268
- - { toolchain: 1.24.0, os: macos-11 }
269
- - { toolchain: 1.25.0, os: macos-11 }
270
- - { toolchain: 1.30.0, os: macos-11 }
271
- runs-on : ${{ matrix.target.os }}
272
- steps :
273
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
274
- with :
275
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
276
- - uses : actions/checkout@v4
277
- - name : Setup Rust toolchain
278
- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
279
- - name : Execute build.sh
280
- run : LIBC_CI=1 TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh
281
-
282
- build_channels_windows :
283
- permissions :
284
- contents : read # to fetch code (actions/checkout)
285
-
286
- name : Build Channels Windows
287
- runs-on : windows-2022
288
- env :
289
- OS : windows
290
- strategy :
291
- fail-fast : true
292
- matrix :
293
- toolchain : [
294
- 1.19.0,
295
- 1.24.0,
296
- 1.25.0,
297
- 1.30.0,
298
- stable,
299
- ]
300
- steps :
301
- - uses : actions/checkout@v4
302
- - name : Self-update rustup
303
- run : rustup self update
304
- shell : bash
305
- - name : Execute build.sh
306
- run : LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
307
- shell : bash
308
-
309
- check_cfg :
310
- permissions :
311
- actions : write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
312
- contents : read # to fetch code (actions/checkout)
313
-
314
- name : " Check #[cfg]s"
315
- runs-on : ubuntu-22.04
316
- steps :
317
- - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
318
- with :
319
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
320
- - uses : actions/checkout@v4
321
- - name : Setup Rust toolchain
322
- run : TOOLCHAIN=nightly sh ./ci/install-rust.sh
323
- - name : Build with check-cfg
324
- run : LIBC_CI=1 LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
325
-
326
- # These jobs doesn't actually test anything, but they're only used to tell
327
- # bors the build completed, as there is no practical way to detect when a
328
- # workflow is successful listening to webhooks only.
329
- #
330
- # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
331
-
332
- end_success :
333
- name : bors build finished
334
- if : github.event.pusher.name == 'bors' && success()
335
- runs-on : ubuntu-22.04
336
- needs : [
337
- docker_linux_tier1,
338
- docker_linux_tier2,
339
- # docker_linux_build_std,
340
- macos,
341
- windows,
342
- style_check,
343
- docker_switch,
344
- build_channels_linux,
345
- build_channels_macos,
346
- build_channels_windows,
347
- ]
348
-
349
- steps :
350
- - name : Mark the job as successful
351
- run : exit 0
352
-
353
- end_failure :
354
- name : bors build finished
355
- if : github.event.pusher.name == 'bors' && (failure() || cancelled())
356
- runs-on : ubuntu-22.04
357
- needs : [
358
- docker_linux_tier1,
359
- docker_linux_tier2,
360
- # docker_linux_build_std,
361
- macos,
362
- windows,
363
- style_check,
364
- docker_switch,
365
- build_channels_linux,
366
- build_channels_macos,
367
- build_channels_windows,
368
- ]
369
-
370
- steps :
371
- - name : Mark the job as a failure
372
- run : exit 1
0 commit comments