[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED] Align CI scripts with master
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED at Glasgow Haskell Compiler / GHC Commits: a1992c60 by Sven Tennie at 2025-11-02T15:16:40+01:00 Align CI scripts with master - - - - - 3 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml Changes: ===================================== .gitlab/ci.sh ===================================== @@ -599,6 +599,20 @@ function install_bindist() { *) read -r -a args <<< "${INSTALL_CONFIGURE_ARGS:-}" + if [[ "${CROSS_TARGET:-no_cross_target}" =~ "mingw" ]]; then + # We suppose that host target = build target. + # By the fact above it is clearly turning out which host value is + # for currently built compiler. + # The fix for #21970 will probably remove this if-branch. + local -r CROSS_HOST_GUESS=$($SHELL ./config.guess) + args+=( "--target=$CROSS_TARGET" "--host=$CROSS_HOST_GUESS" ) + + # FIXME: The bindist configure script shouldn't need to be reminded of + # the target platform. See #21970. + elif [ -n "${CROSS_TARGET:-}" ]; then + args+=( "--target=$CROSS_TARGET" "--host=$CROSS_TARGET" ) + fi + run ${CONFIGURE_WRAPPER:-} ./configure \ --prefix="$instdir" \ "${args[@]+"${args[@]}"}" || fail "bindist configure failed" @@ -636,8 +650,28 @@ function test_hadrian() { if [[ "${CROSS_EMULATOR:-}" == "NOT_SET" ]]; then info "Cannot test cross-compiled build without CROSS_EMULATOR being set." return - # If we have set CROSS_EMULATOR, then can't test using normal testsuite. - elif [ -n "${CROSS_EMULATOR:-}" ] && [[ "${CROSS_TARGET:-}" != *"wasm"* ]]; then + # special case for JS backend + elif [ -n "${CROSS_TARGET:-}" ] && [ "${CROSS_EMULATOR:-}" == "js-emulator" ]; then + # The JS backend doesn't support CROSS_EMULATOR logic yet + unset CROSS_EMULATOR + # run "hadrian test" directly, not using the bindist, even though it did get installed. + # This is a temporary solution, See !9515 for the status of hadrian support. + run_hadrian \ + test \ + --summary-junit=./junit.xml \ + --test-have-intree-files \ + --docs=none \ + "runtest.opts+=${RUNTEST_ARGS:-}" \ + "runtest.opts+=--unexpected-output-dir=$TOP/unexpected-test-output" \ + || fail "cross-compiled hadrian main testsuite" + elif [[ -n "${CROSS_TARGET:-}" ]] && [[ "${CROSS_TARGET:-}" == *"wasm"* ]]; then + run_hadrian \ + test \ + --summary-junit=./junit.xml \ + "runtest.opts+=${RUNTEST_ARGS:-}" \ + "runtest.opts+=--unexpected-output-dir=$TOP/unexpected-test-output" \ + || fail "hadrian main testsuite targetting $CROSS_TARGET" + elif [ -n "${CROSS_TARGET:-}" ]; then local instdir="$TOP/_build/install" local test_compiler="$instdir/bin/${cross_prefix}ghc$exe" install_bindist _build/bindist/ghc-*/ "$instdir" @@ -702,18 +736,11 @@ function test_hadrian() { rm proftest.hs fi - # The check-exact check-ppr programs etc can not be built when testing a cross compiler. - if [ -z "${CROSS_TARGET:-}" ]; then - TEST_HAVE_INTREE="--test-have-intree-files" - else - TEST_HAVE_INTREE="" - fi - run_hadrian \ test \ --summary-junit=./junit.xml \ + --test-have-intree-files \ --test-compiler="${test_compiler}" \ - $TEST_HAVE_INTREE \ "runtest.opts+=${RUNTEST_ARGS:-}" \ "runtest.opts+=--unexpected-output-dir=$TOP/unexpected-test-output" \ || fail "hadrian main testsuite" ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -173,7 +173,7 @@ configureArgsStr :: BuildConfig -> String configureArgsStr bc = unwords $ ["--enable-unregisterised"| unregisterised bc ] ++ ["--disable-tables-next-to-code" | not (tablesNextToCode bc) ] - ++ ["--with-intree-gmp" | Just _ <- [crossTarget bc] ] + ++ ["--with-intree-gmp" | Just _ <- pure (crossTarget bc) ] ++ ["--with-system-libffi" | crossTarget bc == Just "wasm32-wasi" ] ++ ["--enable-ipe-data-compression" | withZstd bc ] ++ ["--enable-strict-ghc-toolchain-check"] @@ -1155,6 +1155,7 @@ debian_x86 = ] where validate_debian = Debian12 + perfProfilingJob arch sys buildConfig = -- Rename the job to avoid conflicts rename (<> "-perf") @@ -1278,7 +1279,7 @@ cross_jobs = [ (validateBuilds AArch64 (Linux Debian12Wine) (winAarch64Config {llvmBootstrap = True})) ] where - javascriptConfig = (crossConfig "javascript-unknown-ghcjs" NoEmulatorNeeded (Just "emconfigure")) + javascriptConfig = (crossConfig "javascript-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure")) { bignumBackend = Native } makeWinArmJobs = modifyJobs @@ -1317,6 +1318,7 @@ cross_jobs = [ modifyJobs ( -- See Note [Testing wasm ghci browser mode] setVariable "FIREFOX_LAUNCH_OPTS" "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}" + . setVariable "HADRIAN_ARGS" "--docs=no-sphinx-pdfs --docs=no-sphinx-man" . delVariable "INSTALL_CONFIGURE_ARGS" ) $ addValidateRule WasmBackend $ validateBuilds Amd64 (Linux AlpineWasm) cfg ===================================== .gitlab/jobs.yaml ===================================== @@ -1730,6 +1730,7 @@ "CROSS_STAGE": "2", "CROSS_TARGET": "wasm32-wasi", "FIREFOX_LAUNCH_OPTS": "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs --docs=no-sphinx-man", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-linux-alpine3_22-wasm-cross_wasm32-wasi-release+host_fully_static+text_simdutf", "XZ_OPT": "-9" @@ -1795,6 +1796,7 @@ "CROSS_STAGE": "2", "CROSS_TARGET": "wasm32-wasi", "FIREFOX_LAUNCH_OPTS": "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs --docs=no-sphinx-man", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-linux-alpine3_22-wasm-int_native-cross_wasm32-wasi-release+host_fully_static+text_simdutf", "XZ_OPT": "-9" @@ -1860,6 +1862,7 @@ "CROSS_STAGE": "2", "CROSS_TARGET": "wasm32-wasi", "FIREFOX_LAUNCH_OPTS": "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs --docs=no-sphinx-man", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-linux-alpine3_22-wasm-unreg-cross_wasm32-wasi-release+host_fully_static+text_simdutf", "XZ_OPT": "-9" @@ -2115,6 +2118,7 @@ "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check", "CONFIGURE_WRAPPER": "emconfigure", + "CROSS_EMULATOR": "js-emulator", "CROSS_STAGE": "2", "CROSS_TARGET": "javascript-unknown-ghcjs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", @@ -5839,6 +5843,7 @@ "CROSS_STAGE": "2", "CROSS_TARGET": "wasm32-wasi", "FIREFOX_LAUNCH_OPTS": "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs --docs=no-sphinx-man", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-linux-alpine3_22-wasm-cross_wasm32-wasi-release+host_fully_static+text_simdutf" } @@ -5904,6 +5909,7 @@ "CROSS_STAGE": "2", "CROSS_TARGET": "wasm32-wasi", "FIREFOX_LAUNCH_OPTS": "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs --docs=no-sphinx-man", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-linux-alpine3_22-wasm-int_native-cross_wasm32-wasi-release+host_fully_static+text_simdutf" } @@ -5969,6 +5975,7 @@ "CROSS_STAGE": "2", "CROSS_TARGET": "wasm32-wasi", "FIREFOX_LAUNCH_OPTS": "{\"browser\":\"firefox\",\"executablePath\":\"/usr/bin/firefox\"}", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs --docs=no-sphinx-man", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-linux-alpine3_22-wasm-unreg-cross_wasm32-wasi-release+host_fully_static+text_simdutf" } @@ -6220,6 +6227,7 @@ "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check", "CONFIGURE_WRAPPER": "emconfigure", + "CROSS_EMULATOR": "js-emulator", "CROSS_STAGE": "2", "CROSS_TARGET": "javascript-unknown-ghcjs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a1992c60db33633c2d6d2e7d9242c552... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a1992c60db33633c2d6d2e7d9242c552... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)