Skip to content

fix audit

fix audit #36

Workflow file for this run

---
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 --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-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 binnstall -y cargo-audit
- run: cargo audit