ci: add basic CI workflow

Runs cargo check, build, and test on ubuntu and macOS using the nightly
toolchain (required by parser's use of if_let_guard).
This commit is contained in:
Sylvestre Ledru
2026-04-30 17:36:52 +02:00
parent 8e2faf992e
commit c0d3a86461
+53
View File
@@ -0,0 +1,53 @@
on: [push, pull_request]
name: Basic CI
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check:
name: cargo check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace
build:
name: cargo build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo build --workspace
test:
name: cargo test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace