Skip to content

Commit 005c6c3

Browse files
committed
Exclude unsupported ghc versions for ci
1 parent 9e05b33 commit 005c6c3

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

ci.nix

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,40 @@
2121
permittedInsecurePackages = ["libdwarf-20210528" "libdwarf-20181024" "dwarfdump-20181024"];
2222
};
2323
};
24-
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: runTests: {
25-
inherit runTests;
26-
}) (
27-
# GHC version to cache and whether to run the tests against them.
28-
# This list of GHC versions should include everything for which we
29-
# have a ./materialized/ghcXXX directory containing the materialized
30-
# cabal-install and nix-tools plans. When removing a ghc version
31-
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
32-
# Update supported-ghc-versions.md to reflect any changes made here.
33-
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2205") {
34-
ghc865 = false;
35-
ghc8107 = false;
36-
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
37-
ghc865 = false;
38-
ghc884 = false; # Native version is used to boot 9.0.1
39-
ghc8107 = true;
40-
ghc902 = false;
41-
ghc924 = true;
42-
});
43-
systems = nixpkgsName: nixpkgs: compiler-nix-name: nixpkgs.lib.genAttrs (
44-
nixpkgs.lib.filter (v:
24+
compilerNixNames = nixpkgsName: nixpkgs:
25+
# Include only the GHC versions that are supported by haskell.nix
26+
nixpkgs.lib.filterAttrs (compiler-nix-name: _:
4527
# We have less x86_64-darwin build capacity so build fewer GhC versions
46-
(v != "x86_64-darwin" || (
28+
(system != "x86_64-darwin" || (
4729
!__elem compiler-nix-name ["ghc8104" "ghc810420210212" "ghc8105" "ghc8106" "ghc901" "ghc921" "ghc922"]))
4830
&&
4931
# aarch64-darwin requires ghc 8.10.7
50-
(v != "aarch64-darwin" || (
32+
(system != "aarch64-darwin" || (
5133
!__elem compiler-nix-name ["ghc865" "ghc884" "ghc8104" "ghc810420210212" "ghc8105" "ghc8106" "ghc901" "ghc921" "ghc922"]))
5234
&&
5335
# aarch64-linux requires ghc 8.8.4
54-
(v != "aarch64-linux" || (
36+
(system != "aarch64-linux" || (
5537
!__elem compiler-nix-name ["ghc865" "ghc8104" "ghc810420210212" "ghc8105" "ghc8106" "ghc901" "ghc921" "ghc922"]
56-
))) [ system ]) (v: v);
38+
)))
39+
(builtins.mapAttrs (compiler-nix-name: runTests: {
40+
inherit runTests;
41+
}) (
42+
# GHC version to cache and whether to run the tests against them.
43+
# This list of GHC versions should include everything for which we
44+
# have a ./materialized/ghcXXX directory containing the materialized
45+
# cabal-install and nix-tools plans. When removing a ghc version
46+
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
47+
# Update supported-ghc-versions.md to reflect any changes made here.
48+
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2205") {
49+
ghc865 = false;
50+
ghc8107 = false;
51+
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
52+
ghc865 = false;
53+
ghc884 = false; # Native version is used to boot 9.0.1
54+
ghc8107 = true;
55+
ghc902 = false;
56+
ghc924 = true;
57+
}));
5758
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name:
5859
# We need to use the actual nixpkgs version we're working with here, since the values
5960
# of 'lib.systems.examples' are not understood between all versions

0 commit comments

Comments
 (0)