Skip to content

ci: optimize GitHub workflows with caching, concurrency, timeouts, an… #155

ci: optimize GitHub workflows with caching, concurrency, timeouts, an…

ci: optimize GitHub workflows with caching, concurrency, timeouts, an… #155

Workflow file for this run

name: UB (undefined behavior) detection
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE*"
- ".github/workflows/docs.yml"
- "katex-header.html"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE*"
- ".github/workflows/docs.yml"
- "katex-header.html"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"
jobs:
ub-detection:
if: github.event.pull_request.draft == false
name: Check for undefined behaviour (UB)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run Miri
run: MIRIFLAGS="-Zmiri-strict-provenance" cargo +nightly miri test --lib