diff options
Diffstat (limited to '.github/workflows/ci.yaml')
| -rw-r--r-- | .github/workflows/ci.yaml | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 365325d..c3f7a7e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,39 +5,60 @@ on: branches: [main] paths: - "**.nix" - - "flake.lock" - "**.rs" - - "Cargo.toml" + - ".github/workflows/ci.yaml" - "Cargo.lock" + - "Cargo.toml" + - "flake.lock" pull_request: paths: - "**.nix" - - "flake.lock" - "**.rs" - - "Cargo.toml" + - ".github/workflows/ci.yaml" - "Cargo.lock" + - "Cargo.toml" + - "flake.lock" workflow_dispatch: jobs: build: name: Build - runs-on: ubuntu-latest + strategy: + matrix: + os: [macos-latest, windows-latest] + + runs-on: ${{ matrix.os }} steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 + uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run build run: | cargo build --locked --release + nix: + name: Nix + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v13 + + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@v7 + + - name: Run build + run: nix build --print-build-logs --show-trace + treefmt: name: Treefmt @@ -52,11 +73,11 @@ jobs: - name: Run check run: | - nix flake check --print-build-logs --show-trace + nix fmt -- --fail-on-change release-gate: name: CI Release gate - needs: [build, treefmt] + needs: [build, nix, treefmt] runs-on: ubuntu-latest |
