-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3c1b576 ci: Rework github actions script (Tobin C. Harding) d41bcc8 ci: Use dtonlnay runner for WASM (Tobin C. Harding) Pull request description: Rework the github actions script in line with `rust-bitcoin`, notably: - Only run WASM test using stable toolchain (is this ok? cargo-cult-programmed from rust-bitcoin) - Use dtonlay runner - Split jobs up by toolchain - Add Arch32bit job - Add Cross test job - Run linter as part of the test script - Test docs build using stable toolchain and nightly toolchain ACKs for top commit: apoelstra: ACK 3c1b576 Tree-SHA512: 9b7ec90fc0815de9433231a74af3993fa64f0308623f73bf3fcd1be34e48785088f4de19825fa86d140bb658eacfd606d124556fc389fbcd7fa37c0cafb8fd0a
- Loading branch information
Showing
2 changed files
with
96 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,93 +3,116 @@ on: [push, pull_request] | |
name: Continuous integration | ||
|
||
jobs: | ||
Nightly: | ||
name: Nightly - ASan + Bench + Docs | ||
Stable: | ||
name: Test - stable toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
- name: Install clang for ASan | ||
run: sudo apt-get install -y clang | ||
uses: actions/checkout@v3 | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
components: rust-src | ||
- name: Check formatting | ||
# https://github.com/dtolnay/rust-toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Running test script | ||
env: | ||
DO_FMT: true | ||
DO_LINT: true | ||
DO_DOCS: true | ||
DO_FEATURE_MATRIX: true | ||
run: ./contrib/test.sh | ||
- name: Running address sanitizer | ||
env: | ||
DO_ASAN: true | ||
|
||
Beta: | ||
name: Test - beta toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v3 | ||
- name: Checkout Toolchain | ||
uses: dtolnay/rust-toolchain@beta | ||
- name: Running test script | ||
run: ./contrib/test.sh | ||
- name: Running benchmarks | ||
|
||
Nightly: | ||
name: Test - nightly toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v3 | ||
- name: Checkout Toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: Install src | ||
run: rustup component add rust-src | ||
- name: Running test script | ||
env: | ||
DO_FMT: true | ||
DO_BENCH: true | ||
run: ./contrib/test.sh | ||
- name: Building docs | ||
env: | ||
DO_DOCS: true | ||
DO_DOCSRS: true | ||
DO_ASAN: true | ||
run: ./contrib/test.sh | ||
|
||
Tests: | ||
name: Tests | ||
MSRV: | ||
name: Test - 1.48.0 toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [stable, beta, nightly, 1.48.0] | ||
fail-fast: false | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Running cargo | ||
uses: dtolnay/[email protected] | ||
- name: Running test script | ||
env: | ||
DO_FEATURE_MATRIX: true | ||
run: ./contrib/test.sh | ||
|
||
Arch32bit: | ||
name: Test 32-bit version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v3 | ||
- name: Checkout Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Add architecture i386 | ||
run: sudo dpkg --add-architecture i386 | ||
- name: Install i686 gcc | ||
run: sudo apt-get update -y && sudo apt-get install -y gcc-multilib | ||
- name: Install target | ||
run: rustup target add i686-unknown-linux-gnu | ||
- name: Run test on i686 | ||
run: cargo test --target i686-unknown-linux-gnu | ||
|
||
Cross: | ||
name: Cross test | ||
if: ${{ !github.event.act }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v3 | ||
- name: Checkout Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Install target | ||
run: rustup target add s390x-unknown-linux-gnu | ||
- name: install cross | ||
run: cargo install cross --locked | ||
- name: run cross test | ||
run: cross test --target s390x-unknown-linux-gnu | ||
|
||
WASM: | ||
name: WASM | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [stable, beta, nightly] # wasm-pack doesn't support rust 1.41.1 | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Install clang | ||
run: sudo apt-get install -y clang | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: rust-src | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Running WASM tests | ||
env: | ||
DO_WASM: true | ||
run: ./contrib/test.sh | ||
|
||
Clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --features=rand-std,recovery,lowmemory,global-context --all-targets -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters