chore: change to use nixos-unstable instead of nixpkgs-unstable #180
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 and test flake outputs | |
on: | |
push: | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
branch: | |
description: Branch name to build on | |
default: "" | |
required: false | |
type: string | |
secrets: | |
CACHIX_AUTH_TOKEN: | |
required: true | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.branch }} | |
- name: Check Nix flake Nixpkgs inputs | |
uses: DeterminateSystems/flake-checker-action@main | |
build: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.host }}-${{ matrix.system }} | |
cancel-in-progress: true | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- host: nixe | |
system: x86_64 | |
- host: nixarr | |
system: x86_64 | |
- host: nixcloud | |
system: x86_64 | |
- host: nixdev | |
system: x86_64 | |
- host: nixio | |
system: x86_64 | |
- host: nixmon | |
system: x86_64 | |
- host: nixserv | |
system: x86_64 | |
name: Build ${{ matrix.host }} on ${{ matrix.system }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.branch }} | |
- name: Free Disk Space | |
uses: jlumbroso/free-disk-space@main | |
continue-on-error: true | |
with: | |
swap-storage: false | |
tool-cache: true | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup magic cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup cachix | |
uses: cachix/cachix-action@v14 | |
with: | |
name: racci | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Build ${{ matrix.host }} (x86_64) | |
if: matrix.system == 'x86_64' | |
env: | |
_system: ${{ matrix.system }}-linux | |
run: nix build --impure --accept-flake-config .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel | |
test: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.command }}-${{ matrix.system }} | |
cancel-in-progress: true | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- command: fmt -L -- --check . | |
system: x86_64 | |
- command: flake check --impure | |
system: x86_64 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.branch }} | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup magic cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup cachix | |
uses: cachix/cachix-action@v14 | |
with: | |
name: racci | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Run ${{ matrix.command }} on ${{ matrix.system }} | |
env: | |
_system: ${{ matrix.system }}-linux | |
run: nix ${{ matrix.command }} |