Skip to content

Commit 5f3a038

Browse files
committed
CI: Don't build/run doctests in test-features jobs.
The doctests are built/run in separate test-doc jobs so we don't need to run them in test-features. This will speed up CI slightly. This will also work around some incompatibility introduced in recent Rust 1.87 and/or Nightly releases where linking the doctests fails when cross-compiling. (Rust recently started building doctests when cross-compiling where previously it ignored them during cross- compilation.)
1 parent 2a430d1 commit 5f3a038

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -492,17 +492,11 @@ jobs:
492492

493493
- if: ${{ !contains(matrix.host_os, 'windows') }}
494494
run: |
495-
mk/cargo.sh +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
495+
mk/cargo.sh +${{ matrix.rust_channel }} test --lib --tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
496496
497497
- if: ${{ contains(matrix.host_os, 'windows') }}
498498
run: |
499-
cargo +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
500-
501-
# --all-targets doesn't run doctests: https://github.com/rust-lang/cargo/issues/6669
502-
# Run doctests only on x86_64 to avoid cross-compilation hassles with `--no-run`.
503-
- if: ${{ !contains(matrix.host_os, 'windows') && contains(matrix.target, 'x86_64') }}
504-
run: |
505-
mk/cargo.sh +${{ matrix.rust_channel }} test -vv --doc --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
499+
cargo +${{ matrix.rust_channel }} test --lib --tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
506500
507501
# Check that all the needed symbol renaming was done.
508502
# TODO: Do this check on Windows too.

0 commit comments

Comments
 (0)