Merge rust-bitcoin/rust-bitcoin#858: Build the docs with test.sh
0d36455d74
Build the docs with test.sh (Tobin Harding)8163497ab3
Use correct indentation (Tobin Harding)3786680cc7
Use correct script name (Tobin Harding) Pull request description: We currently build the docs as a separate CI job, we can however just do it as part of the `Tests` job using the nightly toolchain. Conditionally build the docs based on a `DO_DOCS` env var. Note, uses `--cfg docsrs` so can only be built run with nightly toolchain. - Patch 1: Fixes the incorrect file naming `ci.sh` -> `test.sh` in `CONTRIBUTING.md`. - Patch 2 - 4: Do trivial cleanup of `test.sh`. - Patch 5: Does the fix described above. Resolves: #850 ACKs for top commit: Kixunil: ACK0d36455d74
apoelstra: ACK0d36455d74
dr-orlovsky: ACK0d36455d74
Tree-SHA512: c33c8df687c2115477eae9888b80d4e744d7b68b598694cf17220dd11098f33ba23c0b33e6f7d291572187942c472d1bc9cbb5217d3d83d41906a97c0b3417e5
This commit is contained in:
commit
a8c9ea6b91
|
@ -24,6 +24,7 @@ jobs:
|
|||
DO_BENCH: true
|
||||
AS_DEPENDENCY: true
|
||||
DO_NO_STD: true
|
||||
DO_DOCS: true
|
||||
- rust: 1.29.0
|
||||
env:
|
||||
AS_DEPENDENCY: true
|
||||
|
@ -82,20 +83,6 @@ jobs:
|
|||
- name: run cross test
|
||||
run: cross test --target s390x-unknown-linux-gnu
|
||||
|
||||
Docs:
|
||||
name: Docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Crate
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout Toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Create Doc
|
||||
run: cargo doc
|
||||
Embedded:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
|
@ -128,7 +128,7 @@ PR authors may also find it useful to run the following script locally in order
|
|||
to check that each of the commits within the PR satisfies the requirements
|
||||
above, before submitting the PR to review:
|
||||
```shell script
|
||||
BITCOIN_MSRV=1.29.0 ./contrib/ci.sh
|
||||
BITCOIN_MSRV=1.29.0 ./contrib/test.sh
|
||||
```
|
||||
Please replace the value in `BITCOIN_MSRV=1.29.0` with the current MSRV from
|
||||
[README.md].
|
||||
|
|
|
@ -37,27 +37,27 @@ cargo test --verbose
|
|||
|
||||
if [ "$DO_NO_STD" = true ]
|
||||
then
|
||||
echo "********* Testing no-std build *************"
|
||||
# Build no_std, to make sure that cfg(test) doesn't hide any issues
|
||||
cargo build --verbose --features="no-std" --no-default-features
|
||||
echo "********* Testing no-std build *************"
|
||||
# Build no_std, to make sure that cfg(test) doesn't hide any issues
|
||||
cargo build --verbose --features="no-std" --no-default-features
|
||||
|
||||
# Build std + no_std, to make sure they are not incompatible
|
||||
cargo build --verbose --features="no-std"
|
||||
# Build std + no_std, to make sure they are not incompatible
|
||||
cargo build --verbose --features="no-std"
|
||||
|
||||
# Test no_std
|
||||
cargo test --verbose --features="no-std" --no-default-features
|
||||
# Test no_std
|
||||
cargo test --verbose --features="no-std" --no-default-features
|
||||
|
||||
# Build all features
|
||||
cargo build --verbose --features="no-std $FEATURES" --no-default-features
|
||||
# Build all features
|
||||
cargo build --verbose --features="no-std $FEATURES" --no-default-features
|
||||
|
||||
# Build specific features
|
||||
for feature in ${FEATURES}
|
||||
do
|
||||
cargo build --verbose --features="no-std $feature"
|
||||
done
|
||||
# Build specific features
|
||||
for feature in ${FEATURES}
|
||||
do
|
||||
cargo build --verbose --features="no-std $feature"
|
||||
done
|
||||
|
||||
cargo run --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
|
||||
cargo run --no-default-features --features no-std --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
|
||||
cargo run --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
|
||||
cargo run --no-default-features --features no-std --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
|
||||
fi
|
||||
|
||||
# Test each feature
|
||||
|
@ -67,6 +67,11 @@ do
|
|||
cargo test --verbose --features="$feature"
|
||||
done
|
||||
|
||||
# Build the docs if told to (this only works with the nightly toolchain)
|
||||
if [ "$DO_DOCS" = true ]; then
|
||||
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
|
||||
fi
|
||||
|
||||
# Fuzz if told to
|
||||
if [ "$DO_FUZZ" = true ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue