Merge rust-bitcoin/rust-secp256k1#420: Improve CI script

58db1b6753 Run WASM for multiple toolchains (Tobin Harding)
946ac3b51e Do docs build in Nightly job (Tobin Harding)
f7bc7d3728 Install clang to run adress sanitizer (Tobin Harding)
96685c571d Remove unnecessary matrix (Tobin Harding)
a8a679ed7d Re-name nightly CI job to Nightly (Tobin Harding)
9c9d622b0e Remove trailing whitespace (Tobin Harding)

Pull request description:

  Improve the CI pipeline. Done while investigating #419. This PR now only includes the GitHub actions changes, I'm moving the `test.sh` changes to a https://github.com/rust-bitcoin/rust-secp256k1/pull/422 because they cannot be merged yet.

  (Please note, this PR has been heavily re-worked so discussion below may be confusing to reviewers new to the PR.)

ACKs for top commit:
  apoelstra:
    ACK 58db1b6753
  thomaseizinger:
    ACK 58db1b6753

Tree-SHA512: 5520cf7a7ea0ba701aeaf6b97150416192c0629df8b65545a20d8937a4d76bd323a0d7a875deccb7ce9adc4f3a423e6cd27b300682f206f79407f5ab4eaa5ddb
This commit is contained in:
Andrew Poelstra 2022-04-01 17:06:53 +00:00
commit 8caf41d55c
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 35 additions and 24 deletions

View File

@ -3,21 +3,19 @@ on: [push, pull_request]
name: Continuous integration
jobs:
bench_nightly:
name: Nightly - ASan + Bench
Nightly:
name: Nightly - ASan + Bench + Docs
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
steps:
- name: Checkout Crate
- name: Checkout Crate
uses: actions/checkout@v2
- name: Install clang for ASan
run: sudo apt-get install -y clang
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: nightly
override: true
components: rust-src
- name: Running address sanitizer
@ -28,27 +26,17 @@ jobs:
env:
DO_BENCH: true
run: ./contrib/test.sh
- name: Building docs
env:
DO_DOCS: true
run: ./contrib/test.sh
Tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: stable
env:
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
rust: [stable, beta, nightly, 1.29.0]
steps:
- name: Checkout Crate
uses: actions/checkout@v2
@ -62,6 +50,29 @@ jobs:
if: matrix.rust == '1.29.0'
run: cargo generate-lockfile --verbose && cargo update -p cc --precise "1.0.41" --verbose
- name: Running cargo
env: ${{ matrix.env }}
env:
DO_FEATURE_MATRIX: true
run: ./contrib/test.sh
WASM:
name: WASM
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly] # No 1.29 because WASM requires Rust 1.30
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Install clang
run: sudo apt-get install -y clang-9
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rust-src
- name: Running WASM tests
env:
DO_WASM: true
run: ./contrib/test.sh