Build all NixOS configurations
This commit is contained in:
parent
c364015d08
commit
a9d97b6797
38
.github/workflows/test.yml
vendored
38
.github/workflows/test.yml
vendored
|
@ -3,19 +3,53 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
calculate-matrix:
|
||||||
|
name: Calculate build matrix
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v16
|
- uses: cachix/install-nix-action@v16
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
|
|
||||||
|
- name: Calculate build matrix
|
||||||
|
id: set-matrix
|
||||||
|
run: |
|
||||||
|
matrix=$(nix flake show --json | jq -c '.nixosConfigurations | keys')
|
||||||
|
echo "::set-output name=matrix::$matrix"
|
||||||
|
|
||||||
|
tests:
|
||||||
|
name: Build NixOS configurations
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- calculate-matrix
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
target: "${{ fromJson(needs.calculate-matrix.outputs.matrix) }}"
|
||||||
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
|
- uses: cachix/install-nix-action@v16
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
|
||||||
- uses: cachix/cachix-action@v10
|
- uses: cachix/cachix-action@v10
|
||||||
with:
|
with:
|
||||||
name: alejandro-dotfiles
|
name: alejandro-dotfiles
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
|
||||||
- run: nix-env -i nixos-rebuild -f '<nixpkgs>'
|
- run: nix-env -i nixos-rebuild -f '<nixpkgs>'
|
||||||
- run: nixos-rebuild build --flake .#gospel
|
|
||||||
|
- run: nixos-rebuild build --flake ".#${{ matrix.target }}"
|
||||||
|
|
||||||
- run: echo OK
|
- run: echo OK
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
htop
|
htop
|
||||||
ranger
|
ranger
|
||||||
lsd
|
lsd
|
||||||
|
jq
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
|
|
Loading…
Reference in a new issue