diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2021-02-24 10:43:59 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2021-03-07 22:19:18 +0800 |
commit | 037e0267640a7f03fb1083b588fc192dc0977eaa (patch) | |
tree | b63b6f6714fc137aae1bb6b36dfb92bcc2abd45f /.gitlab-ci.yml | |
parent | be3c5bc34c4b3a6c02bb6820a3a4cfc6ecd68b7e (diff) | |
download | haskell-037e0267640a7f03fb1083b588fc192dc0977eaa.tar.gz |
Add x86_64-darwin via M1
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 93 |
1 files changed, 76 insertions, 17 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2da85a7783..f792b96d92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -388,39 +388,98 @@ release-x86_64-freebsd: # x86_64-darwin ################################# -validate-x86_64-darwin: +# validate-x86_64-darwin: +# extends: .validate +# stage: full-build +# tags: +# - x86_64-darwin +# variables: +# GHC_VERSION: 8.6.5 +# CABAL_INSTALL_VERSION: 3.0.0.0 +# BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-apple-darwin.tar.xz" +# MACOSX_DEPLOYMENT_TARGET: "10.7" +# # Only Sierra and onwards supports clock_gettime. See #12858 +# ac_cv_func_clock_gettime: "no" +# LANG: "en_US.UTF-8" +# CONFIGURE_ARGS: "--with-intree-gmp" +# TEST_ENV: "x86_64-darwin" +# BUILD_FLAVOUR: "perf" +# after_script: +# - cp -Rf $HOME/.cabal cabal-cache +# - .gitlab/ci.sh clean +# artifacts: +# when: always +# expire_in: 2 week +# cache: +# key: "darwin-$GHC_VERSION" +# paths: +# - cabal-cache +# - toolchain + +validate-aarch64-darwin: extends: .validate stage: full-build tags: - x86_64-darwin + - m1 + + # for now make this non mandatory to pass. + allow_failure: true + variables: - GHC_VERSION: 8.6.5 - CABAL_INSTALL_VERSION: 3.0.0.0 + TEST_TYPE: test + MAKE_ARGS: "-Werror" + GHC_VERSION: 8.10.3 + CABAL_INSTALL_VERSION: 3.2.0.0 + BUILD_FLAVOUR: "quick" BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-apple-darwin.tar.xz" - MACOSX_DEPLOYMENT_TARGET: "10.7" - # Only Sierra and onwards supports clock_gettime. See #12858 - ac_cv_func_clock_gettime: "no" + # we run on M1's for now, getconf can't be built with nix yet, + # and we use a pure shell, so we can't/shouldn't use /usr/bin/getconf + # inside th shell. + CPUS: 8 LANG: "en_US.UTF-8" + # WARNING: this is overridden in the shell.nix, see shell.nix! CONFIGURE_ARGS: "--with-intree-gmp" - TEST_ENV: "x86_64-darwin" - BUILD_FLAVOUR: "perf" - after_script: - - cp -Rf $HOME/.cabal cabal-cache - - .gitlab/ci.sh clean + + # I wish we could just use the nix #! logic, but we can't --run and -i bash + # behave very differently. -i bash does not pass any nix related env vars + # the whole $stdenv/setup part seems to be missing. + script: | + set -Eeuo pipefail + function runInNixShell() { + nix-shell .gitlab/shell.nix \ + -I nixpkgs=https://github.com/angerman/nixpkgs/archive/257cb120334.tar.gz \ + --argstr system "x86_64-darwin" \ + --pure \ + --keep GHC_VERSION --keep CABAL_INSTALL_VERSION --keep BUILD_FLAVOUR \ + --keep BIN_DIST_PREP_TAR_COMP --keep CPUS --keep PROJECT_DIR \ + --keep CI_PROJECT_DIR --keep MAKE_ARGS \ + --keep LANG --keep CONFIGURE_ARGS \ + --run "$1" + } + # fix up config.sub in libraries for the time. + # aarch64-darwin is not supported in older config.sub's + find libraries -name config.sub -exec cp config.sub {} \; + runInNixShell ".gitlab/ci.sh setup" + runInNixShell ".gitlab/ci.sh configure" + runInNixShell ".gitlab/ci.sh build_make" + runInNixShell ".gitlab/ci.sh test_make" + artifacts: - when: always + reports: + junit: junit.xml expire_in: 2 week - cache: - key: "darwin-$GHC_VERSION" paths: - - cabal-cache - - toolchain + - $BIN_DIST_PREP_TAR_COMP + - junit.xml + - performance-metrics.tsv validate-aarch64-darwin: extends: .validate stage: full-build tags: - aarch64-darwin + - m1 # for now make this non mandatory to pass. allow_failure: true @@ -430,7 +489,7 @@ validate-aarch64-darwin: MAKE_ARGS: "-Werror" GHC_VERSION: 8.10.3 CABAL_INSTALL_VERSION: 3.2.0.0 - BUILD_FLAVOUR: "quick" + BUILD_FLAVOUR: "perf" BIN_DIST_PREP_TAR_COMP: "ghc-arm64-apple-darwin.tar.xz" # we run on M1's for now, getconf can't be built with nix yet, # and we use a pure shell, so we can't/shouldn't use /usr/bin/getconf |