-
Notifications
You must be signed in to change notification settings - Fork 12
82 lines (71 loc) · 2.87 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on: [push]
jobs:
try-develop:
runs-on: ubuntu-latest
steps:
- run: git config --global init.defaultBranch main
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v12
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210207_fd6eaa1/install
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v8
with:
name: maxhbr
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix develop --command env
build-os:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- { host: x1extremeG2 , action: "build --dry-run" }
- { host: x1extremeG2 , action: "build" }
- { host: workstation , action: "build --dry-run" }
- { host: workstation , action: "build" }
- { host: nas , action: "build --dry-run" }
- { host: nas , action: "build" }
fail-fast: false
steps:
- run: git config --global init.defaultBranch main
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v12
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
# extra_nix_config: |
# experimental-features = nix-command flakes
# - uses: cachix/cachix-action@v8
# with:
# name: maxhbr
# signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix --experimental-features 'nix-command flakes' develop --command nix ${{ matrix.config.action }} -L '.#nixosConfigurations.'${{ matrix.config.host }}'.config.system.build.toplevel'
# - run: nix --experimental-features 'nix-command flakes' develop --command nixos-rebuild ${{ matrix.config.action }} --flake '.#'${{ matrix.config.host }}
# build-iso:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# config:
# - { name: "minimal", config: ./iso/minimal.nix, mode: "" }
# - { name: "desktop", config: ./iso/desktop.nix, mode: "--dry-run" }
# fail-fast: false
# steps:
# - run: git config --global init.defaultBranch main
# - uses: actions/[email protected]
# - uses: cachix/install-nix-action@v12
# - uses: cachix/cachix-action@v8
# with:
# name: maxhbr
# signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# - run: NIX_PATH="nixpkgs=$(pwd)/nixpkgs:nixos-config=$(pwd)/misc/empty_nixos_config.nix" ./iso/build-iso-image.sh "$(readlink -f ${{ matrix.config.config }} )" ${{ matrix.config.mode }}
# - uses: Thog/action-equals@v1
# id: isNonDry
# with:
# a: ${{ matrix.config.mode }}
# b: ""
# - uses: actions/upload-artifact@v2
# with:
# name: myconfig-iso-${{ matrix.config.name }}
# path: '__out/**/*.iso'
# if: steps.isNonDry.outputs.result