Skip to content

Commit da45f42

Browse files
d-e-s-oinsearchoflosttime
authored andcommitted
Make cargo doc check a separate job in CI
Currently, our CI script is basically completely serialized: all the steps that we perform on a given toolchain run after each other. That has a negative impact on turn around time, because the checks that fail most frequently (due to small nits pointed out by clippy or a format violation detected by rustfmt) are run pretty much last. Essentially, we don't fail fast. As a first step towards improving the situation, this change makes the cargo-doc check a separate job that can run in parallel to everything else. It means that we now only check docs on the most recent stable toolchain, but that's entirely sufficient. Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent b86fd8c commit da45f42

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/rust.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,18 @@ jobs:
6363
- if: ${{ matrix.rust != 'nightly' }}
6464
name: Run clippy
6565
run: cargo clippy --tests -- -D warnings
66-
- if: ${{ matrix.rust != 'nightly' }}
67-
name: Check documentation
68-
env:
69-
RUSTDOCFLAGS: '-D warnings'
70-
run: cargo doc --no-deps
66+
cargo-doc:
67+
name: Check documentation
68+
runs-on: ubuntu-latest
69+
env:
70+
RUSTDOCFLAGS: '-D warnings'
71+
steps:
72+
- uses: actions/checkout@v3
73+
- name: Install deps
74+
run: sudo apt-get install -y libelf-dev
75+
- uses: actions-rs/toolchain@v1
76+
with:
77+
profile: minimal
78+
toolchain: stable
79+
override: true
80+
- run: cargo doc --no-deps

0 commit comments

Comments
 (0)