Skip to content

Commit 1493ca6

Browse files
yvan-srakajfrochesamrose
authored
ci: Custom GitHub Runners for Nix Builds (#1745)
* chores(ci): opted-out nix-fast-build * chores(ci): set up nix-github-actions * chores(ci): comment out vestigal testinfra-ami-build * chores(ci): use custom github runners * chores(ci): use nix-eval-jobs and sets AWS creds to /etc/nix/aws * feat(ci): do not build if already cached * chore: improve reproducibility of postgresql builds Do not create postgresql package that depends on the runtime evaluation context as that harms reproducibility. * chore: remove nix-github-actions dependency * feat(ci): split nix build workflow into separate extensions and checks jobs Split the monolithic nix-build job into two workflows: one for building PostgreSQL extensions and another for checks. Building extensions can be resource-intensive and time-consuming, so isolating them allows for better resource allocation and parallelism. Once they are built, the checks job can run tests and validations on the already built extensions. * feat(ci): extract nix build setup into reusable action and split builds by architecture Extract AWS credential setup and nix build steps into a composite action to reduce duplication. Split extension builds into separate jobs per architecture (aarch64-linux, aarch64-darwin, x86_64-linux) and update matrix generation to group packages by system. * fix(ci): do not hide cached builds * Revert "fix(ci): do not hide cached builds" This reverts commit 9d41b1e. * chore: Temporarily disable x86_64-linux builds We don't have a self hosted runner for x86_64-linux at the moment * fix: sort packages and filter out cached ones * fix: do not skip checks-matrix if dependencies are skipped * fix: do not return debug fields in GitHub Actions matrix output * debugging * fix(ci): use !cancelled() instead of always() for dependent job conditions Replace always() with !cancelled() to prevent jobs from running when the workflow is cancelled. Add explicit success/skip conditions for dependent jobs to ensure proper workflow execution flow. * fix(ci): stop chaining aws roles We couldn't set duration to 18000 seconds when chaining roles. * ci: run nixos test on aarch64-linux * fix(ci): disable eval-cache and accept-flake-config * ci: split checks build jobs by system architecture Refactor GitHub Actions workflow to run build checks in parallel across different architectures (aarch64-linux, aarch64-darwin) with separate job matrices. * fix(ci): use correct architecture name in aarch64-linux builds * fix(ci): do not try to build already cached checks * fix(ci): simplify GitHub Actions workflow for Nix builds Create a single nix-eval job to determine packages to build, removing redundant extension and check matrices. * Revert "chores(ci): comment out vestigal testinfra-ami-build" This reverts commit e2db368. * feat(ci): eval on blacksmith-32vcpu-ubuntu-2404 * feat: add ephemeral Nix install action for GitHub runners * refactor(ci): extract nix eval into reusable workflow * feat: enable x86_64-linux builds in CI * feat: add PostgreSQL version to GitHub Actions job names When building a postgres extension, the build matrix may include multiple time the same extension for different PostgreSQL versions. This change makes it easier to identify which job corresponds to which PostgreSQL version in the workflow runs. * fix: disable treefmt flake check treefmt is already included in the pre-commit hooks check. * feat: run actionlint on new GitHub Actions workflows * chore: improve github matrix script type annotations * feat: optimize CI runner selection based on package size Dynamically assign larger runners (32vcpu) for Rust and PostGIS extensions while using smaller runners (8vcpu) for standard packages. * chore: fix package meta maintainers format * chore: create a nix package for generating GitHub Actions matrix Add pytest tests for the package Add nix-eval-jobs in path for the package * fix: configure runner according to the matrix job The matrix job returns the type of runner, so we can configure the nix installation step accordingly. * Update nix-eval-jobs Our changes were merged upstream, so we can now track the original repository again. * refactor(ci): standardize nix installation and disable cache push by default - Replace DeterminateSystems/nix-installer-action with custom nix-install-ephemeral action across all workflows - Change default push-to-cache from 'true' to 'false' to prevent unnecessary nix/aws configurations - Explicitly enable push-to-cache only for nix-build and nix-eval workflows where caching is beneficial * feat: use big-parallel to identify large packages * fix(ci): ensure x86_64-linux build is considered in testinfra and test workflows * fix: nix devShell inclusion condition * fix(ci): eval should fail if github-matrix run fails * fix(ci): remove redundant build psql bundle step * fix: reduce ARM runner size from 8vcpu to 4vcpu for ephemeral builds We might not need the full 8vcpu for aarch64-linux builds, so this change reduces the runner size to 4vcpu to wait less for available blacksmith runners. * feat: do not return empty matrices if no package has to be built * feat: fail pipeline if nix evaluation fails * Update nix/ext/pgvector.nix Co-authored-by: samrose <samuel@supabase.io> * fix: add skip job only for systems that don't have any job * fix(github-matrix): handle evaluation errors without deadlock Fix github-matrix that would hang when nix-eval-jobs encountered errors due to subprocess pipe deadlock - stderr buffer would fill while reading stdout. This change ensure that evaluation errors are visible and the workflow fails properly while still showing which packages succeeded. * feat(github-matrix): integrate github-action-utils for better error visibility Integrates github-action-utils library to improve error and warning visibility in GitHub Actions UI through workflow command annotations. * feat(github-matrix): group evaluation errors by message Refactor error handling to collect and group evaluation errors similar to warnings. Errors with the same message are now displayed together with a list of affected attributes. * fix(github-matrix): improve multiline error display in GitHub Actions Extract core error messages and format them better for GitHub Actions annotations. * fix(ci): skip run-testinfra and run-tests when nix-eval fails Add nix-eval to needs dependencies and check its result in conditional expressions to prevent downstream test jobs from running when evaluation fails. * chore(github-matrix): update message when there are no build for a system * fix(github-matrix): backward compatibility for Result access We are running an older version of the 'result' library that uses '_value' instead of 'ok_value' to access the successful result of a computation. * refactor: migrate from packages to legacyPackages for PostgreSQL extensions To be able to build extensions versions packages separately in CI, we need to expose them in a nested structure. It is currently not possible to do so with the flattened packages structure, as the individual extension packages are not directly accessible. In this change, we replace the flattened package structure with nested legacyPackages to improve discoverability of individual extension packages. * refactor(nix): remove "-all" suffix from extension package names Simplify extension package naming by removing the redundant "-all" suffix that was appended to pname attributes. * refactor(ci): split nix build jobs into separate packages and checks workflows To make sure we only build what is necessary, we start building packages first, then run checks once all packages are built successfully. * feat: use 8 vCPU runner for aarch64 builds Use the same 8 vCPU runner for aarch64 builds as used for x86_64 builds to improve build performance. * feat(ci): test blacksmith stickydisk for eval --------- Co-authored-by: Jean-François Roche <jfroche@pyxel.be> Co-authored-by: samrose <samuel@supabase.io>
1 parent a431c10 commit 1493ca6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1281
-184
lines changed

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
self-hosted-runner:
2+
labels:
3+
- aarch64-darwin
4+
- aarch64-linux
5+
- blacksmith-32vcpu-ubuntu-2404
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Configure Nix on self hosted runners'
2+
description: 'Sets up AWS credentials to push to the Nix binary cache'
3+
inputs:
4+
aws-role-duration:
5+
description: 'AWS role session duration in seconds'
6+
required: false
7+
default: '18000'
8+
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- name: aws-creds
13+
uses: aws-actions/configure-aws-credentials@v4.3.1
14+
with:
15+
disable-retry: true
16+
aws-region: us-east-2
17+
role-to-assume: arn:aws:iam::436098097459:role/nix-artifacts-deploy-role # supabase-dev
18+
role-session-name: gha-oidc-${{ github.run_id }}
19+
role-duration-seconds: ${{ inputs.aws-role-duration }}
20+
21+
- name: Write creds files
22+
shell: bash
23+
run: |
24+
umask 006
25+
cat > /etc/nix/aws/nix-aws-credentials <<EOF
26+
[ci-uploader]
27+
aws_access_key_id = ${AWS_ACCESS_KEY_ID}
28+
aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}
29+
aws_session_token = ${AWS_SESSION_TOKEN}
30+
EOF

.github/workflows/nix-build.yml

Lines changed: 180 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -14,77 +14,201 @@ permissions:
1414
contents: write
1515
packages: write
1616

17-
concurrency:
18-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19-
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
20-
2117
jobs:
22-
build-run-image:
18+
nix-eval:
19+
uses: ./.github/workflows/nix-eval.yml
20+
secrets:
21+
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
22+
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
23+
24+
nix-build-packages-aarch64-linux:
25+
name: >-
26+
${{ matrix.name }}${{ matrix.postgresql_version && format(' - Postgres {0}', matrix.postgresql_version) || '' }}
27+
(aarch64-linux)
28+
needs: nix-eval
29+
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }}
30+
if: ${{ fromJSON(needs.nix-eval.outputs.packages_matrix).aarch64_linux != null }}
31+
strategy:
32+
fail-fast: false
33+
max-parallel: 5
34+
matrix: ${{ fromJSON(needs.nix-eval.outputs.packages_matrix).aarch64_linux }}
35+
steps:
36+
- name: Checkout Repo
37+
if: ${{ matrix.attr != '' }}
38+
uses: actions/checkout@v4
39+
- name: Install nix (ephemeral)
40+
if: ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
41+
uses: ./.github/actions/nix-install-ephemeral
42+
with:
43+
push-to-cache: 'true'
44+
env:
45+
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
46+
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
47+
- name: Install nix (self-hosted)
48+
if: ${{ matrix.attr != '' && matrix.runs_on.group == 'self-hosted-runners-nix' }}
49+
uses: ./.github/actions/nix-install-self-hosted
50+
- name: nix build
51+
if: ${{ matrix.attr != '' }}
52+
shell: bash
53+
run: nix build --accept-flake-config -L .#${{ matrix.attr }}
54+
55+
nix-build-checks-aarch64-linux:
56+
name: >-
57+
${{ matrix.name }}${{ matrix.postgresql_version && format(' - Postgres {0}', matrix.postgresql_version) || '' }}
58+
(aarch64-linux)
59+
needs: [nix-eval, nix-build-packages-aarch64-linux]
60+
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }}
61+
if: ${{ fromJSON(needs.nix-eval.outputs.checks_matrix).aarch64_linux != null }}
62+
strategy:
63+
fail-fast: false
64+
max-parallel: 5
65+
matrix: ${{ fromJSON(needs.nix-eval.outputs.checks_matrix).aarch64_linux }}
66+
steps:
67+
- name: Checkout Repo
68+
if: ${{ matrix.attr != '' }}
69+
uses: actions/checkout@v4
70+
- name: Install nix (ephemeral)
71+
if: ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
72+
uses: ./.github/actions/nix-install-ephemeral
73+
with:
74+
push-to-cache: 'true'
75+
env:
76+
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
77+
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
78+
- name: Install nix (self-hosted)
79+
if: ${{ matrix.attr != '' && matrix.runs_on.group == 'self-hosted-runners-nix' }}
80+
uses: ./.github/actions/nix-install-self-hosted
81+
- name: nix build
82+
if: ${{ matrix.attr != '' }}
83+
shell: bash
84+
run: nix build --accept-flake-config -L .#${{ matrix.attr }}
85+
86+
nix-build-packages-aarch64-darwin:
87+
name: >-
88+
${{ matrix.name }}${{ matrix.postgresql_version && format(' - Postgres {0}', matrix.postgresql_version) || '' }}
89+
(aarch64-darwin)
90+
needs: nix-eval
91+
runs-on: ${{ matrix.attr != '' && matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }}
92+
if: ${{ fromJSON(needs.nix-eval.outputs.packages_matrix).aarch64_darwin != null }}
93+
strategy:
94+
fail-fast: false
95+
max-parallel: 5
96+
matrix: ${{ fromJSON(needs.nix-eval.outputs.packages_matrix).aarch64_darwin }}
97+
steps:
98+
- name: Checkout Repo
99+
if: ${{ matrix.attr != '' }}
100+
uses: actions/checkout@v4
101+
- name: Install nix
102+
if: ${{ matrix.attr != '' }}
103+
uses: ./.github/actions/nix-install-self-hosted
104+
- name: nix build
105+
if: ${{ matrix.attr != '' }}
106+
shell: bash
107+
run: nix build --accept-flake-config -L .#${{ matrix.attr }}
108+
109+
nix-build-checks-aarch64-darwin:
110+
name: >-
111+
${{ matrix.name }}${{ matrix.postgresql_version && format(' - Postgres {0}', matrix.postgresql_version) || '' }}
112+
(aarch64-darwin)
113+
needs: [nix-eval, nix-build-packages-aarch64-darwin]
114+
runs-on: ${{ matrix.attr != '' && matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }}
115+
if: ${{ fromJSON(needs.nix-eval.outputs.checks_matrix).aarch64_darwin != null }}
116+
strategy:
117+
fail-fast: false
118+
max-parallel: 5
119+
matrix: ${{ fromJSON(needs.nix-eval.outputs.checks_matrix).aarch64_darwin }}
120+
steps:
121+
- name: Checkout Repo
122+
if: ${{ matrix.attr != '' }}
123+
uses: actions/checkout@v4
124+
- name: Install nix
125+
if: ${{ matrix.attr != '' }}
126+
uses: ./.github/actions/nix-install-self-hosted
127+
- name: nix build
128+
if: ${{ matrix.attr != '' }}
129+
shell: bash
130+
run: nix build --accept-flake-config -L .#${{ matrix.attr }}
131+
132+
nix-build-packages-x86_64-linux:
133+
name: >-
134+
${{ matrix.name }}${{ matrix.postgresql_version && format(' - Postgres {0}', matrix.postgresql_version) || '' }}
135+
(x86_64-linux)
136+
needs: nix-eval
137+
runs-on: ${{ matrix.attr != '' && matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }}
138+
if: ${{ fromJSON(needs.nix-eval.outputs.packages_matrix).x86_64_linux != null }}
23139
strategy:
24140
fail-fast: false
25-
matrix:
26-
include:
27-
- runner: blacksmith-32vcpu-ubuntu-2404
28-
arch: amd64
29-
- runner: blacksmith-32vcpu-ubuntu-2404-arm
30-
arch: arm64
31-
- runner: macos-latest-xlarge
32-
arch: arm64
33-
runs-on: ${{ matrix.runner }}
34-
timeout-minutes: 180
141+
max-parallel: 5
142+
matrix: ${{ fromJSON(needs.nix-eval.outputs.packages_matrix).x86_64_linux }}
35143
steps:
36144
- name: Checkout Repo
37-
uses: supabase/postgres/.github/actions/shared-checkout@HEAD
38-
- uses: ./.github/actions/nix-install-ephemeral
145+
if: ${{ matrix.attr != '' }}
146+
uses: actions/checkout@v4
147+
- name: Install nix
148+
if: ${{ matrix.attr != '' }}
149+
uses: ./.github/actions/nix-install-ephemeral
39150
with:
40-
push-to-cache: ${{ github.secret_source == 'Actions' && 'true' || 'false' }}
151+
push-to-cache: 'true'
41152
env:
42153
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
43154
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
44-
- name: Aggressive disk cleanup for DuckDB build
45-
if: matrix.runner == 'macos-latest-xlarge'
46-
run: |
47-
nix --version
48-
echo "=== BEFORE CLEANUP ==="
49-
df -h
50-
# Remove major space consumers
51-
sudo rm -rf /usr/share/dotnet || true
52-
sudo rm -rf /usr/local/lib/android || true
53-
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform || true
54-
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/watchOS.platform || true
55-
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/tvOS.platform || true
56-
# Clean everything possible
57-
sudo rm -rf /opt/ghc || true
58-
sudo rm -rf /usr/local/share/boost || true
59-
sudo rm -rf /opt/homebrew || true
60-
sudo xcrun simctl delete all 2>/dev/null || true
61-
# Aggressive cache cleanup
62-
sudo rm -rf /System/Library/Caches/* 2>/dev/null || true
63-
sudo rm -rf /Library/Caches/* 2>/dev/null || true
64-
sudo rm -rf ~/Library/Caches/* 2>/dev/null || true
65-
sudo rm -rf /private/var/log/* 2>/dev/null || true
66-
sudo rm -rf /tmp/* 2>/dev/null || true
67-
echo "=== AFTER CLEANUP ==="
68-
df -h
69-
-
70-
name: Build psql bundle
71-
run: >
72-
nix run "github:Mic92/nix-fast-build?rev=b1dae483ab7d4139a6297e02b6de9e5d30e43d48"
73-
-- --skip-cached --no-nom ${{ matrix.runner == 'macos-latest-xlarge' && '--max-jobs 1' || '' }} --copy-to "s3://nix-postgres-artifacts?secret-key=/etc/nix/nix-secret-key"
74-
--flake ".#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem')"
155+
- name: nix build
156+
if: ${{ matrix.attr != '' }}
157+
shell: bash
158+
run: nix build --accept-flake-config -L .#${{ matrix.attr }}
159+
160+
nix-build-checks-x86_64-linux:
161+
name: >-
162+
${{ matrix.name }}${{ matrix.postgresql_version && format(' - Postgres {0}', matrix.postgresql_version) || '' }}
163+
(x86_64-linux)
164+
needs: [nix-eval, nix-build-packages-x86_64-linux]
165+
runs-on: ${{ matrix.attr != '' && matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }}
166+
if: ${{ fromJSON(needs.nix-eval.outputs.checks_matrix).x86_64_linux != null }}
167+
strategy:
168+
fail-fast: false
169+
max-parallel: 5
170+
matrix: ${{ fromJSON(needs.nix-eval.outputs.checks_matrix).x86_64_linux }}
171+
steps:
172+
- name: Checkout Repo
173+
if: ${{ matrix.attr != '' }}
174+
uses: actions/checkout@v4
175+
- name: Install nix
176+
if: ${{ matrix.attr != '' }}
177+
uses: ./.github/actions/nix-install-ephemeral
178+
with:
179+
push-to-cache: 'true'
75180
env:
76-
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
77-
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
78-
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }}
181+
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
182+
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
183+
- name: nix build
184+
if: ${{ matrix.attr != '' }}
185+
shell: bash
186+
run: nix build --accept-flake-config -L .#${{ matrix.attr }}
79187

80188
run-testinfra:
81-
needs: build-run-image
82-
if: ${{ success() }}
189+
needs: [nix-eval, nix-build-packages-aarch64-linux, nix-build-checks-aarch64-linux, nix-build-packages-aarch64-darwin, nix-build-checks-aarch64-darwin, nix-build-packages-x86_64-linux, nix-build-checks-x86_64-linux]
190+
if: |
191+
!cancelled() &&
192+
needs.nix-eval.result == 'success' &&
193+
(needs.nix-build-packages-aarch64-linux.result == 'skipped' || needs.nix-build-packages-aarch64-linux.result == 'success') &&
194+
(needs.nix-build-checks-aarch64-linux.result == 'skipped' || needs.nix-build-checks-aarch64-linux.result == 'success') &&
195+
(needs.nix-build-packages-aarch64-darwin.result == 'skipped' || needs.nix-build-packages-aarch64-darwin.result == 'success') &&
196+
(needs.nix-build-checks-aarch64-darwin.result == 'skipped' || needs.nix-build-checks-aarch64-darwin.result == 'success') &&
197+
(needs.nix-build-packages-x86_64-linux.result == 'skipped' || needs.nix-build-packages-x86_64-linux.result == 'success') &&
198+
(needs.nix-build-checks-x86_64-linux.result == 'skipped' || needs.nix-build-checks-x86_64-linux.result == 'success')
83199
uses: ./.github/workflows/testinfra-ami-build.yml
84200
secrets:
85201
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
86202

87203
run-tests:
88-
needs: build-run-image
89-
if: ${{ success() }}
204+
needs: [nix-eval, nix-build-packages-aarch64-linux, nix-build-checks-aarch64-linux, nix-build-packages-aarch64-darwin, nix-build-checks-aarch64-darwin, nix-build-packages-x86_64-linux, nix-build-checks-x86_64-linux]
205+
if: |
206+
!cancelled() &&
207+
needs.nix-eval.result == 'success' &&
208+
(needs.nix-build-packages-aarch64-linux.result == 'skipped' || needs.nix-build-packages-aarch64-linux.result == 'success') &&
209+
(needs.nix-build-checks-aarch64-linux.result == 'skipped' || needs.nix-build-checks-aarch64-linux.result == 'success') &&
210+
(needs.nix-build-packages-aarch64-darwin.result == 'skipped' || needs.nix-build-packages-aarch64-darwin.result == 'success') &&
211+
(needs.nix-build-checks-aarch64-darwin.result == 'skipped' || needs.nix-build-checks-aarch64-darwin.result == 'success') &&
212+
(needs.nix-build-packages-x86_64-linux.result == 'skipped' || needs.nix-build-packages-x86_64-linux.result == 'success') &&
213+
(needs.nix-build-checks-x86_64-linux.result == 'skipped' || needs.nix-build-checks-x86_64-linux.result == 'success')
90214
uses: ./.github/workflows/test.yml

.github/workflows/nix-eval.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Nix Eval
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
packages_matrix:
7+
description: 'Generated build matrix for packages'
8+
value: ${{ jobs.eval.outputs.packages_matrix }}
9+
checks_matrix:
10+
description: 'Generated build matrix for checks'
11+
value: ${{ jobs.eval.outputs.checks_matrix }}
12+
secrets:
13+
DEV_AWS_ROLE:
14+
required: false
15+
NIX_SIGN_SECRET_KEY:
16+
required: false
17+
18+
jobs:
19+
eval:
20+
runs-on: blacksmith-32vcpu-ubuntu-2404
21+
outputs:
22+
packages_matrix: ${{ steps.set-matrix.outputs.packages_matrix }}
23+
checks_matrix: ${{ steps.set-matrix.outputs.checks_matrix }}
24+
steps:
25+
- name: Checkout Repo
26+
uses: actions/checkout@v4
27+
- name: Install nix
28+
uses: ./.github/actions/nix-install-ephemeral
29+
with:
30+
push-to-cache: 'true'
31+
env:
32+
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
33+
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
34+
- name: Restart Nix Daemon
35+
run: |
36+
sudo mv /nix/var/nix/daemon-socket/socket /tmp
37+
- name: Mount Nix cache disk
38+
uses: useblacksmith/stickydisk@v1
39+
with:
40+
key: ${{ github.repository }}-nix-cache-eval-${{ runner.os }}
41+
path: /nix
42+
- name: Restart Nix Daemon
43+
run: |
44+
sudo systemctl restart nix-daemon.service nix-daemon.socket
45+
- id: set-matrix
46+
name: Generate Nix Matrix
47+
run: |
48+
set -Eeu -o pipefail
49+
nix run --accept-flake-config .\#github-matrix -- checks legacyPackages
50+
51+
sudo systemctl stop nix-daemon.socket || true
52+
sudo systemctl stop nix-daemon.service || true
53+
sudo pkill -9 nix-daemon || true
54+
sleep 2

0 commit comments

Comments
 (0)