diff options
| author | seth <[email protected]> | 2024-09-08 23:39:48 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-09-13 17:03:00 -0400 |
| commit | cc183fccca73df619c78dd0ca2567ac547c56ad2 (patch) | |
| tree | a06a87049cd90e877e626b8ff31e27a373df8f39 /.github/workflows/ci.yaml | |
feat: initial commit
Diffstat (limited to '.github/workflows/ci.yaml')
| -rw-r--r-- | .github/workflows/ci.yaml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..b2d5df4 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,76 @@ +name: CI + +on: + push: + branches: [main] + paths: + - "**.lock" + - "**.rs" + - "**.nix" + - "Cargo.toml" + - ".github/workflows/ci.yaml" + pull_request: + paths: + - "**.lock" + - "**.rs" + - "**.nix" + - "Cargo.toml" + - ".github/workflows/ci.yaml" + workflow_dispatch: + +jobs: + build: + name: Build + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v14 + + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@v8 + + - name: Run build + run: | + nix build --print-build-logs .#check-version-test + + format: + name: Formatting + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v14 + + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@v8 + + - name: Run flake checks + run: | + nix build --print-build-logs .#check-formatting + + release-gate: + name: CI Release gate + needs: [build, format] + + if: ${{ always() }} + + runs-on: ubuntu-latest + + steps: + - name: Exit with error + if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} + run: exit 1 |
