Skip to content

Support backtracking and Checkpoints across nodes (#68) #349

Support backtracking and Checkpoints across nodes (#68)

Support backtracking and Checkpoints across nodes (#68) #349

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
# Daily
schedule:
- cron: "0 4 1/20 * *"
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that
# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
RUST_LOG: info
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
test:
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, nightly]
steps:
# setup
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- uses: taiki-e/install-action@nextest
# tests
- name: Library Tests | Default Features
run: cargo nextest run --profile ci-default-features --tests --examples --verbose
- name: Library Tests | All Features
run: cargo nextest run --profile ci-all-features --tests --examples --verbose --all-features
- name: Library Tests | All Features (Release)
run: cargo nextest run --profile ci-all-features-release --tests --examples --verbose --all-features --release
- name: Doc Tests
run: cargo test --doc --verbose --all-features
# upload test results
- uses: actions/upload-artifact@v3
if: success() || failure() # run this step even if previous step failed
with:
name: test-results-${{ matrix.rust }}-${{ matrix.os }}
path: target/nextest/**/junit-*.xml
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- name: Cargo Check
run: cargo check --all-targets --all-features
clippy:
name: Clippy
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
components: clippy
- run: cargo clippy --all-targets --all-features --verbose -- -D warnings
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
components: rustfmt
- run: cargo fmt -p cstree -- --check
rustdoc:
name: Check doc links
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings --cfg doc_cfg
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- run: cargo doc --all-features --document-private-items --no-deps
miri-test:
name: Miri ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
components: miri
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance
- run: cargo miri test --verbose --all-features
sanitizers:
name: ${{ matrix.sanitizer }} sanitizer
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, memory, thread, leak]
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
components: rust-src
- name: Test with sanitizer
env:
RUSTFLAGS: -Zsanitizer=${{ matrix.sanitizer }}
RUSTDOCFLAGS: -Zsanitizer=${{ matrix.sanitizer }}
# only needed by asan
ASAN_OPTIONS: detect_stack_use_after_return=1
# Asan's leak detection occasionally complains
# about some small leaks if backtraces are captured,
# so ensure they're not
RUST_BACKTRACE: 0
run: |
cargo test -Zbuild-std --verbose --target=x86_64-unknown-linux-gnu --all-features