1- name : full CI
1+ name : CI
22
33on :
44 merge_group :
99 CARGO_TERM_VERBOSE : true
1010 LIBC_CI : 1
1111
12+ defaults :
13+ run :
14+ shell : bash
15+
1216jobs :
1317 style_check :
1418 name : Style check
15- runs-on : ubuntu-22 .04
19+ runs-on : ubuntu-24 .04
1620 steps :
1721 - uses : actions/checkout@v4
1822 - name : Setup Rust toolchain
19- run : sh ./ci/install-rust.sh
23+ run : ./ci/install-rust.sh
2024 - name : Check style
21- run : sh ci/style.sh
25+ run : ./ ci/style.sh
2226
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
2830 strategy :
29- fail-fast : true
30- max-parallel : 5
3131 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 }}
4738 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 }}
5940 steps :
6041 - uses : actions/checkout@v4
6142 - name : Setup Rust toolchain
62- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
43+ run : ./ci/install-rust.sh
6344 - name : Execute build.sh
64- run : TOOLCHAIN=${{ matrix.target.toolchain }} sh . /ci/build.sh
45+ run : . /ci/verify- build.sh
6546
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
8949 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
10850 matrix :
10951 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
11060 - target : x86_64-pc-windows-gnu
61+ os : windows-2022
11162 env :
11263 ARCH_BITS : 64
11364 ARCH : x86_64
11465 - target : x86_64-pc-windows-msvc
66+ os : windows-2022
11567 # FIXME: It currently causes segfaults.
11668 # - target: i686-pc-windows-gnu
11769 # env:
11870 # ARCH_BITS: 32
11971 # ARCH: i686
12072 - 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 }}
14377 steps :
14478 - uses : actions/checkout@v4
14579 - 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 }}
14987
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
15492 strategy :
15593 fail-fast : true
15694 max-parallel : 12
15795 matrix :
15896 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
159100 - aarch64-linux-android
160101 - aarch64-unknown-linux-gnu
161102 - aarch64-unknown-linux-musl
@@ -169,28 +110,30 @@ jobs:
169110 - powerpc-unknown-linux-gnu
170111 - powerpc64-unknown-linux-gnu
171112 - powerpc64le-unknown-linux-gnu
172- - s390x-unknown-linux-gnu
173113 - riscv64gc-unknown-linux-gnu
114+ - s390x-unknown-linux-gnu
115+ - wasm32-unknown-emscripten
174116 - wasm32-wasip1
175117 - wasm32-wasip2
176- - sparc64-unknown-linux-gnu
177- - wasm32-unknown-emscripten
178118 - x86_64-linux-android
179119 # FIXME: Exec format error (os error 8)
180120 # - x86_64-unknown-linux-gnux32
181121 - x86_64-unknown-linux-musl
182122 # FIXME: It seems some items in `src/unix/mod.rs`
183123 # aren't defined on redox actually.
184124 # - x86_64-unknown-redox
125+ env :
126+ TARGET : ${{ matrix.target }}
185127 steps :
186128 - uses : actions/checkout@v4
187129 - name : Setup Rust toolchain
188- run : TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
130+ run : ./ci/install-rust.sh
189131 - name : Execute run-docker.sh
190- run : sh ./ci/run-docker.sh ${{ matrix.target }}
132+ run : ./ci/run-docker.sh ${{ matrix.target }}
191133
192- solaris :
193- name : Solaris
134+ test_tier2_vm :
135+ name : Test tier2 VM
136+ needs : [test_tier1, style_check]
194137 runs-on : ubuntu-latest
195138 strategy :
196139 fail-fast : true
@@ -207,40 +150,37 @@ jobs:
207150 mem : 4096
208151 copyback : false
209152 prepare : |
153+ set -x
210154 source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
211- echo "~~~~ rustc --version ~~~~"
212155 rustc --version
213- echo "~~~~ Solaris-version ~~~~"
214156 uname -a
215157 run : |
216158 export PATH=$HOME/.rust_solaris/bin:$PATH
217- bash ./ci/run.sh ${{ matrix.target }}
159+ ./ci/run.sh ${{ matrix.target }}
218160
219161 check_cfg :
220162 name : " Check #[cfg]s"
221- runs-on : ubuntu-22.04
163+ runs-on : ubuntu-24.04
164+ env :
165+ TOOLCHAIN : nightly
222166 steps :
223167 - uses : actions/checkout@v4
224168 - name : Setup Rust toolchain
225- run : TOOLCHAIN=nightly sh ./ci/install-rust.sh
169+ run : ./ci/install-rust.sh
226170 - name : Build with check-cfg
227171 run : LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
228172
229173 # One job that "summarizes" the success state of this pipeline. This can then be added to branch
230174 # protection, rather than having to add each job separately.
231175 success :
232176 name : success
233- runs-on : ubuntu-22 .04
177+ runs-on : ubuntu-24 .04
234178 needs :
235- - docker_linux_tier1
236- - docker_linux_tier2
237- - macos
238- - windows
239- - solaris
240179 - 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
244184 # Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
245185 # failed" as success. So we have to do some contortions to ensure the job fails if any of its
246186 # dependencies fails.
0 commit comments