[Git][ghc/ghc][wip/26296] ci: Teach ci.sh to fetch FreeBSD artifacts from ghcup unofficial bindists and...

Zubin pushed to branch wip/26296 at Glasgow Haskell Compiler / GHC Commits: d3c25239 by Zubin Duggal at 2025-08-15T15:06:44+05:30 ci: Teach ci.sh to fetch FreeBSD artifacts from ghcup unofficial bindists and bootstrap compiler on FreeBSD to 9.10.1 Fixes #26296 - - - - - 3 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml Changes: ===================================== .gitlab/ci.sh ===================================== @@ -197,9 +197,6 @@ function set_toolchain_paths() { CABAL="$toolchain/bin/cabal$exe" HAPPY="$toolchain/bin/happy$exe" ALEX="$toolchain/bin/alex$exe" - if [ "$(uname)" = "FreeBSD" ]; then - GHC=/usr/local/bin/ghc - fi ;; nix) if [[ ! -f toolchain.sh ]]; then @@ -275,14 +272,35 @@ function setup() { } function fetch_ghc() { + local should_fetch=false + if [ ! -e "$GHC" ]; then + should_fetch=true + elif [ -n "${GHC_VERSION:-}" ]; then + local current_version + if current_version=$($GHC --numeric-version 2>/dev/null); then + if [ "$current_version" != "$GHC_VERSION" ]; then + info "GHC version mismatch: found $current_version, expected $GHC_VERSION" + should_fetch=true + fi + fi + fi + + if [ "$should_fetch" = true ]; then local v="$GHC_VERSION" if [[ -z "$v" ]]; then fail "neither GHC nor GHC_VERSION are not set" fi start_section fetch-ghc "Fetch GHC" - url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz" + case "$(uname)" in + FreeBSD) + url="https://downloads.haskell.org/ghcup/unofficial-bindists/ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz" + ;; + *) + url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz" + ;; + esac info "Fetching GHC binary distribution from $url..." curl "$url" > ghc.tar.xz || fail "failed to fetch GHC binary distribution" $TAR -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution" ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -446,7 +446,7 @@ opsysVariables _ FreeBSD14 = mconcat -- Prefer to use the system's clang-based toolchain and not gcc , "CC" =: "cc" , "CXX" =: "c++" - , "GHC_VERSION" =: "9.6.4" + , "GHC_VERSION" =: "9.10.1" , "CABAL_INSTALL_VERSION" =: "3.10.3.0" ] opsysVariables arch (Linux distro) = distroVariables arch distro ===================================== .gitlab/jobs.yaml ===================================== @@ -1467,7 +1467,7 @@ "CC": "cc", "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", "CXX": "c++", - "GHC_VERSION": "9.6.4", + "GHC_VERSION": "9.10.1", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-freebsd14-validate", @@ -4355,7 +4355,7 @@ "CC": "cc", "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", "CXX": "c++", - "GHC_VERSION": "9.6.4", + "GHC_VERSION": "9.10.1", "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "RUNTEST_ARGS": "", @@ -5782,7 +5782,7 @@ "CC": "cc", "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", "CXX": "c++", - "GHC_VERSION": "9.6.4", + "GHC_VERSION": "9.10.1", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-freebsd14-validate" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d3c2523909999ef1b7733ce0c0c5717e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d3c2523909999ef1b7733ce0c0c5717e... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)