-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.88 KB
/
closures.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: Colmena
on:
push:
branches-ignore:
- nixos-legacy
- nixos-realise
workflow_call:
pull_request:
types: [opened,reopened]
jobs:
generate_matrix:
runs-on: ubuntu-latest
name: Generate hive list
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: cachix/install-nix-action@v30
name: Install Nix
- uses: actions/checkout@v4
- id: matrix
name: Run nix eval to generate node list
run: |
JSON=$(nix eval .#colmena --no-substitute --apply 'with builtins; x: filter (f: !elem f [ "defaults" "meta" ]) (attrNames x)' --json)
echo "matrix=$JSON" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
name: Build node
needs: generate_matrix
strategy:
# each closure is independent from each other
fail-fast: false
matrix:
node: ${{ fromJSON(needs.generate_matrix.outputs.matrix) }}
steps:
- name: Install QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: cachix/install-nix-action@v30
name: Install Nix
with:
extra_nix_config: |
extra-platforms = aarch64-linux i686-linux
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters = https://cache.nixos.org
substituters = https://cache.nixos.org
- uses: actions/checkout@v4
- name: Build ${{ matrix.node }}
run: |
nix run nixpkgs#colmena -- build --keep-result --no-build-on-target -v --on ${{ matrix.node }}
# - name: Attic Setup
# run: |
# nix profile install nixpkgs#attic-client
# attic login wires https://cache.wires.cafe ${{ secrets.ATTIC_TOKEN }}
# - name: Push closure to Attic
# run: |
# attic push lychee-config .gcroots/*