From c0d3a86461fe81944dab47bf8eb8149af4cb8c75 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 30 Apr 2026 17:36:52 +0200 Subject: [PATCH] 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). --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fc7b941 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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