Skip to content

Commit 0e6afd5

Browse files
authored
Merge pull request #3891 from tgross35/ci-updates
ci: clean up workflow
2 parents 3960e54 + 7294016 commit 0e6afd5

File tree

1 file changed

+116
-146
lines changed

1 file changed

+116
-146
lines changed

.github/workflows/full_ci.yml

+116-146
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,99 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened]
77

8+
env:
9+
LIBC_CI: 1
10+
811
jobs:
9-
docker_linux_tier1:
10-
permissions:
11-
contents: read # to fetch code (actions/checkout)
12+
style_check:
13+
name: Style check
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup Rust toolchain
18+
run: sh ./ci/install-rust.sh
19+
- name: Check style
20+
run: sh ci/style.sh
1221

13-
name: Docker Linux Tier1
22+
build_channels_linux:
23+
name: Build Channels Linux
1424
runs-on: ubuntu-22.04
25+
env:
26+
OS: linux
1527
strategy:
1628
fail-fast: true
29+
max-parallel: 5
1730
matrix:
18-
target: [
19-
i686-unknown-linux-gnu,
20-
x86_64-unknown-linux-gnu,
21-
]
31+
toolchain:
32+
- stable
33+
- beta
34+
- nightly
35+
- 1.63.0
2236
steps:
2337
- uses: actions/checkout@v4
2438
- name: Setup Rust toolchain
25-
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
26-
- name: Execute run-docker.sh
27-
run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}
39+
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
40+
- name: Execute build.sh
41+
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
2842

29-
macos:
30-
permissions:
31-
contents: read # to fetch code (actions/checkout)
43+
build_channels_macos:
44+
name: Build Channels macOS
45+
needs: macos
46+
env:
47+
OS: macos
48+
strategy:
49+
fail-fast: true
50+
max-parallel: 4
51+
matrix:
52+
target:
53+
- { toolchain: stable, os: macos-14 }
54+
- { toolchain: beta, os: macos-14 }
55+
- { toolchain: nightly, os: macos-14 }
56+
- { toolchain: 1.63.0, os: macos-14 }
57+
runs-on: ${{ matrix.target.os }}
58+
steps:
59+
- uses: actions/checkout@v4
60+
- name: Setup Rust toolchain
61+
run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
62+
- name: Execute build.sh
63+
run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh
3264

65+
build_channels_windows:
66+
name: Build Channels Windows
67+
runs-on: windows-2022
68+
env:
69+
OS: windows
70+
strategy:
71+
fail-fast: true
72+
matrix:
73+
toolchain:
74+
- 1.63.0
75+
- stable
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Self-update rustup
79+
run: rustup self update
80+
shell: bash
81+
- name: Execute build.sh
82+
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
83+
shell: bash
84+
85+
macos:
3386
name: macOS
3487
runs-on: macos-14
3588
strategy:
3689
fail-fast: true
3790
matrix:
38-
target: [
39-
aarch64-apple-darwin,
40-
]
91+
target:
92+
- aarch64-apple-darwin
4193
steps:
4294
- uses: actions/checkout@v4
4395
- name: Setup Rust toolchain
4496
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
4597
- name: Execute run.sh
46-
run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
98+
run: sh ./ci/run.sh ${{ matrix.target }}
4799

48100
windows:
49-
permissions:
50-
contents: read # to fetch code (actions/checkout)
51-
52101
name: Windows
53102
runs-on: windows-2022
54103
env:
@@ -77,169 +126,90 @@ jobs:
77126
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
78127
shell: bash
79128
- name: Execute run.sh
80-
run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
129+
run: sh ./ci/run.sh ${{ matrix.target }}
81130
shell: bash
82131

83-
style_check:
84-
permissions:
85-
contents: read # to fetch code (actions/checkout)
86-
87-
name: Style check
132+
133+
docker_linux_tier1:
134+
name: Docker Linux Tier1
88135
runs-on: ubuntu-22.04
136+
strategy:
137+
fail-fast: true
138+
matrix:
139+
target:
140+
- i686-unknown-linux-gnu
141+
- x86_64-unknown-linux-gnu
89142
steps:
90143
- uses: actions/checkout@v4
91144
- name: Setup Rust toolchain
92-
run: sh ./ci/install-rust.sh
93-
- name: Check style
94-
run: sh ci/style.sh
145+
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
146+
- name: Execute run-docker.sh
147+
run: sh ./ci/run-docker.sh ${{ matrix.target }}
95148

96149
docker_linux_tier2:
97-
permissions:
98-
contents: read # to fetch code (actions/checkout)
99-
100150
name: Docker Linux Tier2
101151
needs: [docker_linux_tier1, style_check]
102152
runs-on: ubuntu-22.04
103153
strategy:
104154
fail-fast: true
105155
max-parallel: 12
106156
matrix:
107-
target: [
108-
aarch64-linux-android,
109-
aarch64-unknown-linux-gnu,
110-
aarch64-unknown-linux-musl,
111-
arm-linux-androideabi,
112-
arm-unknown-linux-gnueabihf,
113-
arm-unknown-linux-musleabihf,
114-
i686-linux-android,
115-
i686-unknown-linux-musl,
116-
powerpc-unknown-linux-gnu,
117-
powerpc64-unknown-linux-gnu,
118-
powerpc64le-unknown-linux-gnu,
119-
s390x-unknown-linux-gnu,
120-
riscv64gc-unknown-linux-gnu,
121-
wasm32-wasip1,
122-
wasm32-wasip2,
123-
sparc64-unknown-linux-gnu,
124-
wasm32-unknown-emscripten,
125-
x86_64-linux-android,
157+
target:
158+
- aarch64-linux-android
159+
- aarch64-unknown-linux-gnu
160+
- aarch64-unknown-linux-musl
161+
- arm-linux-androideabi
162+
- arm-unknown-linux-gnueabihf
163+
- arm-unknown-linux-musleabihf
164+
- i686-linux-android
165+
- i686-unknown-linux-musl
166+
- powerpc-unknown-linux-gnu
167+
- powerpc64-unknown-linux-gnu
168+
- powerpc64le-unknown-linux-gnu
169+
- s390x-unknown-linux-gnu
170+
- riscv64gc-unknown-linux-gnu
171+
- wasm32-wasip1
172+
- wasm32-wasip2
173+
- sparc64-unknown-linux-gnu
174+
- wasm32-unknown-emscripten
175+
- x86_64-linux-android
126176
# FIXME: Exec format error (os error 8)
127-
#x86_64-unknown-linux-gnux32,
128-
x86_64-unknown-linux-musl,
177+
# - x86_64-unknown-linux-gnux32
178+
- x86_64-unknown-linux-musl
129179
# FIXME: It seems some items in `src/unix/mod.rs`
130180
# aren't defined on redox actually.
131-
# x86_64-unknown-redox,
132-
]
181+
# - x86_64-unknown-redox
133182
steps:
134183
- uses: actions/checkout@v4
135184
- name: Setup Rust toolchain
136185
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
137186
- name: Execute run-docker.sh
138-
run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}
139-
140-
build_channels_linux:
141-
permissions:
142-
contents: read # to fetch code (actions/checkout)
143-
144-
name: Build Channels Linux
145-
needs: docker_linux_tier2
146-
runs-on: ubuntu-22.04
147-
env:
148-
OS: linux
149-
strategy:
150-
fail-fast: true
151-
max-parallel: 5
152-
matrix:
153-
toolchain: [
154-
stable,
155-
beta,
156-
nightly,
157-
1.63.0,
158-
]
159-
steps:
160-
- uses: actions/checkout@v4
161-
- name: Setup Rust toolchain
162-
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
163-
- name: Execute build.sh
164-
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
165-
166-
build_channels_macos:
167-
permissions:
168-
contents: read # to fetch code (actions/checkout)
169-
170-
name: Build Channels macOS
171-
needs: macos
172-
env:
173-
OS: macos
174-
strategy:
175-
fail-fast: true
176-
max-parallel: 4
177-
matrix:
178-
target:
179-
- { toolchain: stable, os: macos-14 }
180-
- { toolchain: beta, os: macos-14 }
181-
- { toolchain: nightly, os: macos-14 }
182-
- { toolchain: 1.63.0, os: macos-14 }
183-
runs-on: ${{ matrix.target.os }}
184-
steps:
185-
- uses: actions/checkout@v4
186-
- name: Setup Rust toolchain
187-
run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
188-
- name: Execute build.sh
189-
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh
190-
191-
build_channels_windows:
192-
permissions:
193-
contents: read # to fetch code (actions/checkout)
194-
195-
name: Build Channels Windows
196-
runs-on: windows-2022
197-
env:
198-
OS: windows
199-
strategy:
200-
fail-fast: true
201-
matrix:
202-
toolchain: [
203-
1.63.0,
204-
stable,
205-
]
206-
steps:
207-
- uses: actions/checkout@v4
208-
- name: Self-update rustup
209-
run: rustup self update
210-
shell: bash
211-
- name: Execute build.sh
212-
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
213-
shell: bash
187+
run: sh ./ci/run-docker.sh ${{ matrix.target }}
214188

215189
check_cfg:
216-
permissions:
217-
contents: read # to fetch code (actions/checkout)
218-
219190
name: "Check #[cfg]s"
220191
runs-on: ubuntu-22.04
221192
steps:
222193
- uses: actions/checkout@v4
223194
- name: Setup Rust toolchain
224195
run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
225196
- name: Build with check-cfg
226-
run: LIBC_CI=1 LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
197+
run: LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
227198

228199
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
229200
# protection, rather than having to add each job separately.
230201
success:
231202
name: success
232203
runs-on: ubuntu-22.04
233-
needs: [
234-
docker_linux_tier1,
235-
docker_linux_tier2,
236-
macos,
237-
windows,
238-
style_check,
239-
build_channels_linux,
240-
build_channels_macos,
241-
build_channels_windows,
242-
]
204+
needs:
205+
- docker_linux_tier1
206+
- docker_linux_tier2
207+
- macos
208+
- windows
209+
- style_check
210+
- build_channels_linux
211+
- build_channels_macos
212+
- build_channels_windows
243213
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
244214
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
245215
# dependencies fails.

0 commit comments

Comments
 (0)