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
11 changes: 7 additions & 4 deletions .github/workflows/nix-x86_64-linux.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# This file was autogenerated by actions.nix. Do not edit it manually.
# To make changes, edit the workflow definition in your flake's actions-nix configuration
# (typically under flake.actions-nix.workflows.".github/workflows/nix-x86_64-linux.yaml") and run:
# nix run .#render-workflows
# Or commit to trigger the pre-commit hook if enabled.
jobs:
fast-build:
runs-on: ubuntu-latest
Expand All @@ -21,11 +26,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: results
path: './result_parsed.json

path: |-
./result_parsed.json
./result-*

'
timeout-minutes: 60
report:
needs:
Expand Down
30 changes: 15 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
actions-nix.inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
pre-commit-hooks.follows = "git-hooks";
git-hooks.follows = "git-hooks";
};
};

Expand Down Expand Up @@ -46,7 +46,7 @@
git-hooks.flakeModule
actions-nix.flakeModules.default
flakeModule
#./nix/checks.nix # disabled until i can get it to work right
# ./nix/checks.nix # disabled until i can get it to work right
];

flake.actions-nix = {
Expand Down
17 changes: 8 additions & 9 deletions nix/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@
virtualisation.mountHostNixStore = true;
virtualisation.writableStore = true;

environment.systemPackages =
[
pkgs.git
pkgs.bash
inputs.self.packages.x86_64-linux.__patched-lix-fast-build
]
#++ map (x: x.drv) (lib.flatten (buildtimeDerivations pkgs.stdenv))
++ builtins.attrValues inputs;
environment.systemPackages = [
pkgs.git
pkgs.bash
pkgs.lixPackageSets.latest.nix-fast-build
]
#++ map (x: x.drv) (lib.flatten (buildtimeDerivations pkgs.stdenv))
++ builtins.attrValues inputs;

environment.etc.nix-auto-ci = {
mode = "symlink";
Expand All @@ -97,7 +96,7 @@
machine.succeed("cd /tmp/nix-auto-ci && git init && git add .")
machine.succeed("cat /etc/fstab 1>&2")
machine.succeed("ls -la /nix/.ro-store/ 1>&2")
machine.succeed("cd /tmp/nix-auto-ci/testing-flake && nix run ${overrides} -- .#__patched-lix-fast-build --no-nom ${overrides} --flake \".#checks.${nodes.machine.nixpkgs.hostPlatform.system}\" --result-file result.json 1>&2")
machine.succeed("cd /tmp/nix-auto-ci/testing-flake && nix-fast-build --no-nom ${overrides} --flake \".#checks.${nodes.machine.nixpkgs.hostPlatform.system}\" --result-file result.json 1>&2")
'';
};
};
Expand Down
8 changes: 0 additions & 8 deletions nix/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ _localFlake:
}
'';
};
packages.__patched-nix-fast-build = pkgs.nix-fast-build.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ [ ../nix-fast-build.patch ];
});
packages.__patched-lix-fast-build =
pkgs.lixPackageSets.latest.nix-fast-build.overrideAttrs
(oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ [ ../nix-fast-build.patch ];
});
};
};
}
107 changes: 53 additions & 54 deletions nix/github.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
determinate = false;
logger = "pretty";
diagnostic-endpoint = "";
} // (if (sourceUrl != null) then { source-url = sourceUrl; } else { });
}
// (if (sourceUrl != null) then { source-url = sourceUrl; } else { });
};
cacheSteps = (
if (shouldCache) then
Expand All @@ -50,39 +51,38 @@
};
jobs = {
fast-build = {
steps =
[
{
uses = "actions/checkout@v4";
}
customInstallStep
]
++ cacheSteps
++ preBuild
++ [
{
name = "nix-fast-build";
run = "nix run --inputs-from . nixpkgs#${
if useLix then "lixPackageSets.latest." else ""
}nix-fast-build -- --no-nom --flake \".#checks.${arch}\" --result-file result.json || true";
}
{
name = "transform";
run = "nix run --inputs-from . .#nix-auto-ci-transform -- result.json";
}
{
name = "upload artifact";
uses = "actions/upload-artifact@v4";
"with" = {
name = "results";
path = ''
./result_parsed.json
./result-*
'';
};
}
]
++ postUpload;
steps = [
{
uses = "actions/checkout@v4";
}
customInstallStep
]
++ cacheSteps
++ preBuild
++ [
{
name = "nix-fast-build";
run = "nix run --inputs-from . nixpkgs#${
if useLix then "lixPackageSets.latest." else ""
}nix-fast-build -- --no-nom --flake \".#checks.${arch}\" --result-file result.json || true";
}
{
name = "transform";
run = "nix run --inputs-from . .#nix-auto-ci-transform -- result.json";
}
{
name = "upload artifact";
uses = "actions/upload-artifact@v4";
"with" = {
name = "results";
path = ''
./result_parsed.json
./result-*
'';
};
}
]
++ postUpload;
};
report = {
needs = [ "fast-build" ];
Expand All @@ -92,26 +92,25 @@
attr = builtins.attrNames flake.checks.${arch};
};
};
steps =
[
{
uses = "actions/checkout@v4";
}
customInstallStep
]
++ cacheSteps
++ [
{
uses = "actions/download-artifact@v4";
"with" = {
path = "artifacts";
};
}
{
name = "report";
run = "nix run --inputs-from . .#nix-auto-ci-report artifacts/results/result_parsed.json \${{ matrix.attr }}";
}
];
steps = [
{
uses = "actions/checkout@v4";
}
customInstallStep
]
++ cacheSteps
++ [
{
uses = "actions/download-artifact@v4";
"with" = {
path = "artifacts";
};
}
{
name = "report";
run = "nix run --inputs-from . .#nix-auto-ci-report artifacts/results/result_parsed.json \${{ matrix.attr }}";
}
];
};
};
};
Expand Down