Skip to content

Commit 2f93bfb

Browse files
committed
Auto merge of #3519 - JohnTitor:tweak-libc-0.2-ci, r=JohnTitor
Tweak libc-0.2 CI - Removes bors-related action - Listens to the labeled event not to wait for merge queue to be enabled
2 parents 11f7c7b + 0b9596b commit 2f93bfb

File tree

1 file changed

+16
-42
lines changed

1 file changed

+16
-42
lines changed

.github/workflows/full_ci.yml

+16-42
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ name: full CI
22

33
on:
44
merge_group:
5-
push:
6-
branches: ['main', 'libc-0.2']
5+
pull_request:
6+
branches:
7+
- libc-0.2
8+
types:
9+
- labeled
710

811
jobs:
912
docker_linux_tier1:
13+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
1014
permissions:
11-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
1215
contents: read # to fetch code (actions/checkout)
1316

1417
name: Docker Linux Tier1
@@ -21,18 +24,15 @@ jobs:
2124
x86_64-unknown-linux-gnu,
2225
]
2326
steps:
24-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
25-
with:
26-
github_token: "${{ secrets.GITHUB_TOKEN }}"
2727
- uses: actions/checkout@v4
2828
- name: Setup Rust toolchain
2929
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
3030
- name: Execute run-docker.sh
3131
run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}
3232

3333
macos:
34+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
3435
permissions:
35-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
3636
contents: read # to fetch code (actions/checkout)
3737

3838
name: macOS
@@ -44,18 +44,15 @@ jobs:
4444
x86_64-apple-darwin,
4545
]
4646
steps:
47-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
48-
with:
49-
github_token: "${{ secrets.GITHUB_TOKEN }}"
5047
- uses: actions/checkout@v4
5148
- name: Setup Rust toolchain
5249
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
5350
- name: Execute run.sh
5451
run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
5552

5653
windows:
54+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
5755
permissions:
58-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
5956
contents: read # to fetch code (actions/checkout)
6057

6158
name: Windows
@@ -77,9 +74,6 @@ jobs:
7774
ARCH: i686
7875
- target: i686-pc-windows-msvc
7976
steps:
80-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
81-
with:
82-
github_token: "${{ secrets.GITHUB_TOKEN }}"
8377
- uses: actions/checkout@v4
8478
- name: Self-update rustup
8579
run: rustup self update
@@ -92,25 +86,22 @@ jobs:
9286
shell: bash
9387

9488
style_check:
89+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
9590
permissions:
96-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
9791
contents: read # to fetch code (actions/checkout)
9892

9993
name: Style check
10094
runs-on: ubuntu-22.04
10195
steps:
102-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
103-
with:
104-
github_token: "${{ secrets.GITHUB_TOKEN }}"
10596
- uses: actions/checkout@v4
10697
- name: Setup Rust toolchain
10798
run: sh ./ci/install-rust.sh
10899
- name: Check style
109100
run: sh ci/style.sh
110101

111102
docker_linux_tier2:
103+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
112104
permissions:
113-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
114105
contents: read # to fetch code (actions/checkout)
115106

116107
name: Docker Linux Tier2
@@ -150,9 +141,6 @@ jobs:
150141
# x86_64-unknown-redox,
151142
]
152143
steps:
153-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
154-
with:
155-
github_token: "${{ secrets.GITHUB_TOKEN }}"
156144
- uses: actions/checkout@v4
157145
- name: Setup Rust toolchain
158146
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
@@ -163,7 +151,6 @@ jobs:
163151
# Because of this, only the nightly compiler can be used on these targets.
164152
docker_linux_build_std:
165153
permissions:
166-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
167154
contents: read # to fetch code (actions/checkout)
168155

169156
if: ${{ false }} # This is currently broken
@@ -178,9 +165,6 @@ jobs:
178165
armv7-unknown-linux-uclibceabihf
179166
]
180167
steps:
181-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
182-
with:
183-
github_token: "${{ secrets.GITHUB_TOKEN }}"
184168
- uses: actions/checkout@v4
185169
- name: Setup Rust toolchain
186170
run: TOOLCHAIN=nightly INSTALL_RUST_SRC=1 sh ./ci/install-rust.sh
@@ -189,26 +173,23 @@ jobs:
189173

190174
# devkitpro's pacman needs to be connected from Docker.
191175
docker_switch:
176+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
192177
permissions:
193-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
194178
contents: read # to fetch code (actions/checkout)
195179

196180
name: Docker Switch
197181
needs: [docker_linux_tier1, style_check]
198182
runs-on: ubuntu-22.04
199183
steps:
200-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
201-
with:
202-
github_token: "${{ secrets.GITHUB_TOKEN }}"
203184
- uses: actions/checkout@v4
204185
- name: Setup Rust toolchain
205186
run: sh ./ci/install-rust.sh
206187
- name: Execute run-docker.sh
207188
run: LIBC_CI=1 sh ./ci/run-docker.sh switch
208189

209190
build_channels_linux:
191+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
210192
permissions:
211-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
212193
contents: read # to fetch code (actions/checkout)
213194

214195
name: Build Channels Linux
@@ -233,16 +214,14 @@ jobs:
233214
1.30.0,
234215
]
235216
steps:
236-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
237-
with:
238-
github_token: "${{ secrets.GITHUB_TOKEN }}"
239217
- uses: actions/checkout@v4
240218
- name: Setup Rust toolchain
241219
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
242220
- name: Execute build.sh
243221
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
244222

245223
build_channels_macos:
224+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
246225
permissions:
247226
contents: read # to fetch code (actions/checkout)
248227

@@ -268,16 +247,14 @@ jobs:
268247
- { toolchain: 1.30.0, os: macos-11 }
269248
runs-on: ${{ matrix.target.os }}
270249
steps:
271-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
272-
with:
273-
github_token: "${{ secrets.GITHUB_TOKEN }}"
274250
- uses: actions/checkout@v4
275251
- name: Setup Rust toolchain
276252
run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
277253
- name: Execute build.sh
278254
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh
279255

280256
build_channels_windows:
257+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
281258
permissions:
282259
contents: read # to fetch code (actions/checkout)
283260

@@ -305,16 +282,13 @@ jobs:
305282
shell: bash
306283

307284
check_cfg:
285+
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
308286
permissions:
309-
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
310287
contents: read # to fetch code (actions/checkout)
311288

312289
name: "Check #[cfg]s"
313290
runs-on: ubuntu-22.04
314291
steps:
315-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
316-
with:
317-
github_token: "${{ secrets.GITHUB_TOKEN }}"
318292
- uses: actions/checkout@v4
319293
- name: Setup Rust toolchain
320294
run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
@@ -325,7 +299,7 @@ jobs:
325299
# protection, rather than having to add each job separately.
326300
success:
327301
name: Success
328-
runs-on: ubuntu-latest
302+
runs-on: ubuntu-22.04
329303
needs: [
330304
docker_linux_tier1,
331305
docker_linux_tier2,

0 commit comments

Comments
 (0)