[Git][ghc/ghc][wip/t22599] ci: Upgrade darwin, windows and freebsd CI to use GHC-9.4.3

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri Jan 6 10:10:20 UTC 2023



Matthew Pickering pushed to branch wip/t22599 at Glasgow Haskell Compiler / GHC


Commits:
baa3e031 by Matthew Pickering at 2023-01-06T10:09:58+00:00
ci: Upgrade darwin, windows and freebsd CI to use GHC-9.4.3

Fixes #22599

- - - - -


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
=====================================
@@ -594,9 +594,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"
@@ -1793,9 +1793,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",
@@ -1852,9 +1852,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",
@@ -2225,9 +2225,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",
@@ -2957,9 +2957,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",
@@ -3017,9 +3017,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",
@@ -3145,9 +3145,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"
     }
@@ -4326,9 +4326,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",
@@ -4384,9 +4384,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/baa3e031735070ff25f4e05c2b14e084bcab4281

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/baa3e031735070ff25f4e05c2b14e084bcab4281
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/20230106/1918301f/attachment-0001.html>


More information about the ghc-commits mailing list