Skip to content

Commit 805a4f6

Browse files
committed
perf: skip substituter checks for trivial workflow builders
Use runCommandLocal instead of runCommand for the YAML generation and workflow directory derivations, avoiding slow binary cache lookups for builds that complete instantly locally.
1 parent dbd7b9a commit 805a4f6

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/actionlint.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
self-hosted-runner:
2+
labels:
3+
- warp-ubuntu-latest-arm64-2x
4+
- warp-ubuntu-latest-arm64-4x
5+
- warp-ubuntu-latest-x64-2x
6+
- warp-ubuntu-latest-x64-4x

.github/workflows/flake-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
permissions:
66
contents: read
77
id-token: write
8-
runs-on: ubuntu-latest
8+
runs-on: warp-ubuntu-latest-arm64-2x
99
steps:
1010
- uses: actions/checkout@v4
1111
- uses: DeterminateSystems/determinate-nix-action@v3

.github/workflows/update-flake-lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
jobs:
44
update:
5-
runs-on: ubuntu-latest
5+
runs-on: warp-ubuntu-latest-arm64-2x
66
steps:
77
- uses: actions/checkout@v4
88
- uses: DeterminateSystems/determinate-nix-action@v3

dev/flake-module.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110

111111
jobs = {
112112
check = {
113-
runsOn = "ubuntu-latest";
113+
runsOn = "warp-ubuntu-latest-arm64-2x";
114114

115115
permissions = {
116116
id-token = "write";
@@ -156,7 +156,7 @@
156156

157157
jobs = {
158158
update = {
159-
runsOn = "ubuntu-latest";
159+
runsOn = "warp-ubuntu-latest-arm64-2x";
160160

161161
steps = [
162162
{

modules/github-ci.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ in {
8484
lib.mapAttrs' (
8585
name: workflow:
8686
lib.nameValuePair "${name}.yml" (
87-
pkgs.runCommand "${name}.yml" {
87+
pkgs.runCommandLocal "${name}.yml" {
8888
nativeBuildInputs = [pkgs.yq-go];
8989
json = builtins.toJSON (workflowToYaml workflow);
9090
passAsFile = ["json"];
@@ -103,7 +103,7 @@ in {
103103

104104
githubActions.workflowsDir = lib.mkIf cfg.enable (
105105
# Create a directory with all workflow files
106-
pkgs.runCommand "github-workflows" {} ''
106+
pkgs.runCommandLocal "github-workflows" {} ''
107107
mkdir -p $out
108108
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: file: ''
109109
cp ${file} $out/${name}

0 commit comments

Comments
 (0)