Skip to content

Commit

Permalink
Separate check for docs into its own job
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 4, 2021
1 parent dcdf02b commit 3bdfdef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -117,6 +117,17 @@ jobs:
- name: loom
run: ./ci/crossbeam-epoch-loom.sh

# Check if the document can be generated without warning.
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup update nightly && rustup default nightly
- name: docs
run: ./ci/docs.sh

# This job doesn't actually test anything, but they're used to tell bors the
# build completed, as there is no practical way to detect when a workflow is
# successful listening to webhooks only.
Expand All @@ -133,6 +144,7 @@ jobs:
- rustfmt
- clippy
- loom
- docs
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
Expand Down
8 changes: 8 additions & 0 deletions ci/docs.sh
@@ -0,0 +1,8 @@
#!/bin/bash

cd "$(dirname "$0")"/..
set -ex

export RUSTDOCFLAGS="-D warnings"

cargo doc --no-deps --all --all-features
2 changes: 0 additions & 2 deletions ci/test.sh
Expand Up @@ -22,8 +22,6 @@ if [[ "$RUST_VERSION" == "nightly"* ]]; then
# Some crates have `nightly` feature, so run tests with --all-features.
cargo test --all --all-features --exclude benchmarks -- --test-threads=1

RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all --all-features

# Benchmarks are only checked on nightly because depending on unstable features.
cargo check --all --benches
cd crossbeam-channel/benchmarks
Expand Down

0 comments on commit 3bdfdef

Please sign in to comment.