47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Build Rust binary
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
name: Build on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Update toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: nightly
|
|
components: clippy, rustfmt, miri
|
|
# run: |
|
|
# rustup update
|
|
# rustup toolchain install nightly --component miri clippy rustfmt
|
|
# rustup override set nightly
|
|
- name: Audit
|
|
run: |
|
|
cargo install --force cargo-audit
|
|
cargo generate-lockfile
|
|
cargo audit
|
|
- name: Lint
|
|
run: |
|
|
cargo fmt -- --check
|
|
cargo clippy -- -D warnings
|
|
- name: Test
|
|
run: |
|
|
cargo check
|
|
cargo test --all
|
|
- name: Build
|
|
run: |
|
|
cargo build --release
|
|
- name: Check with miri
|
|
run: |
|
|
cargo miri run |