Commit Graph

609 Commits

Author SHA1 Message Date
Atemu
52418a5183
Merge pull request #279844 from doronbehar/tests/buildFHSEnv
tests.buildFHSEnv.libtinfo: init
2024-01-31 16:09:16 +01:00
annalee
9e5b7b2ceb
treewide: drop LLVM10 2024-01-30 06:30:28 +00:00
a-n-n-a-l-e-e
425588f207
Merge pull request #283551 from a-n-n-a-l-e-e/llvmPackages_8-drop
treewide: drop LLVM8
2024-01-29 22:25:38 -08:00
Silvan Mosberger
142922295d check-by-name: Don't use -I in shebang
Original commit from https://github.com/NixOS/nixpkgs/pull/282226,
message:

Running CI locally is broken becauses the `-I` argument:

- Clobbers $NIX_PATH
- Is wrong for two reasons:
  - Has too many `..` elements, relative to the script's location
  - Isn't relative to the script's location (as with *.nix files),
    since shell scripts and POSIX in general interpret paths
    relative to the current working directory, not the canonical
    path of argv[0]
- Is inconsistent, since this script has symlinks pointing at it
  from different depths in the repository

There is no way to set this flag statically in a way that will work
everywhere.  The caller needs to use $NIX_PATH, or the script needs
to take the `-I` value as an argument.

This commit deletes the static `-I` flag.
2024-01-29 13:39:26 +01:00
Silvan Mosberger
9c149d289e check-by-name: Update pinned tooling
Includes https://github.com/NixOS/nixpkgs/pull/283017
2024-01-29 13:38:55 +01:00
Vincenzo Mantova
253025b370 texlive: 2022-final -> 2023.20240114
Co-authored-by: apfelkuchen06 <apfelkuchen@hrnz.li>
2024-01-27 09:32:22 +00:00
apfelkuchen06
2e2b6d13e2 tests/texlive: add a context test
Since context now uses the luametatex engine, which is not distributed with
texlive, the probability of breaking it when updating increases. Let's add a
simple test just in case.

Co-authored-by: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com>
2024-01-27 09:32:20 +00:00
annalee
7a0dc7c7e8
treewide: drop LLVM8 2024-01-25 12:24:51 +00:00
Sergei Trofimovich
9b5c93da36 tests.cross.sanity: fix eval by fixing qt5.qutebrowser reference
Without the change the eval fails as:

    $ nix build --no-link -f. tests.cross.sanity

       error: attribute 'qutebrowser' missing

       at pkgs/test/cross/default.nix:157:5:

          156|     # Two web browsers -- exercises almost the entire packageset
          157|     pkgs.pkgsCross.aarch64-multiplatform.qt5.qutebrowser
             |     ^
          158|     pkgs.pkgsCross.aarch64-multiplatform.firefox
2024-01-25 10:51:29 +00:00
Weijia Wang
cdb02f1ec6
Merge pull request #283598 from Artturin/fixerr1
tests.cc-wrapper: fix error
2024-01-25 00:19:51 +01:00
Artturin
1d1d938bf0 tests.cc-wrapper: fix error
`error: llvmPackages_{6,7} has been removed from nixpkgs`
2024-01-24 22:50:16 +02:00
Silvan Mosberger
553b1ab654 tests.nixpkgs-check-by-name: Don't enforce for fixed evals
Stops enforcing that packages whose evaluation gets fixed have to be
moved to `pkgs/by-name`.

This didn't really cause problems before, but I don't think it's great
behavior, and now that NonApplicable is a thing, we can easily make this
work, whereas before it would've been a larger change.
2024-01-22 23:16:46 +01:00
Silvan Mosberger
4245e618e7 tests.nixpkgs-check-by-name: Introduce a non-applicable ratchet state
Introduces NonApplicable as a state of a ratchet, to be used when the
ratchet doesn't make sense to have.

This fixes an odd problem where before, changing an attribute to use
e.g. `callPackage` suddenly requires moving it to `pkgs/by-name`, when that
shouldn't have been required.
2024-01-22 23:13:58 +01:00
Silvan Mosberger
5e173ab0f4 tests.nixpkgs-check-by-name: Minorly more minimal test files 2024-01-22 22:58:33 +01:00
Silvan Mosberger
a48038d309 tests.nixpkgs-check-by-name: Minor code improvements
- Renames EmptyNonAutoCalled to ManualDefinition and add some docs to
  better explain what it's for
- Don't conflate the Ratchet type with the Context type, keep them
  apart, making the code a bit cleaner, but also allows adding
  additional context for a Tight ratchet in the future
- Change the signature of to_nixpkgs_problem to align with the other
  ratchet function signatures
2024-01-22 22:56:21 +01:00
Silvan Mosberger
bfe48c9a44 check-by-name: Update pinned tooling
Includes https://github.com/NixOS/nixpkgs/pull/275539
2024-01-18 18:42:03 +01:00
Silvan Mosberger
0259a8b94d nixpkgs-check-by-name/scripts: Use local Nixpkgs for dependencies
Especially needed because NIX_PATH is set to something custom in the
nix-shell of nixpkgs-check-by-name
2024-01-18 18:41:27 +01:00
Silvan Mosberger
a64d9bf4fd
Merge pull request #278687 from keanuk/check-by-name-multiple-failures
nixpkgs-check-by-name test that fails multiple validity checks
2024-01-17 21:39:37 +01:00
Silvan Mosberger
800a6d3031
Merge pull request #281399 from tweag/by-name-minor-improvements
tests.nixpkgs-check-by-name: Minor improvements
2024-01-17 21:36:27 +01:00
Silvan Mosberger
1516b35afa check-by-name: Remove legacy CI script
See the removed comment for why it can be removed now
2024-01-17 21:26:39 +01:00
Silvan Mosberger
8cf3cd91b2 check-by-name: Update contributor docs
Now that the tooling is pinned instead of being fetched indirectly from
the channel, the docs need some updating
2024-01-17 21:26:39 +01:00
Silvan Mosberger
9997190a61
Merge pull request #281407 from tweag/by-name-local-run-platforms
check-by-name/run-local.sh: Make it usable for non-CI platforms
2024-01-17 21:21:12 +01:00
Silvan Mosberger
30af0cdab6 tests.nixpkgs-check-by-name: Test non-Nix invalid symlinks instead
Nix symlinks that are invalid don't pass the new CI check from
https://github.com/NixOS/nixpkgs/pull/279892, so let's instead use
non-Nix symlinks.
2024-01-17 15:50:24 +01:00
Silvan Mosberger
cf90aa9a86 tests.nixpkgs-check-by-name: Don't test invalid Nix files
Since https://github.com/NixOS/nixpkgs/pull/279892, there's a separate
check that makes sure all changed Nix files evaluate. To not trigger
that, we need to remove all invalid Nix expressions from the tests.
2024-01-17 15:50:21 +01:00
Silvan Mosberger
aba7e02e1c tests.nixpkgs-check-by-name: Minor README.md update 2024-01-17 11:10:54 +01:00
Keanu Kerr
28c4666e8b tests.nixpkgs-check-by-name: added test that fails multiple validity checks 2024-01-17 11:10:28 +01:00
Silvan Mosberger
9da57b5bd3 check-by-name/run-local.sh: Make it usable for non-CI platforms
Since https://github.com/NixOS/nixpkgs/pull/281374, the
nixpkgs-check-by-name tooling is pinned to a specific /nix/store path to
avoid having to evaluate Nixpkgs in CI.

The same path is used for local runs, but that doesn't actually work
when you're trying to run it on a platform different from CI.

This commit makes it work by being clearer about platforms and making
local runs check out the correct Nixpkgs to evaluate the tool from.
2024-01-17 10:45:23 +01:00
Silvan Mosberger
2dd7f0e8b9 tests.nixpkgs-check-by-name: Use NIX_PATH for extra test files
This avoids the need for a bunch of Rust code, but also enables us to
fairly easily make all the Nixpkgs tests evaluatable within the
nix-shell
2024-01-17 10:43:12 +01:00
Silvan Mosberger
64ad8b6836 tests.nixpkgs-check-by-name: Limit source files
To prevent more rebuilds than necessary
2024-01-17 10:40:03 +01:00
Silvan Mosberger
a48d8eafc6
Merge pull request #281390 from tweag/by-name-alias-fix
tests.nixpkgs-check-by-name: Fix for aliases to packages in `pkgs/by-name` and better testing
2024-01-17 10:37:42 +01:00
Silvan Mosberger
6d5f575fd0 check-by-name: Remove legacy script
fetch-tool.sh was decommissioned in
https://github.com/NixOS/nixpkgs/pull/281374, see the removed comment
for why it can only be removed now
2024-01-16 21:50:34 +01:00
Silvan Mosberger
0f27917d9a tests.nixpkgs-check-by-name: Don't error for pkgs/by-name aliases
This was an oversight in https://github.com/NixOS/nixpkgs/pull/275539
not accounted for, which would've failed in CI
2024-01-16 21:18:37 +01:00
Silvan Mosberger
3ebd239cd5 tests.nixpkgs-check-by-name: Test on the current Nixpkgs
This test actually fails right now
2024-01-16 21:15:42 +01:00
Silvan Mosberger
91b754edff tests.nixpkgs-check-by-name: Minor Nix build refactor 2024-01-16 21:15:40 +01:00
Silvan Mosberger
cc422e321e workflows/check-by-name: Pin nixpkgs-check-by-name tool
Before this, the tool for CI would update when nixos-unstable updated,
which is kind of terrible because you don't know when it happens, and it
might break master.

In fact, the tooling _right now_ has a serious bug and shouldn't be used!

This PR addresses this by _pinning_ the tooling in Nixpkgs itself.

Updating the tooling now requires two PRs:
- The first PR to update the tooling source
- (wait for Hydra to build and publish it in nixos-unstable)
- The second PR to update the pinned tooling

In turn you know exactly when the changes are going to take effect.

This change however has additional benefits:
- It makes CI more reproducible, because it doesn't depend on the state
  of nixos-unstable anymore
- Updates to the tooling can be tested with the workflow itself,
  because PRs that update the pinned tool will be tested on the updated
  version
- CI gets a sizable speed boost, because there's no need to download and
  evaluate a channel anymore
- It makes it more realistic to move the source of the tool into a
  separate repository
- It removes the brittle branch-specific logic that was previously
  needed to ensure that release branches use their own version of the
  tooling.
2024-01-16 19:58:19 +01:00
Doron Behar
3b6e224d12 tests.buildFHSEnv.libtinfo: fix by using overriden ncurses 2024-01-16 10:19:46 +02:00
Silvan Mosberger
f61d02708f
Merge pull request #275539 from tweag/by-name-enforce
[RFC 140 2a] `pkgs/by-name`: Enforce for new packages
2024-01-15 23:10:18 +01:00
Silvan Mosberger
aa7dd0b596 tests.nixpkgs-check-by-name: Improve lib path handling in tests
nix-build failed because the tests assume to run in a CWD equal to the
project root, which is not the case in the derivation build.

This commit fixes it by not using hacky `..` references to paths,
and instead uses NIX_PATH for all implicit Nix testing path
dependencies.

Also the root of the `lib` path gets passed in from the `default.nix`
file, so all the relative path handling is done by Nix during evaluation
already, and in the Nix store when possible.
2024-01-15 18:34:16 +01:00
Someone Serge
875e43dfd7
cudaPackages.cuda{,-library}-samples: move to cuda-modules/
cudaPackages are part of the package set and should not depend on pkgs/test
2024-01-12 20:24:50 +00:00
Someone Serge
27b277b63c
tests.cuda: inherit the ready cudaPackages_XX.cuda-samples
...fixing the broken eval
2024-01-12 20:24:50 +00:00
K900
e7b611e59d Merge remote-tracking branch 'origin/master' into staging-next 2024-01-12 13:59:54 +03:00
K900
8ef54ae956 pkgs/release: don't interpolate store paths unnecessarily
Avoids Nix 2.19 screaming about a path named ".version", also avoids creating
store paths of random subsets of nixpkgs.
2024-01-12 10:27:19 +03:00
Weijia Wang
2f9e98ccf3 Merge branch 'master' into staging-next 2024-01-10 23:12:44 +01:00
Weijia Wang
0373b68de5
Merge pull request #279581 from trofi/clang6Stdenv-and-co-removal
clang6Stdenv, clang-tools_6, clang_6, lld_6, lldb_6, llvm_6: remove
2024-01-10 23:11:42 +01:00
Silvan Mosberger
be26d74840 tests.nixpkgs-check-by-name: Add test for alternate callPackage's
Tests that alternate callPackage's don't give an error, so pkgs/by-name
is only required for pkgs.callPackage itself
2024-01-10 19:55:24 +01:00
Silvan Mosberger
d659d5f8ac tests.nixpkgs-check-by-name: Use real lib for tests
This way we can also detect regressions caused by lib
2024-01-10 19:43:17 +01:00
Silvan Mosberger
cbff02834f tests.nixpkgs-check-by-name: Sort the eval validation results
Not that important, but nice.
Also adds a nice test case show-casing the two current ratchet checks at
once.
2024-01-10 19:29:27 +01:00
Silvan Mosberger
57afdc545b tests.nixpkgs-check-by-name: Enforce pkgs/by-name for new packages 2024-01-10 19:29:26 +01:00
Silvan Mosberger
69fc71a82c tests.nixpkgs-check-by-name: Basic info for non-by-name attributes
In a future commit this will be extended
2024-01-10 19:28:19 +01:00
Doron Behar
92a0043ecf tests.buildFHSEnv.libtinfo: init 2024-01-10 08:17:07 +02:00