1- name : full CI
1+ name : CI
22
33on :
44 merge_group :
@@ -10,152 +10,94 @@ env:
1010 CARGO_TERM_VERBOSE : true
1111 LIBC_CI : 1
1212
13+ defaults :
14+ run :
15+ shell : bash
16+
1317jobs :
1418 style_check :
1519 name : Style check
16- runs-on : ubuntu-22 .04
20+ runs-on : ubuntu-24 .04
1721 steps :
1822 - uses : actions/checkout@v4
1923 - name : Setup Rust toolchain
20- run : sh ./ci/install-rust.sh
24+ run : ./ci/install-rust.sh
2125 - name : Check style
22- run : sh ci/style.sh
26+ run : ./ ci/style.sh
2327
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
2931 strategy :
30- fail-fast : true
31- max-parallel : 5
3232 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 }}
4839 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 }}
6041 steps :
6142 - uses : actions/checkout@v4
6243 - name : Setup Rust toolchain
63- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
44+ run : ./ci/install-rust.sh
6445 - name : Execute build.sh
65- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh . /ci/build.sh
46+ run : . /ci/verify- build.sh
6647
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
9050 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
10951 matrix :
11052 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
11161 - target : x86_64-pc-windows-gnu
62+ os : windows-2022
11263 env :
11364 ARCH_BITS : 64
11465 ARCH : x86_64
11566 - target : x86_64-pc-windows-msvc
67+ os : windows-2022
11668 # FIXME: It currently causes segfaults.
11769 # - target: i686-pc-windows-gnu
11870 # env:
11971 # ARCH_BITS: 32
12072 # ARCH: i686
12173 - 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 }}
14378 steps :
14479 - uses : actions/checkout@v4
14580 - 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 }}
14988
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
15493 strategy :
15594 fail-fast : true
15695 max-parallel : 12
15796 matrix :
15897 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
159101 - aarch64-linux-android
160102 - aarch64-unknown-linux-gnu
161103 - aarch64-unknown-linux-musl
@@ -169,28 +111,30 @@ jobs:
169111 - powerpc-unknown-linux-gnu
170112 - powerpc64-unknown-linux-gnu
171113 - powerpc64le-unknown-linux-gnu
172- - s390x-unknown-linux-gnu
173114 - riscv64gc-unknown-linux-gnu
115+ - s390x-unknown-linux-gnu
116+ - wasm32-unknown-emscripten
174117 - wasm32-wasip1
175118 - wasm32-wasip2
176- - sparc64-unknown-linux-gnu
177- - wasm32-unknown-emscripten
178119 - x86_64-linux-android
179120 # FIXME: Exec format error (os error 8)
180121 # - x86_64-unknown-linux-gnux32
181122 - x86_64-unknown-linux-musl
182123 # FIXME: It seems some items in `src/unix/mod.rs`
183124 # aren't defined on redox actually.
184125 # - x86_64-unknown-redox
126+ env :
127+ TARGET : ${{ matrix.target }}
185128 steps :
186129 - uses : actions/checkout@v4
187130 - name : Setup Rust toolchain
188- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
131+ run : ./ci/install-rust.sh
189132 - name : Execute run-docker.sh
190- run : sh ./ci/run-docker.sh ${{ matrix.target }}
133+ run : ./ci/run-docker.sh ${{ matrix.target }}
191134
192- solaris :
193- name : Solaris
135+ test_tier2_vm :
136+ name : Test tier2 VM
137+ needs : [test_tier1, style_check]
194138 runs-on : ubuntu-latest
195139 strategy :
196140 fail-fast : true
@@ -207,40 +151,37 @@ jobs:
207151 mem : 4096
208152 copyback : false
209153 prepare : |
154+ set -x
210155 source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
211- echo "~~~~ rustc --version ~~~~"
212156 rustc --version
213- echo "~~~~ Solaris-version ~~~~"
214157 uname -a
215158 run : |
216159 export PATH=$HOME/.rust_solaris/bin:$PATH
217- bash ./ci/run.sh ${{ matrix.target }}
160+ ./ci/run.sh ${{ matrix.target }}
218161
219162 check_cfg :
220163 name : " Check #[cfg]s"
221- runs-on : ubuntu-22.04
164+ runs-on : ubuntu-24.04
165+ env :
166+ TOOLCHAIN : nightly
222167 steps :
223168 - uses : actions/checkout@v4
224169 - name : Setup Rust toolchain
225- run : TOOLCHAIN=nightly sh ./ci/install-rust.sh
170+ run : ./ci/install-rust.sh
226171 - name : Build with check-cfg
227172 run : LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
228173
229174 # One job that "summarizes" the success state of this pipeline. This can then be added to branch
230175 # protection, rather than having to add each job separately.
231176 success :
232177 name : success
233- runs-on : ubuntu-22 .04
178+ runs-on : ubuntu-24 .04
234179 needs :
235- - docker_linux_tier1
236- - docker_linux_tier2
237- - macos
238- - windows
239- - solaris
240180 - 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
244185 # Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
245186 # failed" as success. So we have to do some contortions to ensure the job fails if any of its
246187 # dependencies fails.
0 commit comments