Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork221
ci: Custom GitHub Runners for Nix Builds#1745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8b61ad4 to76aa79bComparehunleyd approved these changesAug 22, 2025
76aa79b toc75bf58Compare1eb74b8 todb1e5e4Compare003d671 to840005bCompareWe might not need the full 8vcpu for aarch64-linux builds, so thischange reduces the runner size to 4vcpu to wait less for availableblacksmith runners.
Co-authored-by: samrose <samuel@supabase.io>
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.
…isibilityIntegrates github-action-utils library to improve error and warningvisibility in GitHub Actions UI through workflow command annotations.
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.
Extract core error messages and format them better for GitHub Actionsannotations.
Add nix-eval to needs dependencies and check its result in conditional expressions to prevent downstream test jobs from running when evaluation fails.
We are running an older version of the 'result' library that uses'_value' instead of 'ok_value' to access the successful result of acomputation.
…nsionsTo be able to build extensions versions packages separately in CI, weneed to expose them in a nested structure. It is currently not possibleto do so with the flattened packages structure, as the individualextension packages are not directly accessible.In this change, we replace the flattened package structure with nestedlegacyPackages to improve discoverability of individual extensionpackages.
Simplify extension package naming by removing the redundant "-all" suffix that was appended to pname attributes.
…workflowsTo make sure we only build what is necessary, we start building packages first, then run checks once all packages are built successfully.
Use the same 8 vCPU runner for aarch64 builds as used for x86_64 builds to improve build performance.
182d513 to1246b61Comparesamrose approved these changesDec 8, 2025
Merged via the queue intodevelop with commitDec 8, 2025
1493ca6 18 checks passed
Uh oh!
There was an error while loading.Please reload this page.
hunleyd added a commit that referenced this pull requestDec 8, 2025
hunleyd added a commit that referenced this pull requestDec 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
This PR implements a migration from GitHub's standard runners to a hybrid infrastructure combining self-hosted and ephemeral Blacksmith runners for building Nix packages.
The implementation includes runner selection, dynamic build matrix generation, and optimized caching strategies to improve build performance and cost efficiency.
Problem Statement
The previous CI implementation had several limitations:
Solution Architecture
High-Level Design
Architecture Components
Nix Evaluation Phase (
nix-eval.yml):nix-eval-jobsBuild Phases (separate jobs per architecture):
Runner Selection Logic:
Key Components
1. Dynamic Matrix Generation (
github-matrixPackage)Location:
nix/packages/github-matrix/Core Responsibilities:
nix-eval-jobs(https://github.com/nix-community/nix-eval-jobs)Package Size Detection:
requiredSystemFeatures = ["big-parallel"]in package definitionsOutput Format:
{"aarch64_linux": {"include": [ {"attr":"checks.aarch64-linux.pg_graphql_15","name":"pg_graphql-15.7","system":"aarch64-linux","runs_on": {"labels": ["blacksmith-32vcpu-ubuntu-2404-arm"]},"postgresql_version":"15" } ] },"x86_64_linux": {...},"aarch64_darwin": {...}}2. Custom Nix Installation Actions
Unify Nix installation across different runner types with two reusable GitHub Actions.
Ephemeral Runners (
nix-install-ephemeral)Location:
.github/actions/nix-install-ephemeral/Purpose: Set up Nix on fresh Blacksmith runners where Nix is not pre-installed
Features:
Configuration:
Cache Upload Mechanism:
/etc/nix/upload-to-cache.shSelf-Hosted Runners (
nix-install-self-hosted)Location:
.github/actions/nix-install-self-hosted/Purpose: Configure AWS credentials on persistent self-hosted runners where Nix is pre-installed
Features:
/etc/nix/aws/nix-aws-credentials3. Reusable Nix Eval Workflow
Location:
.github/workflows/nix-eval.ymlPurpose: Shared workflow for matrix generation
Features:
workflow_call4. Restructured Build Workflow
Location:
.github/workflows/nix-build.ymlNew Structure:
Key Improvements:
!cancelled()with success/skip conditionsRelated PRs
nix-github-actions#1742: Base work for custom runners (this PR builds on top of it)