diff options
Diffstat (limited to '.github/workflows/ci.yaml')
| -rw-r--r-- | .github/workflows/ci.yaml | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..63a8080 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,65 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + build: + name: Build outputs (${{ matrix.system }}) + + strategy: + matrix: + include: + - system: x86_64-linux + os: ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + - name: Clear disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: cachix/install-nix-action@v27 + + - name: Setup Cachix + uses: cachix/cachix-action@v15 + with: + name: getchoo + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + + - name: Run build + env: + SYSTEM: ${{ matrix.system }} + run: | + nix run \ + github:Mic92/nix-fast-build -- \ + --no-nom \ + --skip-cached \ + --systems "$SYSTEM" \ + --option allow-import-from-derivation false \ + --flake '.#hydraJobs' + + build-gate: + name: Build gate + + if: ${{ always() }} + needs: build + + runs-on: ubuntu-latest + + steps: + - name: Exit with error + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1 |
