Timer features (#14) #37
This file contains hidden or 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
name: Rust CI/CD | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Rust Toolchain Setup | |
uses: dtolnay/[email protected] | |
- name: Install | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
cargo install cargo-tarpaulin | |
- name: Test | |
run: | | |
rustup component add clippy | |
cargo clippy | |
cargo test | |
cargo test --features tick_event | |
cargo test --features timer_registration | |
cargo test --features tick_event,timer_registration | |
- name: Bench | |
run: | | |
cargo bench | |
cargo bench --features tick_event | |
cargo bench --features timer_registration | |
cargo bench --features tick_event,timer_registration | |
- name: Build | |
run: | | |
cargo build | |
cargo build --release | |
cargo build --features tick_event | |
cargo build --features timer_registration | |
cargo build --features tick_event,timer_registration | |
- name: Generate Coverage Report | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
cargo tarpaulin --engine llvm --out xml --output-dir target --all-features | |
- name: Upload coverage reports to Codecov | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: target/cobertura.xml | |
# - name: Miri | |
# run: | | |
# rustup toolchain install nightly --component miri | |
# rustup override set nightly | |
# cargo miri setup | |
# cargo miri test |