Defaulting to max-jobs = auto should improve build times by using more cores. Setting always-allow-substitutes to true should cause all nix derivations to be cached on cachix, which should improve performance of the MacOS job dramatically, when no rebuilds need to happen.
26 lines
718 B
YAML
26 lines
718 B
YAML
name: Setup Nix
|
|
|
|
description: Installs nix, sets up cachix and installs a subset of tooling.
|
|
|
|
inputs:
|
|
authToken:
|
|
description: Token to pass to cachix
|
|
tools:
|
|
description: Tools to install with nix-env -iA <tools>
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: nixbuild/nix-quick-install-action@60e9c39264d4714139af3cdf15f691b19eec3530 # v28
|
|
with:
|
|
nix_conf: |-
|
|
always-allow-substitutes = true
|
|
max-jobs = auto
|
|
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
|
|
with:
|
|
name: postgrest
|
|
authToken: ${{ inputs.authToken }}
|
|
- if: ${{ inputs.tools }}
|
|
run: nix-env -f default.nix -iA ${{ inputs.tools }}
|
|
shell: bash
|