Improve CI pipeline
We have unnecessary runs of the `test.sh` script. We can simplify the CI pipeline and at the same time improve the docs build by using `--cfg docsrs`. - Remove the `wasm` job, replace it by enabling the `DO_WASM` env var for the stable toolchain run in the `Tests` job. - Add `--cfg docrs` flag to the docs build and set the `DO_DOCS` env var as part of the nightly toolchain run in `Tests` job. The end result is one less run of the `test.sh` script and better test coverage.
This commit is contained in:
parent
69bbe859df
commit
0fd07ad059
|
@ -29,40 +29,26 @@ jobs:
|
||||||
DO_BENCH: true
|
DO_BENCH: true
|
||||||
run: ./contrib/test.sh
|
run: ./contrib/test.sh
|
||||||
|
|
||||||
wasm:
|
|
||||||
name: Stable - Docs / WebAssembly Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
steps:
|
|
||||||
- name: Checkout Crate
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Checkout Toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.rust }}
|
|
||||||
override: true
|
|
||||||
- name: Building docs
|
|
||||||
env:
|
|
||||||
DO_DOCS: true
|
|
||||||
run: ./contrib/test.sh
|
|
||||||
- name: Running WASM build
|
|
||||||
env:
|
|
||||||
DO_WASM: true
|
|
||||||
run: ./contrib/test.sh
|
|
||||||
|
|
||||||
Tests:
|
Tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust:
|
include:
|
||||||
- 1.29.0
|
- rust: stable
|
||||||
- beta
|
env:
|
||||||
- stable
|
DO_FEATURE_MATRIX: true
|
||||||
|
DO_WASM: true
|
||||||
|
- rust: beta
|
||||||
|
env:
|
||||||
|
DO_FEATURE_MATRIX: true
|
||||||
|
- rust: nightly
|
||||||
|
env:
|
||||||
|
DO_FEATURE_MATRIX: true
|
||||||
|
DO_DOCS: true
|
||||||
|
- rust: 1.29.0
|
||||||
|
env:
|
||||||
|
DO_FEATURE_MATRIX: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Crate
|
- name: Checkout Crate
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -76,7 +62,6 @@ jobs:
|
||||||
if: matrix.rust == '1.29.0'
|
if: matrix.rust == '1.29.0'
|
||||||
run: cargo generate-lockfile --verbose && cargo update -p cc --precise "1.0.41" --verbose
|
run: cargo generate-lockfile --verbose && cargo update -p cc --precise "1.0.41" --verbose
|
||||||
- name: Running cargo
|
- name: Running cargo
|
||||||
env:
|
env: ${{ matrix.env }}
|
||||||
DO_FEATURE_MATRIX: true
|
|
||||||
run: ./contrib/test.sh
|
run: ./contrib/test.sh
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ if [ "$DO_FEATURE_MATRIX" = true ]; then
|
||||||
cargo run --example generate_keys --features=std,rand-std
|
cargo run --example generate_keys --features=std,rand-std
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Docs
|
# Build the docs if told to (this only works with the nightly toolchain)
|
||||||
if [ "$DO_DOCS" = true ]; then
|
if [ "$DO_DOCS" = true ]; then
|
||||||
cargo doc --all --features="$FEATURES"
|
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Webassembly stuff
|
# Webassembly stuff
|
||||||
|
|
Loading…
Reference in New Issue