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