-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Run a single flake check #8881
Comments
Unfortunately it is impossible to run both check steps individually [0], which would have allowed us to map the concurrent builds to the CI job level. Now this way it will be a bit confusing as both jobs will run concurrently (but in the same CI job) and their stdout will race against each other for maximum confusion, so the following output is possible: ``` The C compiler identification is GNU 14.2.0 The C compiler identification is Clang 18.1.8 The CXX compiler identification is GNU 14.2.0 The CXX compiler identification is Clang 18.1.8 ``` And thus it will also not be possible to directly see which of the two caused a compiler error. Fortunately I do not care too much as it is easy for me to run the build locally for just one of both compilers. [0] NixOS/nix#8881
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-flake-check-for-current-system-only/18366/4 |
Anecdotally, I have a multi-node Slurm test (i.e. performs intra-node network operations) that passes in a This feature is rather necessary for complex CI projects. I'd love to see it implemented. |
There's currently (Nix 2.17.0) no way to run a single flake check.
For example, with the given
flake.nix
:The only way to build the check
my-check
is withnix flake check
, which builds every check (and packages, and other stuff).Unlike
nix build
,nix shell
, andnix develop
,nix flake check
doesn't allow specifying a check:As a workaround,
nix build
can be used, but it requires specifying the full attribute path, including the current architecture:nix build .#checks.aarch64-darwin.my-check
.Describe the solution you'd like
nix flake check
could gain a mode to run individual checks with fragments, likenix flake check .#my-check
. Alternatively, to matchnix build
,nix shell
, andnix develop
, we could introduce anix check
command.The text was updated successfully, but these errors were encountered: