docs: add notes on using cache #78
This file contains 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: Build/Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
name: Build/Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Use magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Check for compile errors | |
run: | | |
nix develop .# -c zig build check | |
nix develop .# -c zig build -Dflake=false check | |
- name: Run tests | |
run: nix develop .# -c zig build test | |
- name: Build Nix packages | |
run: nix build .#{nixos,nixosLegacy} |