From 30f0653cd912a0e00b63684b83e0bfc2fedd448b Mon Sep 17 00:00:00 2001 From: Borislav Borisov Date: Sat, 14 Mar 2026 13:22:42 +0000 Subject: [PATCH] ci: Add GitHub Actions workflow Build matrix covers Linux (x86_64, x86), macOS (x86_64, aarch64), and Windows (x86_64). Caches Rust dependencies via rust-cache. --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 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..f126ba9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: [ "trunk" ] + tags: [ 'v*' ] + pull_request: + branches: [ "trunk" ] + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build on ${{ matrix.platform.runner }} ${{ matrix.platform.target }} + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + # Linux + - runner: ubuntu-22.04 + target: x86_64 + - runner: ubuntu-22.04 + target: x86 + # macOS + - runner: macos-15-intel + target: x86_64 + - runner: macos-latest + target: aarch64 + # Windows + - runner: windows-latest + target: x86_64 + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + + - name: Build + run: cargo build --release --verbose