Commit Graph

536 Commits

Author SHA1 Message Date
Silvan Mosberger
02b3c06b1c
Merge pull request #274591 from tweag/by-name-reproducible
`pkgs/by-name`: Enable gradual migration checks and add `run-local.sh`
2023-12-22 00:17:37 +01:00
Silvan Mosberger
e130ee33a1 pkgs/test/nixpkgs-check-by-name/scripts: Various improvements
- trace function, avoids littering `echo >&2` all throughout
- Avoid `eval`, remove unneeded shellcheck

Co-Authored-By: Victor Engmark <victor@engmark.name>
2023-12-22 00:04:16 +01:00
Silvan Mosberger
1968beeabd check-by-name: Pass --base in CI and local running script
This enables the ratchet checks for pkgs/by-name, allowing gradual
migrations!
2023-12-20 17:38:06 +01:00
Silvan Mosberger
9e03178865 tests.nixpkgs-check-by-name: Add documentation for scripts 2023-12-20 17:38:05 +01:00
Silvan Mosberger
92238ac52d tests.nixpkgs-check-by-name: Create script to run locally
Due to the check soon depending on the base branch (see `--base`),
the CI check can't reasonably share all code with a local check.
We can still make a script to run it locally, just not sharing all code.
2023-12-20 17:38:03 +01:00
Silvan Mosberger
3869ba4127 workflows/check-by-name: Move tool fetching into script
This part of the CI can also be reproduced locally
2023-12-19 23:15:01 +01:00
Janne Heß
5eed5416ff
Merge pull request #167670 from messemar/incremental-builds
incremental builds: add derivation override functions
2023-12-19 11:37:15 +01:00
Silvan Mosberger
2a107bc64b
Merge pull request #272395 from tweag/by-name-migrate-empty-arg
tests.nixpkgs-check-by-name: Implement gradual empty arg check migration
2023-12-15 19:08:11 +01:00
Silvan Mosberger
fc2d26939d tests.nixpkgs-check-by-name: Improve check clarity 2023-12-15 17:27:26 +01:00
Adam Joseph
2d036511f6 pkgs/test/release/default.nix: init
This derivation verifies that all jobset attributes can be evaluated
under tryEval without producing any non-catchable errors or causing
infinite recursion.
2023-12-15 05:13:50 -08:00
Adam Joseph
80472e3754 treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobs 2023-12-15 05:13:46 -08:00
Silvan Mosberger
74e8b38dbe tests.nixpkgs-check-by-name: Move interface description into code
This would be duplicated otherwise
2023-12-15 02:28:55 +01:00
Silvan Mosberger
79618ff8cb tests.nixpkgs-check-by-name: Improve docs, introduce "ratchet" term 2023-12-15 02:14:48 +01:00
Silvan Mosberger
413dd9c03e tests.nixpkgs-check-by-name: Minor improvements from review 2023-12-15 01:02:49 +01:00
Silvan Mosberger
53b43ce0e3 tests.nixpkgs-check-by-name: Fix and document behavior without --base
Previously, not passing `--base` would enforce the most strict checks.
While there's currently no actual violation of these stricter checks,
this does not match the previous behavior.

This won't matter once CI passes `--base`, the code handling the
optionality can be removed then.
2023-12-15 01:01:14 +01:00
Silvan Mosberger
bb08bfc2d3 tests.nixpkgs-check-by-name: Test for gradual transition
This implements the ability to test gradual transitions in check
strictness, and adds one such test for the empty non-auto-called
arguments check.
2023-12-14 04:05:03 +01:00
Silvan Mosberger
d487a975cc tests.nixpkgs-check-by-name: Gradual migration from base Nixpkgs
This implements the option for a gradual migration to stricter checks.
For now this is only done for the check against empty non-auto-called
callPackage arguments, but in the future this can be used to ensure all
new packages make use of `pkgs/by-name`.

This is implemented by adding a `--base <BASE_NIXPKGS>` flag, which then
compares the base nixpkgs against the main nixpkgs version, making sure
that there are no regressions.

The `--version` flag is removed. While it was implemented, it was never
used in CI, so this is fine.
2023-12-14 03:51:10 +01:00
Silvan Mosberger
a6ba4cae31 tests.nixpkgs-check-by-name: Intermediate refactor
This prepares the code base for the removal of the `--version` flag, to
be replaced with a flag that can specify a base version to compare the
main Nixpkgs against, in order to have gradual transitions to stricter
checks.

This refactoring does:
- Introduce the `version` module that can house the logic to increase
  strictness, with a `version::Nixpkgs` struct that contains the
  strictness conformity of a single Nixpkgs version
- Make the check return `version::Nixpkgs`
- Handle the behavior of the still-existing `--version` flag with `version::Nixpkgs`
- Introduce an intermediate `process` function to handle the top-level
  logic, especially useful in the next commit
2023-12-14 03:40:49 +01:00
Silvan Mosberger
e98d22851b tests.nixpkgs-check-by-name: Introduce result_map
Convenience function to run another validation over a successful validation result.

This will be usable in more locations in future commits, making the code
nicer.
2023-12-14 03:21:41 +01:00
Silvan Mosberger
b8e4d555b4 tests.nixpkgs-check-by-name: Minor refactor, allow more simultaneous problems
This makes it such that these two errors can both be thrown for a single
package:
- The attribute value not being a derivation
- The attribute not being a proper callPackage

The tests had to be adjusted to only throw the error they were testing
for
2023-12-14 03:13:36 +01:00
Connor Baker
8e800cedaf cudaPackages: move derivations to cuda-modules & support aarch64
cudaPackages.cuda_compat: ignore missing libs provided at runtime

cudaPackages.gpus: Jetson should never build by default

cudaPackages.flags: don't build Jetson capabilities by default

cudaPackages: re-introduce filter for pre-existing CUDA redist packages in overrides

cudaPackages: only recurseIntoAttrs for the latest of each major version

cudaPackages.nvccCompatabilities: use GCC 10 through CUDA 11.5 to avoid a GLIBC incompatability

cudaPackages.cutensor: acquire libcublas through cudatoolkit prior to 11.4

cudaPackages.cuda_compat: mark as broken on aarch64-linux if not targeting Jetson

cudaPackages.cutensor_1_4: fix build

cudaPackages: adjust use of autoPatchelfIgnoreMissingDeps

cudaPackages.cuda_nvprof: remove unecessary override to add addOpenGLRunpath

cudaPackages: use getExe' to avoid patchelf warning about missing meta.mainProgram

cudaPackages: fix evaluation with Nix 2.3

cudaPackages: fix platform detection for Jetson/non-Jetson aarch64-linux

python3Packages.tensorrt: mark as broken if required packages are missing

Note: evaluating the name of the derivation will fail if tensorrt is not present,
which is why we wrap the value in `lib.optionalString`.

cudaPackages.flags.getNixSystem: add guard based on jetsonTargets

cudaPackages.cudnn: use explicit path to patchelf

cudaPackages.tensorrt: use explicit path to patchelf
2023-12-07 16:45:54 +00:00
Martin Messer
6db9612204 rename: incremental -> checkpointed builds 2023-12-07 16:56:16 +01:00
Martin Messer
fc2e3fac61 doc: add section about checkpointed build 2023-12-07 16:55:36 +01:00
Martin Messer
c8afee88bf checkpointedBuild: fix tests for checkpointedBuild functions 2023-12-07 16:38:48 +01:00
Martin Messer
17e88c2890 checkpointedBuild: add checkpointed build test based on pkgs hello 2023-12-07 16:38:48 +01:00
sternenseemann
ae29d067ff llvmPackages_7: remove at 7.1.0 2023-12-04 19:42:57 +01:00
Adam Joseph
bffbf8bb53 test.cuda: fix broken eval 2023-11-30 09:36:05 +01:00
Jan Tojnar
bc41b2db3d makeHardcodeGsettingsPatch: Support applying patches
This is useful for replacing code that cannot be easily handled by the generator,
such as the tentative settings constructor in e-d-s.
2023-11-21 08:42:47 +01:00
Silvan Mosberger
6361b22370
Merge pull request #267048 from narang99/hariom/257748/check-by-name-msg
fix long error messages in nix-instantiate
2023-11-21 01:35:11 +01:00
Hariom Narang
ca97497bfd made EXPR_PATH point to local instead of store
- we need this behavior in dev shell
- the main build still uses the store file
2023-11-21 01:11:06 +05:30
Silvan Mosberger
809505b140
Merge pull request #268224 from tweag/by-name-reload
tests.nixpkgs-check-by-name: More reliable .envrc reloading
2023-11-19 16:10:40 +01:00
Artturi
0192fcc944
Merge pull request #268018 from amjoseph-nixpkgs/pr/testcase/267859 2023-11-19 02:28:42 +02:00
Silvan Mosberger
def5df923f tests.nixpkgs-check-by-name: More reliable .envrc reloading
See also https://github.com/nix-community/nix-direnv/issues/408 and https://github.com/nix-community/nix-direnv/pull/407
2023-11-18 04:54:05 +01:00
Raito Bezarius
9866a5be7e llvmPackages_5: drop
While using very old compilers is a fair usecase, it induces a maintenance churn as
we collect more and more LLVM versions for the LLVM maintainers.

Especially when we need to backport uniform changes to the whole tree,
furthermore, it consumes and waste CI resources.
2023-11-17 16:12:32 +01:00
Adam Joseph
7cb550b6fe tests.cross.sanity: add test case for #267859
This commit adds pkgs.spike, which internally uses
pkgsCross.riscv64-embedded.stdenv.cc, as a test case for the issue
reported in https://github.com/NixOS/nixpkgs/issues/267859
2023-11-16 20:01:40 -08:00
Vladimír Čunát
0fe5300699
Merge branch 'master' into staging-next 2023-11-16 09:49:24 +01:00
Artturin
a192137522 tests.cc-wrapper.supported: make it actually build the tests
it was building the stdenv only
2023-11-16 00:23:56 +02:00
Artturin
dabfaef444 tests.cc-wrapper: add atomics test
`-std=c++17` is for clang 5
2023-11-16 00:23:56 +02:00
Hariom Narang
437b2054f4 pass eval.nix as a file instead of expression
- passing it as expression gives large error messages
  which are not very readable
- this commits puts the file in nix-store
  and patches the final program to have access to
  the path to the file as env.
- We simply pass this file to nix-instantiate
2023-11-14 15:05:45 +05:30
github-actions[bot]
e112f9b8bb
Merge master into staging-next 2023-11-09 18:00:56 +00:00
Connor Baker
83d5298d37 cudaPackages.cuda-samples: alphabetize arguments 2023-11-09 14:48:17 +00:00
Connor Baker
b807a32c2c cudaPackages.cuda-samples: fix CMake build error on 12.2+ 2023-11-07 20:22:58 +00:00
Connor Baker
30be50b080 cudaPackages.cuda-samples: don't list package for unsupported CUDA version 2023-11-07 20:17:01 +00:00
Connor Baker
3441e3d32e cudaPackages_12_2.cuda-samples: init at 12.2 2023-11-07 20:03:14 +00:00
Connor Baker
98d0da512a cudaPackages_12_1.cuda-samples: init at 12.1 2023-11-07 20:02:57 +00:00
Connor Baker
3543eaf4ff cudaPackages.cuda-samples: use packages from cudaPackages scope; not top-level 2023-11-07 19:59:11 +00:00
Connor Baker
4eae7523f0 cudaPackages.cuda-samples: switch to autoAddOpenGLRunpathHook from manual addOpenGLRunpath 2023-11-07 19:56:47 +00:00
Connor Baker
25fa662d3e cudaPackages.cuda-samples: add CUDA team as maintainers 2023-11-07 19:55:50 +00:00
Connor Baker
0f414caa8f cudaPackages.cuda-samples: use finalAttrs instead of rec 2023-11-07 19:55:19 +00:00
github-actions[bot]
38bc2a577e
Merge master into staging-next 2023-11-07 00:02:31 +00:00