1
- name : full CI
1
+ name : CI
2
2
3
3
on :
4
4
merge_group :
9
9
CARGO_TERM_VERBOSE : true
10
10
LIBC_CI : 1
11
11
12
+ defaults :
13
+ run :
14
+ shell : bash
15
+
12
16
jobs :
13
17
style_check :
14
18
name : Style check
15
- runs-on : ubuntu-22 .04
19
+ runs-on : ubuntu-24 .04
16
20
steps :
17
21
- uses : actions/checkout@v4
18
22
- name : Setup Rust toolchain
19
- run : sh ./ci/install-rust.sh
23
+ run : ./ci/install-rust.sh
20
24
- name : Check style
21
- run : sh ci/style.sh
25
+ run : ./ ci/style.sh
22
26
23
- build_channels_linux :
24
- name : Build Channels Linux
25
- runs-on : ubuntu-22.04
26
- env :
27
- OS : linux
27
+ # This runs `cargo build --target ...` for all T1 and T2 targets`
28
+ verify_build :
29
+ name : Verify build
28
30
strategy :
29
- fail-fast : true
30
- max-parallel : 5
31
31
matrix :
32
- toolchain :
33
- - stable
34
- - beta
35
- - nightly
36
- - 1.63.0
37
- steps :
38
- - uses : actions/checkout@v4
39
- - name : Setup Rust toolchain
40
- run : TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
41
- - name : Execute build.sh
42
- run : TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
43
-
44
- build_channels_macos :
45
- name : Build Channels macOS
46
- needs : macos
32
+ toolchain : [stable, nightly, 1.63.0]
33
+ os : [ubuntu-24.04, macos-14, windows-2022]
34
+ include :
35
+ - toolchain : beta
36
+ os : ubuntu-24.04
37
+ runs-on : ${{ matrix.os }}
47
38
env :
48
- OS : macos
49
- strategy :
50
- fail-fast : true
51
- max-parallel : 4
52
- matrix :
53
- target :
54
- - { toolchain: stable, os: macos-14 }
55
- - { toolchain: beta, os: macos-14 }
56
- - { toolchain: nightly, os: macos-14 }
57
- - { toolchain: 1.63.0, os: macos-14 }
58
- runs-on : ${{ matrix.target.os }}
39
+ TOOLCHAIN : ${{ matrix.toolchain }}
59
40
steps :
60
41
- uses : actions/checkout@v4
61
42
- name : Setup Rust toolchain
62
- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
43
+ run : ./ci/install-rust.sh
63
44
- name : Execute build.sh
64
- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh . /ci/build.sh
45
+ run : . /ci/verify- build.sh
65
46
66
- build_channels_windows :
67
- name : Build Channels Windows
68
- runs-on : windows-2022
69
- env :
70
- OS : windows
71
- strategy :
72
- fail-fast : true
73
- matrix :
74
- toolchain :
75
- - 1.63.0
76
- - stable
77
- steps :
78
- - uses : actions/checkout@v4
79
- - name : Self-update rustup
80
- run : rustup self update
81
- shell : bash
82
- - name : Execute build.sh
83
- run : TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
84
- shell : bash
85
-
86
- macos :
87
- name : macOS
88
- runs-on : macos-14
47
+ test_tier1 :
48
+ name : Test tier1
89
49
strategy :
90
- fail-fast : true
91
- matrix :
92
- target :
93
- - aarch64-apple-darwin
94
- steps :
95
- - uses : actions/checkout@v4
96
- - name : Setup Rust toolchain
97
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
98
- - name : Execute run.sh
99
- run : sh ./ci/run.sh ${{ matrix.target }}
100
-
101
- windows :
102
- name : Windows
103
- runs-on : windows-2022
104
- env :
105
- OS : windows
106
- strategy :
107
- fail-fast : true
108
50
matrix :
109
51
include :
52
+ - target : i686-unknown-linux-gnu
53
+ docker : true
54
+ os : ubuntu-24.04
55
+ - target : x86_64-unknown-linux-gnu
56
+ docker : true
57
+ os : ubuntu-24.04
58
+ - target : aarch64-apple-darwin
59
+ os : macos-14
110
60
- target : x86_64-pc-windows-gnu
61
+ os : windows-2022
111
62
env :
112
63
ARCH_BITS : 64
113
64
ARCH : x86_64
114
65
- target : x86_64-pc-windows-msvc
66
+ os : windows-2022
115
67
# FIXME: It currently causes segfaults.
116
68
# - target: i686-pc-windows-gnu
117
69
# env:
118
70
# ARCH_BITS: 32
119
71
# ARCH: i686
120
72
- target : i686-pc-windows-msvc
121
- steps :
122
- - uses : actions/checkout@v4
123
- - name : Self-update rustup
124
- run : rustup self update
125
- shell : bash
126
- - name : Setup Rust toolchain
127
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
128
- shell : bash
129
- - name : Execute run.sh
130
- run : sh ./ci/run.sh ${{ matrix.target }}
131
- shell : bash
132
-
133
-
134
- docker_linux_tier1 :
135
- name : Docker Linux Tier1
136
- runs-on : ubuntu-22.04
137
- strategy :
138
- fail-fast : true
139
- matrix :
140
- target :
141
- - i686-unknown-linux-gnu
142
- - x86_64-unknown-linux-gnu
73
+ os : windows-2022
74
+ runs-on : ${{ matrix.os }}
75
+ env :
76
+ TARGET : ${{ matrix.target }}
143
77
steps :
144
78
- uses : actions/checkout@v4
145
79
- name : Setup Rust toolchain
146
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
147
- - name : Execute run-docker.sh
148
- run : sh ./ci/run-docker.sh ${{ matrix.target }}
80
+ run : ./ci/install-rust.sh
81
+ - name : Run natively
82
+ if : " !matrix.docker"
83
+ run : ./ci/run.sh ${{ matrix.target }}
84
+ - name : Run in Docker
85
+ if : " matrix.docker"
86
+ run : ./ci/run-docker.sh ${{ matrix.target }}
149
87
150
- docker_linux_tier2 :
151
- name : Docker Linux Tier2
152
- needs : [docker_linux_tier1 , style_check]
153
- runs-on : ubuntu-22 .04
88
+ test_tier2 :
89
+ name : Test tier2
90
+ needs : [test_tier1 , style_check]
91
+ runs-on : ubuntu-24 .04
154
92
strategy :
155
93
fail-fast : true
156
94
max-parallel : 12
157
95
matrix :
158
96
target :
97
+ # FIXME(sparc): this takes much longer to run than any other job, put
98
+ # it first to make sure it gets a head start.
99
+ - sparc64-unknown-linux-gnu
159
100
- aarch64-linux-android
160
101
- aarch64-unknown-linux-gnu
161
102
- aarch64-unknown-linux-musl
@@ -169,28 +110,30 @@ jobs:
169
110
- powerpc-unknown-linux-gnu
170
111
- powerpc64-unknown-linux-gnu
171
112
- powerpc64le-unknown-linux-gnu
172
- - s390x-unknown-linux-gnu
173
113
- riscv64gc-unknown-linux-gnu
114
+ - s390x-unknown-linux-gnu
115
+ - wasm32-unknown-emscripten
174
116
- wasm32-wasip1
175
117
- wasm32-wasip2
176
- - sparc64-unknown-linux-gnu
177
- - wasm32-unknown-emscripten
178
118
- x86_64-linux-android
179
119
# FIXME: Exec format error (os error 8)
180
120
# - x86_64-unknown-linux-gnux32
181
121
- x86_64-unknown-linux-musl
182
122
# FIXME: It seems some items in `src/unix/mod.rs`
183
123
# aren't defined on redox actually.
184
124
# - x86_64-unknown-redox
125
+ env :
126
+ TARGET : ${{ matrix.target }}
185
127
steps :
186
128
- uses : actions/checkout@v4
187
129
- name : Setup Rust toolchain
188
- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
130
+ run : ./ci/install-rust.sh
189
131
- name : Execute run-docker.sh
190
- run : sh ./ci/run-docker.sh ${{ matrix.target }}
132
+ run : ./ci/run-docker.sh ${{ matrix.target }}
191
133
192
- solaris :
193
- name : Solaris
134
+ test_tier2_vm :
135
+ name : Test tier2 VM
136
+ needs : [test_tier1, style_check]
194
137
runs-on : ubuntu-latest
195
138
strategy :
196
139
fail-fast : true
@@ -207,40 +150,37 @@ jobs:
207
150
mem : 4096
208
151
copyback : false
209
152
prepare : |
153
+ set -x
210
154
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
211
- echo "~~~~ rustc --version ~~~~"
212
155
rustc --version
213
- echo "~~~~ Solaris-version ~~~~"
214
156
uname -a
215
157
run : |
216
158
export PATH=$HOME/.rust_solaris/bin:$PATH
217
- bash ./ci/run.sh ${{ matrix.target }}
159
+ ./ci/run.sh ${{ matrix.target }}
218
160
219
161
check_cfg :
220
162
name : " Check #[cfg]s"
221
- runs-on : ubuntu-22.04
163
+ runs-on : ubuntu-24.04
164
+ env :
165
+ TOOLCHAIN : nightly
222
166
steps :
223
167
- uses : actions/checkout@v4
224
168
- name : Setup Rust toolchain
225
- run : TOOLCHAIN=nightly sh ./ci/install-rust.sh
169
+ run : ./ci/install-rust.sh
226
170
- name : Build with check-cfg
227
171
run : LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
228
172
229
173
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
230
174
# protection, rather than having to add each job separately.
231
175
success :
232
176
name : success
233
- runs-on : ubuntu-22 .04
177
+ runs-on : ubuntu-24 .04
234
178
needs :
235
- - docker_linux_tier1
236
- - docker_linux_tier2
237
- - macos
238
- - windows
239
- - solaris
240
179
- style_check
241
- - build_channels_linux
242
- - build_channels_macos
243
- - build_channels_windows
180
+ - test_tier1
181
+ - test_tier2
182
+ - test_tier2_vm
183
+ - verify_build
244
184
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
245
185
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
246
186
# dependencies fails.
0 commit comments