feat: use matrix for simpler and parallel host builds
Some checks failed
/ build-host (map[host:beefcake]) (push) Successful in 1m1s
/ build-host (map[host:dragon]) (push) Successful in 1m29s
/ build-host (map[host:foxtrot]) (push) Has been cancelled
/ build-host (map[host:router]) (push) Has been cancelled
/ build-devshell (push) Has been cancelled
/ build-host (map[host:flipflop]) (push) Has been cancelled
/ check (push) Has been cancelled
Some checks failed
/ build-host (map[host:beefcake]) (push) Successful in 1m1s
/ build-host (map[host:dragon]) (push) Successful in 1m29s
/ build-host (map[host:foxtrot]) (push) Has been cancelled
/ build-host (map[host:router]) (push) Has been cancelled
/ build-devshell (push) Has been cancelled
/ build-host (map[host:flipflop]) (push) Has been cancelled
/ check (push) Has been cancelled
Also some general cleanup of the workflow YAML
This commit is contained in:
parent
b42b6011d8
commit
e9b32c23f1
2 changed files with 21 additions and 53 deletions
|
@ -1,41 +1,25 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
check:
|
||||
build-host:
|
||||
runs-on: nixos-host
|
||||
strategy:
|
||||
matrix:
|
||||
info:
|
||||
- host: beefcake
|
||||
- host: router
|
||||
- host: dragon
|
||||
- host: foxtrot
|
||||
- host: flipflop
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build host
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#${{ matrix.info.host }} --accept-flake-config
|
||||
|
||||
build-devshell:
|
||||
runs-on: nixos-host
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# cache not needed since we now run on the host directly
|
||||
# - name: Load cached nix store
|
||||
# id: cache-nix-store
|
||||
# uses: actions/cache/restore@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ runner.os }}-nix-store
|
||||
|
||||
- name: Build server
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#beefcake --accept-flake-config
|
||||
|
||||
- name: Build router
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#router --accept-flake-config
|
||||
|
||||
- name: Build desktop
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#dragon --accept-flake-config
|
||||
|
||||
- name: Build laptop
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#foxtrot --accept-flake-config
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build default devShell
|
||||
run: |
|
||||
nix develop . --build
|
||||
|
||||
# - name: Save nix store
|
||||
# uses: actions/cache/save@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ steps.cache-nix-store.outputs.cache-primary-key }}
|
||||
nix develop . --build --accept-flake-config
|
||||
|
|
|
@ -3,23 +3,7 @@ jobs:
|
|||
check:
|
||||
runs-on: nixos-host
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# cache not needed since we now run on the host directly
|
||||
# - name: Load cached nix store
|
||||
# id: cache-nix-store
|
||||
# uses: actions/cache/restore@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ runner.os }}-nix-store
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check nix flake
|
||||
run: |
|
||||
nix flake check
|
||||
|
||||
# - name: Save nix store
|
||||
# uses: actions/cache/save@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ steps.cache-nix-store.outputs.cache-primary-key }}
|
||||
nix flake check --accept-flake-config
|
||||
|
|
Loading…
Add table
Reference in a new issue