Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 29 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,17 @@ jobs:
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
shell: nix develop --command bash -eo pipefail {0}
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 22.23.3
cache: pnpm
- name: Setup Nix
uses: furedea/reusable-workflows/.github/actions/nix-setup@2ae953294b9a805d0705657adc1d9d4f1bc1f646 # v1.3.0

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -53,20 +50,19 @@ jobs:
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
shell: nix develop --command bash -eo pipefail {0}
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
- name: Setup Nix
uses: furedea/reusable-workflows/.github/actions/nix-setup@2ae953294b9a805d0705657adc1d9d4f1bc1f646 # v1.3.0
with:
node-version: 22.23.3
cache: pnpm
save: false

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -79,20 +75,19 @@ jobs:
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
shell: nix develop --command bash -eo pipefail {0}
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
- name: Setup Nix
uses: furedea/reusable-workflows/.github/actions/nix-setup@2ae953294b9a805d0705657adc1d9d4f1bc1f646 # v1.3.0
with:
node-version: 22.23.3
cache: pnpm
save: false

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -105,20 +100,19 @@ jobs:
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
shell: nix develop --command bash -eo pipefail {0}
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
- name: Setup Nix
uses: furedea/reusable-workflows/.github/actions/nix-setup@2ae953294b9a805d0705657adc1d9d4f1bc1f646 # v1.3.0
with:
node-version: 22.23.3
cache: pnpm
save: false

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -131,20 +125,19 @@ jobs:
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
shell: nix develop --command bash -eo pipefail {0}
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
- name: Setup Nix
uses: furedea/reusable-workflows/.github/actions/nix-setup@2ae953294b9a805d0705657adc1d9d4f1bc1f646 # v1.3.0
with:
node-version: 22.23.3
cache: pnpm
save: false

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
41 changes: 26 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,33 @@
outputs =
{ nixpkgs, nixpkgs-unstable, ... }:
let
system = "aarch64-darwin";
pkgs = import nixpkgs { inherit system; };
systems = [
"aarch64-darwin"
"x86_64-linux"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: x86_64-linux now pulls its packages from the nixpkgs input, which is pinned to nixpkgs-26.05-darwin (see flake.lock). That branch only moves forward after the Darwin Hydra jobs pass, so cache.nixos.org may not have Linux binaries for that exact revision. When it doesn't, nix develop on ubuntu-latest has to build nodejs_24 and the other tools from source. That build won't fit in the 10-minute job timeout, and every job except lint uses save: false, so they can't reuse a cached result. Consider pinning a separate linux input to nixos-26.05 / nixpkgs-26.05, or check the first CI run's logs for local builds before merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked on the first CI run (run 42621085410). The lint job spent 26s in "Install dependencies", which includes the nix develop evaluation, the substitution of nodejs_24/pnpm and pnpm install. The other jobs finished in 36-44s in total, all with save: false and no cache hit to rely on. Building nodejs_24 from source would take far longer than the 10-minute timeout, so cache.nixos.org already had the x86_64-linux binaries for the locked nixpkgs revision. I could not read the raw logs from my sandbox, so this rests on step timings. If a later nixpkgs bump lands before Linux binaries exist, the job would fail visibly on the timeout, and moving to a separate Linux input would then be the fix; I am not adding that input now (YAGNI).

];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
commitlint
deadnix
# lefthook before 2.1.6 runs hooks under a pty, which agent sandboxes deny.
nixpkgs-unstable.legacyPackages.${system}.lefthook
ls-lint
nixfmt
nodejs_24
pnpm
statix
];
};
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
packages = with pkgs; [
commitlint
deadnix
# lefthook before 2.1.6 runs hooks under a pty, which agent sandboxes deny.
nixpkgs-unstable.legacyPackages.${system}.lefthook
ls-lint
nixfmt
nodejs_24
pnpm
statix
];
};
}
);
};
}
Loading