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
on: [push, pull_request] | |
name: Continuous integration | |
jobs: | |
fmt: | |
name: Rustfmt | |
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 | |
components: rustfmt | |
- name: Running cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
simpcli_test: | |
name: SimpCLI Tests | |
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: Running cargo test | |
run: | | |
cd simpcli | |
cargo test | |
bench_test: | |
name: Jets-Bench Tests | |
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: Running cargo test | |
run: | | |
cargo install cargo-criterion | |
cd jets-bench | |
cargo test | |
cargo criterion --no-run | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.58.0 | |
- beta | |
- nightly | |
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: Running cargo test | |
env: | |
FEATURES: bitcoin elements test-utils | |
run: | | |
if cargo --version | grep "1\.58"; then | |
# 1.0.100 uses syn 2.0 which requires edition 2021 | |
cargo update -p serde_json --precise 1.0.99 | |
# 1.0.157 uses syn 2.0 | |
cargo update -p serde --precise 1.0.156 | |
# 1.0.31 uses proc-macro 1.0.66 | |
cargo update -p quote --precise 1.0.30 | |
# 1.0.66 uses edition 2021 | |
cargo update -p proc-macro2 --precise 1.0.65 | |
# 1.8.0 requires cargo 1.60+ | |
cargo update -p regex --precise 1.7.0 | |
# 1.5.0 uses edition 2021 | |
cargo update -p byteorder --precise 1.4.3 | |
fi | |
for f in $FEATURES; do echo "Features: $f" && cargo test --no-default-features --features="$f"; done | |
cd simplicity-sys | |
cargo test --no-default-features | |
cargo test --features="test-utils" | |
echo "No default features" && cargo test --no-default-features | |
echo "All features" && cargo test --all-features | |
ignored: | |
name: Ignored Tests | |
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: Running cargo test | |
run: | | |
cargo test -- --ignored | |
clippy: | |
name: Clippy | |
strategy: | |
matrix: | |
rust: | |
- stable | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Crate | |
uses: actions/checkout@v2 | |
- name: Checkout Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: clippy | |
- name: Running cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets -- --deny warnings |