-
Notifications
You must be signed in to change notification settings - Fork 19
60 lines (60 loc) · 2.23 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: ci
on:
pull_request:
push: # This is only run when PRs are merged into master
branches:
- master
workflow_dispatch:
jobs:
nix_checks:
name: nix checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build -L .#checks.x86_64-linux.pytest-facts
- run: nix build -L .#checks.x86_64-linux.duplicates-facts
- run: nix build -L .#checks.x86_64-linux.perl-switches
- run: nix build -L .#checks.x86_64-linux.openwrt-golden
- run: nix build -L .#checks.x86_64-linux.formatting
nix_builds:
name: nix builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build -L .#massflash
- run: nix build -L .#scaleInventory
- run: nix build -L .#serverspec
nixos_configs_get:
name: nixos configurations get name
runs-on: ubuntu-latest
outputs:
nixosconfignames: ${{ steps.nixosconfigsget.outputs.nixosconfignames }}
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Get all NixOS configurations
id: nixosconfigsget
run: |
nixosconfignames=$(nix eval .\#nixosConfigurations --apply builtins.attrNames --json)
echo "$nixosconfignames"
echo "nixosconfignames=$nixosconfignames" >> $GITHUB_OUTPUT
nixos_configs_build:
name: build ${{ matrix.configName }} nixos configuration
needs: nixos_configs_get
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configName: ${{ fromJSON(needs.nixos_configs_get.outputs.nixosconfignames) }}
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build ${{ matrix.configName }} nixos configuration
run: |
nix build -L .#nixosConfigurations.${{ matrix.configName }}.config.system.build.toplevel