Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 05686c8

Browse files
committed
Merge #150: Build docs using nightly toolchain
2010e6b Build docs using nightly toolchain (Tobin C. Harding) Pull request description: In order to get access to the `--cfg docsrs` we need to use the nightly toolchain. Doing so means the CI docs build mirrors the docsrs docs build so better tests our docs build prior to release. ACKs for top commit: apoelstra: ACK 2010e6b Tree-SHA512: c52a46edd73d968b18960881d1b92bdfa0ffc0e4d0269c567f04b99aa4fde2af56358b154e521eb28a242a382b138e9d2cd076e24fbac1c39c57f6e655b63035
2 parents 029d665 + 2010e6b commit 05686c8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ on: [push, pull_request]
33
name: Continuous integration
44

55
jobs:
6-
bench_nightly:
7-
name: Nightly - ASan + Bench
6+
Nightly:
7+
name: Nightly - ASan + Bench + Docs
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
@@ -28,9 +28,13 @@ jobs:
2828
env:
2929
DO_BENCH: true
3030
run: ./contrib/test.sh
31+
- name: Building docs
32+
env:
33+
DO_DOCS: true
34+
run: ./contrib/test.sh
3135

32-
wasm:
33-
name: Stable - Docs / WebAssembly Build
36+
wasm:
37+
name: Stable - WebAssembly Build
3438
runs-on: ubuntu-latest
3539
strategy:
3640
matrix:
@@ -45,10 +49,6 @@ jobs:
4549
profile: minimal
4650
toolchain: ${{ matrix.rust }}
4751
override: true
48-
- name: Building docs
49-
env:
50-
DO_DOCS: true
51-
run: ./contrib/test.sh
5252
- name: Running WASM build
5353
env:
5454
DO_WASM: true

contrib/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ if [ "$DO_SCHEMARS_TESTS" = true ]; then
5151
(cd extended_tests/schemars && cargo test)
5252
fi
5353

54-
# Docs
54+
# Build the docs if told to (this only works with the nightly toolchain)
5555
if [ "$DO_DOCS" = true ]; then
56-
cargo doc --all --features="$FEATURES"
56+
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
5757
fi
5858

5959
# Webassembly stuff

0 commit comments

Comments
 (0)