Add a nix-based CI workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nix Build | |
| on: | |
| push: | |
| branches: [develop, main, master] | |
| pull_request: | |
| branches: [develop, main, master] | |
| workflow_dispatch: # For manual triggering | |
| schedule: | |
| - cron: "3 14 15 * *" # 14:03 on the 15th of every month (UTC) | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| compiler: ['ghc94', 'ghc96', 'ghc98', 'ghc910', 'ghc912'] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Enable cachix | |
| uses: cachix/cachix-action@v16 | |
| with: | |
| name: neil-mayhew | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - name: Build with ${{ matrix.compiler }} | |
| id: build | |
| run: nix build -f shell.nix | |
| --argstr compiler ${{ matrix.compiler }} | |
| --print-out-paths | cachix push neil-mayhew |