[Git][ghc/ghc][ghc-9.6] ci: Upgrade darwin, windows and freebsd CI to use GHC-9.4.3
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Tue Jan 10 16:10:17 UTC 2023
Matthew Pickering pushed to branch ghc-9.6 at Glasgow Haskell Compiler / GHC
Commits:
da3f7b74 by Matthew Pickering at 2023-01-10T16:08:50+00:00
ci: Upgrade darwin, windows and freebsd CI to use GHC-9.4.3
Fixes #22599
(cherry picked from commit c306d939d2e1b08cbe683bb9829a4b4010948010)
- - - - -
4 changed files:
- .gitlab/ci.sh
- .gitlab/darwin/toolchain.nix
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -213,10 +213,14 @@ function set_toolchain_paths() {
x86_64-darwin|aarch64-darwin) ;;
*) fail "unknown NIX_SYSTEM" ;;
esac
- nix build -f .gitlab/darwin/toolchain.nix --argstr system "$NIX_SYSTEM" -o toolchain.sh
+ info "Building toolchain for $NIX_SYSTEM"
+ nix-build .gitlab/darwin/toolchain.nix --argstr system "$NIX_SYSTEM" -o toolchain.sh
cat toolchain.sh
fi
- source toolchain.sh ;;
+ source toolchain.sh
+ info "--info for GHC for $NIX_SYSTEM"
+ $GHC --info
+ ;;
env)
# These are generally set by the Docker image but
# we provide these handy fallbacks in case the
@@ -320,7 +324,7 @@ function fetch_cabal() {
MINGW64) cabal_arch="x86_64" ;;
*) fail "unknown MSYSTEM $MSYSTEM" ;;
esac
- url="https://downloads.haskell.org/~cabal/cabal-install-$v/cabal-install-$v-$cabal_arch-unknown-mingw32.zip"
+ url="https://downloads.haskell.org/~cabal/cabal-install-$v/cabal-install-$v-$cabal_arch-windows.zip"
info "Fetching cabal binary distribution from $url..."
curl "$url" > "$TMP/cabal.zip"
unzip "$TMP/cabal.zip"
=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -15,16 +15,16 @@ let
ghcBindists = let version = ghc.version; in {
aarch64-darwin = pkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz";
- sha256 = "sha256:0p2f35pihlnmkm7x73b5xm3dyhiczrywc19khr7i7vb2q1y4zw6i";
+ sha256 = "sha256:10pby1idpxhkjqsi56jivkymhnabsdr8m2x8gdqchnv5113hl72k";
};
x86_64-darwin = pkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
- sha256 = "sha256:0gzq0vfjbhr9n8z63capvdwrw7bisy15d5c1y1gynfix13bbnjlk";
+ sha256 = "sha256:012yzyangk26sdapnz4226prgb8jgpf6k5bd9qxsdykk5x7jc7ah";
};
};
ghc = pkgs.stdenv.mkDerivation rec {
- version = "9.2.2";
+ version = "9.4.3";
name = "ghc";
src = ghcBindists.${pkgs.stdenv.hostPlatform.system};
configureFlags = [
@@ -38,6 +38,21 @@ let
];
buildPhase = "true";
+ # This is a horrible hack because the configure script invokes /usr/bin/clang
+ # without a `--target` flag. Then depending on whether the `nix` binary itself is
+ # a native x86 or arm64 binary means that /usr/bin/clang thinks it needs to run in
+ # x86 or arm64 mode.
+
+ # The correct answer for the check in question is the first one we try, so by replacing
+ # the condition to true; we select the right C++ standard library still.
+ preConfigure = ''
+ sed "s/\"\$CC\" -o actest actest.o \''${1} 2>\/dev\/null/true/i" configure > configure.new
+ mv configure.new configure
+ chmod +x configure
+ cat configure
+
+ '';
+
# N.B. Work around #20253.
nativeBuildInputs = [ pkgs.gnused ];
postInstallPhase = ''
=====================================
.gitlab/gen_ci.hs
=====================================
@@ -349,8 +349,8 @@ opsysVariables _ FreeBSD13 = mconcat
-- [1] https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html)
"CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib"
, "HADRIAN_ARGS" =: "--docs=no-sphinx"
- , "GHC_VERSION" =: "9.2.2"
- , "CABAL_INSTALL_VERSION" =: "3.6.2.0"
+ , "GHC_VERSION" =: "9.4.3"
+ , "CABAL_INSTALL_VERSION" =: "3.8.1.0"
]
opsysVariables _ (Linux distro) = distroVariables distro
opsysVariables AArch64 (Darwin {}) =
@@ -378,8 +378,8 @@ opsysVariables _ (Windows {}) =
mconcat [ "MSYSTEM" =: "MINGW64"
, "HADRIAN_ARGS" =: "--docs=no-sphinx"
, "LANG" =: "en_US.UTF-8"
- , "CABAL_INSTALL_VERSION" =: "3.2.0.0"
- , "GHC_VERSION" =: "9.2.2" ]
+ , "CABAL_INSTALL_VERSION" =: "3.8.1.0"
+ , "GHC_VERSION" =: "9.4.3" ]
opsysVariables _ _ = mempty
=====================================
.gitlab/jobs.yaml
=====================================
@@ -477,9 +477,9 @@
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-freebsd13-validate",
"BUILD_FLAVOUR": "validate",
- "CABAL_INSTALL_VERSION": "3.6.2.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"TEST_ENV": "x86_64-freebsd13-validate",
"XZ_OPT": "-9"
@@ -1676,9 +1676,9 @@
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-windows-int_native-validate",
"BUILD_FLAVOUR": "validate",
- "CABAL_INSTALL_VERSION": "3.2.0.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"LANG": "en_US.UTF-8",
"MSYSTEM": "MINGW64",
@@ -1735,9 +1735,9 @@
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-windows-validate",
"BUILD_FLAVOUR": "validate",
- "CABAL_INSTALL_VERSION": "3.2.0.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"LANG": "en_US.UTF-8",
"MSYSTEM": "MINGW64",
@@ -2048,9 +2048,9 @@
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-freebsd13-release",
"BUILD_FLAVOUR": "release",
- "CABAL_INSTALL_VERSION": "3.6.2.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
"TEST_ENV": "x86_64-freebsd13-release",
@@ -2780,9 +2780,9 @@
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-windows-int_native-release+no_split_sections",
"BUILD_FLAVOUR": "release+no_split_sections",
- "CABAL_INSTALL_VERSION": "3.2.0.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
"LANG": "en_US.UTF-8",
@@ -2840,9 +2840,9 @@
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-windows-release+no_split_sections",
"BUILD_FLAVOUR": "release+no_split_sections",
- "CABAL_INSTALL_VERSION": "3.2.0.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
"LANG": "en_US.UTF-8",
@@ -2968,9 +2968,9 @@
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-freebsd13-validate",
"BUILD_FLAVOUR": "validate",
- "CABAL_INSTALL_VERSION": "3.6.2.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"TEST_ENV": "x86_64-freebsd13-validate"
}
@@ -4149,9 +4149,9 @@
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-windows-int_native-validate",
"BUILD_FLAVOUR": "validate",
- "CABAL_INSTALL_VERSION": "3.2.0.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"LANG": "en_US.UTF-8",
"MSYSTEM": "MINGW64",
@@ -4207,9 +4207,9 @@
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-windows-validate",
"BUILD_FLAVOUR": "validate",
- "CABAL_INSTALL_VERSION": "3.2.0.0",
+ "CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
- "GHC_VERSION": "9.2.2",
+ "GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"LANG": "en_US.UTF-8",
"MSYSTEM": "MINGW64",
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/da3f7b74dae7075a290aa07c5dfbef44905fc003
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/da3f7b74dae7075a290aa07c5dfbef44905fc003
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230110/b2f1a8d6/attachment-0001.html>
More information about the ghc-commits
mailing list