Skip to content

Commit

Permalink
ci: benchmarking and Cachix improvements (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhess authored Apr 8, 2024
2 parents 15f8d37 + 1c93eff commit 19dc9cd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 96 deletions.
23 changes: 0 additions & 23 deletions .buildkite/cachix-push.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,3 @@ steps:
agents:
queue: "nix-build"
os: "darwin"

- label: ":nixos: :buildkite: :stopwatch: Run benchmarks"
command: nix-buildkite
agents:
queue: "nix-benchmark"
plugins:
- hackworthltd/nix#v1.0.0:
file: ci-benchmarks.nix
agent-tags: queue=nix-benchmark
2 changes: 0 additions & 2 deletions ci-benchmarks.nix

This file was deleted.

41 changes: 4 additions & 37 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@

imports = [
inputs.pre-commit-hooks-nix.flakeModule
./nix/flake-parts/benchmarks.nix
];
systems = [ "x86_64-linux" "aarch64-darwin" ];

Expand Down Expand Up @@ -158,7 +157,6 @@
baseName == "SECURITY.md" ||
baseName == "bugreport.sh" ||
pkgs.lib.hasPrefix "cabal.project.local" baseName ||
baseName == "ci-benchmarks.nix" ||
baseName == "ci.nix" ||
baseName == "default.nix" ||
baseName == "docs" ||
Expand Down Expand Up @@ -255,6 +253,9 @@
}
// (pkgs.lib.optionalAttrs (system == "x86_64-linux") {
inherit (pkgs) primer-service-docker-image;
inherit (pkgs) primer-benchmark-results-json;
inherit (pkgs) primer-criterion-results-github-action-benchmark;
inherit (pkgs) primer-benchmark-results-github-action-benchmark;
})
// primerFlake.packages;

Expand Down Expand Up @@ -340,20 +341,6 @@
];
};
};

# This is a non-standard flake output, but we don't want to
# include benchmark runs in `packages`, because we don't
# want them to be part of the `hydraJobs` or `ciJobs`
# attrsets. The benchmarks need to be run in a more
# controlled environment, and this gives us that
# flexibility.
benchmarks = {
inherit (pkgs) primer-benchmark-results-json;
inherit (pkgs) primer-criterion-results-github-action-benchmark;
}
// (pkgs.lib.optionalAttrs (system == "x86_64-linux")
{ inherit (pkgs) primer-benchmark-results-github-action-benchmark; }
);
};

flake =
Expand All @@ -368,18 +355,6 @@
};
overlays = allOverlays;
};

benchmarkJobs = {
inherit (inputs.self.benchmarks) x86_64-linux;

required-benchmarks = pkgs.releaseTools.aggregate {
name = "required-benchmarks";
constituents = builtins.map builtins.attrValues (with inputs.self; [
benchmarks.x86_64-linux
]);
meta.description = "Required CI benchmarks";
};
};
in
{
overlays.default = (final: prev:
Expand Down Expand Up @@ -635,7 +610,7 @@
# them.
benchmarks =
let
lastEnvChange = "20240408.01";
lastEnvChange = "20240408.02";
in
final.callPackage ./nix/pkgs/benchmarks {
inherit lastEnvChange;
Expand Down Expand Up @@ -667,13 +642,6 @@

inherit primer-openapi-spec;

# Note to the reader: these derivations run benchmarks
# and collect the results in various formats. They're
# part of the flake's overlay, so they appear in any
# `pkgs` that uses this overlay. Hoewver, we do *not*
# include these in the flake's `packages` output,
# because we don't want them to be built/run when CI
# evaluates the `hydraJobs` or `ciJobs` outputs.
inherit (benchmarks) primer-benchmark-results-json;
inherit (benchmarks) primer-criterion-results-github-action-benchmark;
inherit (benchmarks) primer-benchmark-results-github-action-benchmark;
Expand Down Expand Up @@ -702,7 +670,6 @@
};

ciJobs = inputs.hacknix.lib.flakes.recurseIntoHydraJobs inputs.self.hydraJobs;
ciBenchmarks = inputs.hacknix.lib.flakes.recurseIntoHydraJobs benchmarkJobs;
};
};
}
25 changes: 0 additions & 25 deletions nix/flake-parts/benchmarks.nix

This file was deleted.

0 comments on commit 19dc9cd

Please sign in to comment.