Skip to content

Commit e43bddc

Browse files
committed
Auto merge of #1925 - JohnTitor:tweak-gha, r=JohnTitor
Tweak GHA config to reduce bors time So, "bors time" with the current config is slow a bit (~ 1h30m). We could reduce this by separating style check and docs generation, tweaking `max-parallel`, let's try it out!
2 parents bfce704 + 6cef94e commit e43bddc

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

.github/workflows/bors.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ jobs:
7979
run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
8080
shell: bash
8181

82-
style_and_docs:
83-
name: Style and docs
82+
style_check:
83+
name: Style check
8484
runs-on: ubuntu-18.04
8585
strategy:
8686
fail-fast: true
@@ -93,16 +93,14 @@ jobs:
9393
run: sh ./ci/install-rust.sh
9494
- name: Check style
9595
run: sh ci/style.sh
96-
- name: Generate documentation
97-
run: LIBC_CI=1 sh ci/dox.sh
9896

9997
docker_linux_tier2:
10098
name: Docker Linux Tier2
101-
needs: [docker_linux_tier1, style_and_docs]
99+
needs: [docker_linux_tier1, style_check]
102100
runs-on: ubuntu-18.04
103101
strategy:
104102
fail-fast: true
105-
max-parallel: 10
103+
max-parallel: 12
106104
matrix:
107105
target: [
108106
aarch64-linux-android,
@@ -149,7 +147,7 @@ jobs:
149147
# devkitpro's pacman needs to be connected from Docker.
150148
docker_switch:
151149
name: Docker Switch
152-
needs: [docker_linux_tier1, style_and_docs]
150+
needs: [docker_linux_tier1, style_check]
153151
runs-on: ubuntu-18.04
154152
strategy:
155153
fail-fast: true
@@ -171,7 +169,7 @@ jobs:
171169
OS: linux
172170
strategy:
173171
fail-fast: true
174-
max-parallel: 4
172+
max-parallel: 5
175173
matrix:
176174
toolchain: [
177175
stable,
@@ -201,7 +199,7 @@ jobs:
201199
OS: macos
202200
strategy:
203201
fail-fast: true
204-
max-parallel: 3
202+
max-parallel: 4
205203
matrix:
206204
toolchain: [
207205
stable,
@@ -257,6 +255,22 @@ jobs:
257255
- name: Check breaking changes
258256
run: sh ci/semver.sh macos
259257

258+
docs:
259+
name: Generate documentation
260+
runs-on: ubuntu-18.04
261+
needs: docker_linux_tier2
262+
strategy:
263+
fail-fast: true
264+
steps:
265+
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
266+
with:
267+
github_token: "${{ secrets.GITHUB_TOKEN }}"
268+
- uses: actions/checkout@v2
269+
- name: Setup Rust toolchain
270+
run: sh ./ci/install-rust.sh
271+
- name: Generate documentation
272+
run: LIBC_CI=1 sh ci/dox.sh
273+
260274
# These jobs doesn't actually test anything, but they're only used to tell
261275
# bors the build completed, as there is no practical way to detect when a
262276
# workflow is successful listening to webhooks only.
@@ -272,12 +286,13 @@ jobs:
272286
docker_linux_tier2,
273287
macos,
274288
windows,
275-
style_and_docs,
289+
style_check,
276290
docker_switch,
277291
build_channels_linux,
278292
build_channels_macos,
279293
semver_linux,
280-
semver_macos
294+
semver_macos,
295+
docs,
281296
]
282297

283298
steps:
@@ -293,12 +308,13 @@ jobs:
293308
docker_linux_tier2,
294309
macos,
295310
windows,
296-
style_and_docs,
311+
style_check,
297312
docker_switch,
298313
build_channels_linux,
299314
build_channels_macos,
300315
semver_linux,
301-
semver_macos
316+
semver_macos,
317+
docs,
302318
]
303319

304320
steps:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# libc - Raw FFI bindings to platforms' system libraries
22

3-
[![Azure Status]][Azure] [![Cirrus CI Status]][Cirrus CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License]
3+
[![GHA Status]][GitHub Actions] [![Cirrus CI Status]][Cirrus CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License]
44

55
`libc` provides all of the definitions necessary to easily interoperate with C
66
code (or "C-like" code) on each of the platforms that Rust supports. This
@@ -94,8 +94,8 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
9494
for inclusion in `libc` by you, as defined in the Apache-2.0 license, shall be
9595
dual licensed as above, without any additional terms or conditions.
9696

97-
[Azure Status]: https://dev.azure.com/rust-lang2/libc/_apis/build/status/rust-lang.libc%20(1)?branchName=master
98-
[Azure]: https://dev.azure.com/rust-lang2/libc/_build/latest?definitionId=1&branchName=master
97+
[GitHub Actions]: https://github.com/rust-lang/libc/actions
98+
[GHA Status]: https://github.com/rust-lang/libc/workflows/CI/badge.svg
9999
[Cirrus CI]: https://cirrus-ci.com/github/rust-lang/libc
100100
[Cirrus CI Status]: https://api.cirrus-ci.com/github/rust-lang/libc.svg
101101
[crates.io]: https://crates.io/crates/libc

0 commit comments

Comments
 (0)