kill that last warning #44
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: { } | |
name: rust | |
env: | |
APT_PACKAGES: libclang-dev nettle-dev | |
CACHE_VERSION: v1 | |
RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" | |
SCCACHE_VERSION: 0.7.7 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cache/sccache/ | |
~/.rustup/ | |
target/ | |
restore-keys: | | |
${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }}-${{ github.job }}- | |
${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }} | |
- name: install system packages | |
run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt update | |
sudo DEBIAN_FRONTEND=noninteractive apt install -y ${{ env.APT_PACKAGES }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: cargo-bins/cargo-binstall@main | |
- run: cargo binstall -y sccache@${{ env.SCCACHE_VERSION }} | |
- run: cargo build --all --examples --release | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cache/sccache/ | |
~/.rustup/ | |
target/ | |
restore-keys: | | |
${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }}-${{ github.job }}- | |
${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }} | |
- name: install system packages | |
run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt update | |
sudo DEBIAN_FRONTEND=noninteractive apt install -y ${{ env.APT_PACKAGES }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: cargo-bins/cargo-binstall@main | |
- run: cargo binstall -y sccache@${{ env.SCCACHE_VERSION }} | |
- run: cargo test --all --examples --all-features | |
audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cache/sccache/ | |
~/.rustup/ | |
target/ | |
restore-keys: | | |
${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }}-${{ github.job }}- | |
${{ runner.os }}-${{ github.workflow }}-${{ env.CACHE_VERSION }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: cargo-bins/cargo-binstall@main | |
- run: cargo binstall -y cargo-audit | |
- run: cargo audit |