diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-04-02 15:04:53 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-05 20:46:21 -0400 |
commit | 403bf88c568199d8d2a272a041faba96a47a5276 (patch) | |
tree | 43021ba47a3578631c71a58716dceab3dc85cfcf /.gitlab | |
parent | bfe8ef8e577a41ce9f29cb5f7879368f5e4b5897 (diff) | |
download | haskell-403bf88c568199d8d2a272a041faba96a47a5276.tar.gz |
Revert "[ci/arm/darwin/testsuite] Forwards ports from GHC-8.10"
This reverts commit 0cbdba2768d84a0f6832ae5cf9ea1e98efd739da.
Diffstat (limited to '.gitlab')
-rwxr-xr-x | .gitlab/ci.sh | 52 | ||||
-rw-r--r-- | .gitlab/shell.nix | 65 |
2 files changed, 24 insertions, 93 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index cc0369c1a6..68be7c8b2e 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -3,7 +3,9 @@ # This is the primary driver of the GitLab CI infrastructure. # Run `ci.sh usage` for usage information. -set -Eeuo pipefail + + +set -e -o pipefail # Configuration: HACKAGE_INDEX_STATE="2020-12-21T14:48:20Z" # TODO dedup with yaml's def @@ -171,18 +173,12 @@ function show_tool() { function set_toolchain_paths() { needs_toolchain="1" - case "$(uname -m)-$(uname)" in - *-Linux) needs_toolchain="" ;; + case "$(uname)" in + Linux) needs_toolchain="0" ;; *) ;; esac - if [[ -n "${IN_NIX_SHELL:-}" ]]; then - needs_toolchain="" - GHC="$(which ghc)" - CABAL="$(which cabal)" - HAPPY="$(which happy)" - ALEX="$(which alex)" - elif [[ -n "$needs_toolchain" ]]; then + if [[ "$needs_toolchain" = "1" ]]; then # These are populated by setup_toolchain GHC="$toolchain/bin/ghc$exe" CABAL="$toolchain/bin/cabal$exe" @@ -358,7 +354,7 @@ BUILD_SPHINX_HTML=$BUILD_SPHINX_HTML BUILD_SPHINX_PDF=$BUILD_SPHINX_PDF BeConservative=YES BIGNUM_BACKEND=$BIGNUM_BACKEND -XZ_CMD=${XZ:-} +XZ_CMD=$XZ BuildFlavour=$BUILD_FLAVOUR ifneq "\$(BuildFlavour)" "" @@ -367,7 +363,7 @@ endif GhcLibHcOpts+=-haddock EOF - if [ -n "${HADDOCK_HYPERLINKED_SOURCES:-}" ]; then + if [ -n "$HADDOCK_HYPERLINKED_SOURCES" ]; then echo "EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump" >> mk/build.mk fi @@ -386,7 +382,7 @@ function configure() { end_section "booting" local target_args="" - if [[ -n "${target_triple:-}" ]]; then + if [[ -n "$target_triple" ]]; then target_args="--target=$target_triple" fi @@ -394,7 +390,7 @@ function configure() { run ./configure \ --enable-tarballs-autodownload \ $target_args \ - ${CONFIGURE_ARGS:-} \ + $CONFIGURE_ARGS \ GHC="$GHC" \ HAPPY="$HAPPY" \ ALEX="$ALEX" \ @@ -407,10 +403,10 @@ function build_make() { if [[ -z "$BIN_DIST_PREP_TAR_COMP" ]]; then fail "BIN_DIST_PREP_TAR_COMP is not set" fi - if [[ -n "${VERBOSE:-}" ]]; then - MAKE_ARGS="${MAKE_ARGS:-} V=1" + if [[ -n "$VERBOSE" ]]; then + MAKE_ARGS="$MAKE_ARGS V=1" else - MAKE_ARGS="${MAKE_ARGS:-} V=0" + MAKE_ARGS="$MAKE_ARGS V=0" fi echo "include mk/flavours/${BUILD_FLAVOUR}.mk" > mk/build.mk @@ -426,7 +422,7 @@ function fetch_perf_notes() { } function push_perf_notes() { - if [ -n "${CROSS_TARGET:-}" ]; then + if [ -n "$CROSS_TARGET" ]; then info "Can't test cross-compiled build." return fi @@ -443,16 +439,16 @@ function determine_metric_baseline() { } function test_make() { - if [ -n "${CROSS_TARGET:-}" ]; then + if [ -n "$CROSS_TARGET" ]; then info "Can't test cross-compiled build." return fi run "$MAKE" test_bindist TEST_PREP=YES - run "$MAKE" V=0 VERBOSE=1 test \ + run "$MAKE" V=0 test \ THREADS="$cores" \ JUNIT_FILE=../../junit.xml \ - EXTRA_RUNTEST_OPTS="${RUNTEST_ARGS:-}" + EXTRA_RUNTEST_OPTS="$RUNTEST_ARGS" } function build_hadrian() { @@ -466,7 +462,7 @@ function build_hadrian() { } function test_hadrian() { - if [ -n "${CROSS_TARGET:-}" ]; then + if [ -n "$CROSS_TARGET" ]; then info "Can't test cross-compiled build." return fi @@ -480,7 +476,7 @@ function test_hadrian() { test \ --summary-junit=./junit.xml \ --test-compiler="$TOP"/_build/install/bin/ghc \ - "runtest.opts+=${RUNTEST_ARGS:-}" + "runtest.opts+=$RUNTEST_ARGS" } function cabal_test() { @@ -521,14 +517,14 @@ function run_hadrian() { if [ -z "$BUILD_FLAVOUR" ]; then fail "BUILD_FLAVOUR not set" fi - if [ -z "${BIGNUM_BACKEND:-}" ]; then BIGNUM_BACKEND="gmp"; fi - if [ -n "${VERBOSE:-}" ]; then HADRIAN_ARGS="${HADRIAN_ARGS:-} -V"; fi + if [ -z "$BIGNUM_BACKEND" ]; then BIGNUM_BACKEND="gmp"; fi + if [ -n "$VERBOSE" ]; then HADRIAN_ARGS="$HADRIAN_ARGS -V"; fi run hadrian/build-cabal \ --flavour="$BUILD_FLAVOUR" \ -j"$cores" \ - --broken-test="${BROKEN_TESTS:-}" \ + --broken-test="$BROKEN_TESTS" \ --bignum=$BIGNUM_BACKEND \ - ${HADRIAN_ARGS:-} \ + $HADRIAN_ARGS \ $@ } @@ -564,7 +560,7 @@ case "$(uname)" in *) fail "uname $(uname) is not supported" ;; esac -if [ -n "${CROSS_TARGET:-}" ]; then +if [ -n "$CROSS_TARGET" ]; then info "Cross-compiling for $CROSS_TARGET..." target_triple="$CROSS_TARGET" fi diff --git a/.gitlab/shell.nix b/.gitlab/shell.nix deleted file mode 100644 index 5e32847735..0000000000 --- a/.gitlab/shell.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ system ? "aarch64-darwin" -#, nixpkgs ? fetchTarball https://github.com/angerman/nixpkgs/archive/257cb120334.tar.gz #apple-silicon.tar.gz -, pkgs ? import <nixpkgs> { inherit system; } -, compiler ? if system == "aarch64-darwin" then "ghc8103Binary" else "ghc8103" -}: pkgs.mkShell { - # this prevents nix from trying to write the env-vars file. - # we can't really, as NIX_BUILD_TOP/env-vars is not set. - noDumpEnvVars=1; - - # stop polluting LDFLAGS with -liconv - dontAddExtraLibs = true; - - # we need to inject ncurses into --with-curses-libraries. - # the real fix is to teach terminfo to use libcurses on macOS. - CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=${pkgs.ncurses.out}/lib"; - - # magic speedup pony :facepalm: - # - # nix has the ugly habbit of duplicating ld flags more than necessary. This - # somewhat consolidates this. - shellHook = '' - export NIX_LDFLAGS=$(for a in $NIX_LDFLAGS; do echo $a; done |sort|uniq|xargs) - export NIX_LDFLAGS_FOR_TARGET=$(for a in $NIX_LDFLAGS_FOR_TARGET; do echo $a; done |sort|uniq|xargs) - export NIX_LDFLAGS_FOR_TARGET=$(comm -3 <(for l in $NIX_LDFLAGS_FOR_TARGET; do echo $l; done) <(for l in $NIX_LDFLAGS; do echo $l; done)) - ''; - - nativeBuildInputs = (with pkgs; [ - haskell.compiler.${compiler} - haskell.packages.${compiler}.cabal-install - haskell.packages.${compiler}.alex - haskell.packages.${compiler}.happy # _1_19_12 is needed for older GHCs. - - clang_11 - llvm_11 - - automake - autoconf - m4 - - gmp - ncurses - libiconv - zlib.out - zlib.dev - glibcLocales - # locale doesn't build yet :-/ - # locale - - git - - python3 - # python3Full - # python3Packages.sphinx - perl - - which - wget - file - - xz - xlibs.lndir - - cacert ]) - ++ (with pkgs.darwin.apple_sdk.frameworks; [ Foundation Security ]); -} |