Skip to content

Add security audit to CI. #33

Add security audit to CI.

Add security audit to CI. #33

Workflow file for this run

name: Rust
on: [push, pull_request, workflow_dispatch]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUSTFLAGS: "-D warnings"
# Disable debuginfo for faster compile
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_PROFILE_TEST_DEBUG: 0
CARGO_PROFILE_BENCH_DEBUG: 0
CI: 1
CARGO_MAKE_CI: 1
CARGO_MAKE_RUN_CLIPPY: 1
CARGO_MAKE_BUILD_BENCH: 1
jobs:
rust:
name: Rust
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
target: [x86_64, i686, aarch64]
rust:
- stable
- beta
- nightly
- 1.70.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Linux Install Rust toolchain
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}-unknown-linux-gnu
components: clippy,rustfmt
- name: Windows Install Rust toolchain
if: ${{ matrix.os == 'windows-latest' }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}-pc-windows-msvc
components: clippy,rustfmt
- name: Install Cargo Make
if: ${{ matrix.target == 'x86_64' }}
uses: davidB/rust-cargo-make@v1
- name: cargo-make ci-flow
if: ${{ matrix.target == 'x86_64' }}
run: cargo make ci-flow
- name: linux cargo-make build-only
if: ${{ matrix.target != 'x86_64' && matrix.os == 'ubuntu-latest' }}
run: cargo build --target ${{ matrix.target }}-unknown-linux-gnu
- name: windows cargo-make build-only
if: ${{ matrix.target != 'x86_64' && matrix.os == 'windows-latest' }}
run: cargo build --all-features --target ${{ matrix.target }}-pc-windows-msvc
- name: cargo fmt
if: ${{ matrix.rust == 'nightly' }}
run: cargo fmt -- --check
miri:
name: Miri
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: miri
- name: Run Miri
uses: actions-rs/cargo@v1
with:
command: miri
args: test
env:
MIRIFLAGS: -Zmiri-strict-provenance
version:
name: Rust
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.60.0
- 1.63.0
- 1.66.0
- 1.69.0
- 1.70.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Linux Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build, Check, and Test
run: |
cargo check
cargo build
cargo test
devtest:
name: Rust
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Linux Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75.0
- name: Build, Check, and Test
run: |
cargo check
cargo build
cargo test
cd devel
cargo test