Add CI
Nix build / nix-build (default) (push) Successful in 2m27s Details
Nix build / nix-flake-check (push) Successful in 55s Details

This commit is contained in:
maralorn 2023-11-26 13:48:57 +01:00
parent 0271404637
commit b9a943b687
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
name: Nix build
on: [push]
run-name: Test and build flake
jobs:
nix-build:
runs-on: nix
strategy:
matrix:
attribute:
- default
env:
HOME: .
steps:
- uses: actions/checkout@v3
- name: Configuring remote builders
run: |
mkdir -p ~/.config/nix
cp $(builders-configurator) ~/.config/nix/machines
echo "builders = @$(pwd)/.config/nix/machines" >> ~/.config/nix/nix.conf
- run: nix build --log-format bar-with-logs .#${{ matrix.attribute }} -v
- run: archive-nix-path
nix-flake-check:
runs-on: nix
env:
HOME: .
steps:
- uses: actions/checkout@v3
- name: Configuring remote builders
run: |
mkdir -p ~/.config/nix
cp $(builders-configurator) ~/.config/nix/machines
echo "builders = @$(pwd)/.config/nix/machines" >> ~/.config/nix/nix.conf
- run: nix flake check --log-format bar-with-logs -v