GitHub Actions CI Setup
Use the install-nix action (avoid DetSys actions) and invoke Nix to build:
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v34
- run: nix build # Or, better, build *all* flake outputs
Caching the Nix store (plain `nix build`, no Vira)
When building directly with nix build on GitHub runners (instead of vira ci), cache /nix/store across runs with