jj/.github/workflows/nix-linux.yml
Austin Seipp c780e6bc1f chore(github): migrate nix workflow to use nix-installer & magic-nix-cache
Summary: The Determinate Systems Nix installer is fast and importantly includes
Flake support by default on new installs.

Magic Nix Cache will help ease the build time a little by making sure things
like downloads from crates.io remain cached between builds; in the future if we
ever need to add any custom builds to the Nix expression it will come really in
handy. But in my experience I don't think it should slow down much, and might
speed some things up a whole lot.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I56e1592cbaa6c7a43b5bd57972b98ada
2023-07-12 17:07:38 +01:00

28 lines
690 B
YAML

name: Nix on Linux
on:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
nix:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
mode: [ "flake check", "build" ]
runs-on: ${{ matrix.os }}
name: nix-build
timeout-minutes: 20
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@65d7c888b2778e8cf30a07a88422ccb23499bfb8
- uses: DeterminateSystems/magic-nix-cache-action@5cc3a5e24b688cf7e0ea986ab07a9d3d32c34a95
- run: nix ${{ matrix.mode }} --print-build-logs --show-trace