-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.09 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
name: "Build closures with Colmena"
on:
pull_request:
push:
jobs:
generate_matrix:
runs-on: ubuntu-latest
name: "Generate hive list"
secrets: inherit
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/bootstrap.yml
- 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
secrets: inherit
strategy:
# each closure is independent from each other
fail-fast: false
matrix:
node: ${{ fromJSON(needs.generate_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/bootstrap.yml
- name: Build ${{ matrix.node }}
run: |
nix run nixpkgs#colmena -- build --no-build-on-target -v --on ${{ matrix.node }}