-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ci: split tests into chunks #7391
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Have you looks at using buildbot for the tests? After the initial run I'd expect it to be quick as most tests would be cached. Darwin would be a bit bottlenecked so I'd suggest only testing aarch64-darwin and not x86_64-darwin. |
Yes, that's been something I have thought about but wasn't sure how to get set up in the checks here and everything there. |
As there is a separate diff --git a/buildbot-nix.toml b/buildbot-nix.toml
new file mode 100644
index 00000000..55433a03
--- /dev/null
+++ b/buildbot-nix.toml
@@ -0,0 +1,3 @@
+attribute = "packages"
+flake_dir = "./tests"
+lock_file = "./flake.lock"
diff --git a/tests/flake.nix b/tests/flake.nix
index 34f39d35..f5d183d0 100644
--- a/tests/flake.nix
+++ b/tests/flake.nix
@@ -20,7 +20,10 @@
outputs =
{ nixpkgs, ... }:
let
- forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
+ forAllSystems = nixpkgs.lib.genAttrs [
+ "aarch64-darwin"
+ "x86_64-linux"
+ ];
in
{
devShells = forAllSystems ( |
I think in nixvim we ended up creating a separate flake output for https://github.com/nix-community/nixvim/blob/main/buildbot-nix.toml#L1-L1 looks like it lets us tell |
Yes, can use different flake output. The ~1400 tests in packages is too much for buildbot but chunking them seems to be fine. https://buildbot.nix-community.org/#/builders/4466/builds/5 I deployed the |
Longterm buildbot-nix probably will not schedule "skipped builds" for repositories with a lot of flake outputs. I need to do some refactoring for updating gcroots though. |
The buildbot changes are deployed now if you'd like to move forward with that, note that the |
Thanks, I'll try and do that within the next couple days. |
934b770
to
126930f
Compare
I've discovered that the buildbot method I used previously for testing only seems to work for the repo default branch so I can't test this PR directly, instead I've pushed the commits to master on my fork. https://buildbot.nix-community.org/#/builders/4466/builds/17 |
We have lots of tests and would like to add more. However, adding more testing coverage comes at the cost of a slower CI when we run them sequentially. This adds test outputs that are chunked however we'd like to tune for batch sizes. Allowing us to create a parallelized CI workflow. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Filters tests to specific platforms for buildbot. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Support testing on buildbot CI Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Looks like we have some checks that we dont normally run in CI that are failing. Will need to look into those. |
Similar goal of #6539 but applying it to the actual tests themselves for parallelization. Again, blocked by being able to change our checks ( I can't do that )
We have lots of tests and would like to add more. However, adding more testing coverage comes at the cost of a slower CI when we run them sequentially. This adds test outputs that are chunked however we'd like to tune for batch sizes. Allowing us to create a parallelized CI workflow.
Been testing in my fork and seems to cut time in half https://github.com/khaneliman/home-manager/actions/runs/16084828656
Description
Checklist
Change is backwards compatible.
Code formatted with
nix fmt
ornix-shell -p treefmt nixfmt-rfc-style deadnix keep-sorted --run treefmt
.Code tested through
nix-shell --pure tests -A run.all
or
nix build --reference-lock-file flake.lock ./tests#test-all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC