Use Nix in CI #3269
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: 80ch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| jobs: | |
| build: | |
| if: ${{ ! contains( github.event.pull_request.labels.*.name, 'skip 80ch') }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - name: Checkout the OxCaml repo | |
| uses: actions/checkout@master | |
| - name: Checkout the parent branch | |
| run: git fetch origin HEAD --deepen 1 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v22 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Setup Magic Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@v2 | |
| - name: Check for new >80 character lines | |
| run: nix-shell --run "exec .github/workflows/80ch.sh" |