Skip to content

rust

rust #62

Workflow file for this run

name: rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "38 18 * * *"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install up-to-date toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
clippy:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install up-to-date toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install required CLI tools (clippy-sarif and sarif-fmt)
uses: taiki-e/install-action@v2
with:
tool: clippy-sarif, sarif-fmt
- name: Run Clippy
run: cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
category: Clippy
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install up-to-date Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-msrv
run: cargo install cargo-msrv --all-features
- name: Check msrv
run: cargo msrv --output-format json verify -- cargo check
- name: run cargo msrv on verify failure
if: ${{ failure() }}
run: cargo msrv --output-format json -- cargo check
build-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install up-to-date toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install up-to-date toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- name: Run Miri setup
run: cargo miri setup
- name: Run Miri
run: cargo miri test