chore: Prepare for release #8
Workflow file for this run
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
name: datta | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
clippy-rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Run rustfmt | |
run: | |
cargo fmt --all -- --check --verbose | |
- name: Run clippy | |
uses: clechasseur/rs-clippy-check@v3 | |
with: | |
args: -- -D warnings --verbose | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build | |
run: cargo build --verbose --tests --benches | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Generate docs | |
run: cargo doc --no-deps | |
code-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install grcov | |
env: | |
GRCOV_LINK: https://github.com/mozilla/grcov/releases/download | |
GRCOV_VERSION: v0.8.7 | |
run: | | |
curl -L "$GRCOV_LINK/$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" | | |
tar xj -C $HOME/.cargo/bin | |
- name: Install llvm-tools-preview | |
run: | | |
rustup component add llvm-tools-preview | |
# Not necessary on a newly created image, but strictly advised | |
- name: Run cargo clean | |
run: | | |
cargo clean | |
- name: Run tests | |
env: | |
CARGO_INCREMENTAL: 0 | |
LLVM_PROFILE_FILE: "datta-%p-%m.profraw" | |
RUSTFLAGS: > | |
-Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code | |
-Coverflow-checks=off | |
RUSTDOCFLAGS: > | |
-Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code | |
-Coverflow-checks=off | |
run: | | |
cargo test --verbose | |
- name: Get coverage data for codecov | |
run: | | |
grcov . --binary-path ./target/debug/ -s . -t lcov --branch \ | |
--ignore-not-existing --ignore "/*" --ignore "../*" -o lcov.info | |
- name: Codecov upload | |
uses: codecov/codecov-action@v4 | |
with: | |
files: lcov.info | |
dependency-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Install cargo-udeps | |
env: | |
UDEPS_LINK: https://github.com/est31/cargo-udeps/releases/download | |
UDEPS_VERSION: v0.1.45 | |
run: | | |
curl -L "$UDEPS_LINK/$UDEPS_VERSION/cargo-udeps-$UDEPS_VERSION-x86_64-unknown-linux-gnu.tar.gz" | | |
tar xz -C $HOME/.cargo/bin --strip-components 2 | |
- name: Install cargo-deny | |
env: | |
DENY_LINK: https://github.com/EmbarkStudios/cargo-deny/releases/download | |
DENY_VERSION: 0.14.15 | |
run: | | |
curl -L "$DENY_LINK/$DENY_VERSION/cargo-deny-$DENY_VERSION-x86_64-unknown-linux-musl.tar.gz" | | |
tar xz -C $HOME/.cargo/bin --strip-components 1 | |
- name: Install cargo-audit | |
env: | |
AUDIT_LINK: https://github.com/rustsec/rustsec/releases/download/cargo-audit%2F | |
AUDIT_VERSION: v0.20.0 | |
run: | | |
curl -L "$AUDIT_LINK$AUDIT_VERSION/cargo-audit-x86_64-unknown-linux-musl-$AUDIT_VERSION.tgz" | | |
tar xzv -C $HOME/.cargo/bin --strip-components 1 | |
- name: Run cargo-udeps | |
run: | | |
cargo +nightly udeps --all-targets | |
- name: Run cargo-deny | |
run: | | |
cargo deny init | |
cargo deny check bans | |
# cargo deny check licenses | |
- name: Run cargo-audit | |
run: | | |
cargo audit |