summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml461
-rwxr-xr-x.circleci/fetch-submodules.sh9
-rwxr-xr-x.circleci/push-test-metrics.sh50
-rw-r--r--.gitlab-ci.yml6
-rwxr-xr-x.gitlab/prepare-system.sh (renamed from .circleci/prepare-system.sh)0
5 files changed, 3 insertions, 523 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index 261116d088..0000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,461 +0,0 @@
-# Questions about this file?
-# See https://gitlab.haskell.org/ghc/ghc/wikis/continuous-integration/usage.
-
-version: 2
-
-aliases:
- - &defaults
- working_directory: ~/ghc
- - &prepare
- run:
- name: prepare-system
- command: .circleci/prepare-system.sh
- - &submodules
- run:
- name: submodules
- command: .circleci/fetch-submodules.sh
- - &buildenv
- # ideally we would simply set THREADS here instead of re-detecting it every
- # time we need it below. Unfortunately, there is no way to set an environment
- # variable with the result of a shell script.
- SKIP_PERF_TESTS: NO
- VERBOSE: 2
- - &boot
- run:
- name: Boot
- command: |
- ./boot
- - &set_git_identity
- run:
- name: Set Git Identity
- command: |
- git config user.email "ghc-circleci@haskell.org"
- git config user.name "GHC CircleCI"
- - &configure_unix
- run:
- name: Configure
- command: ./configure
- - &configure_unix_32
- run:
- name: Configure
- command: |
- setarch i386 ./configure --with-ghc=/opt/ghc-i386/8.4.2/bin/ghc
- - &configure_bsd
- run:
- name: Configure
- command: ./configure --target=x86_64-unknown-freebsd10
- - &configure_unreg
- run:
- name: Configure
- command: ./configure --enable-unregisterised
- - &make
- run:
- name: Build
- command: "make -j`mk/detect-cpu-count.sh` V=0"
- - &build_hadrian
- run:
- name: Build GHC using Hadrian
- command: |
- cabal update
- hadrian/build.sh -j`mk/detect-cpu-count.sh`
- - &test
- run:
- name: Test
- command: |
- mkdir -p test-results
- METRICS_FILE=$(mktemp)
- echo "export METRICS_FILE=$METRICS_FILE" >> $BASH_ENV
- make test THREADS=`mk/detect-cpu-count.sh` SKIP_PERF_TESTS=$SKIP_PERF_TESTS TEST_ENV=$TEST_ENV JUNIT_FILE=../../test-results/junit.xml METRICS_FILE=$METRICS_FILE
- - &store_test_results
- store_test_results:
- path: test-results
- - &push_perf_note
- run:
- name: Push Performance Git Notes
- command: .circleci/push-test-metrics.sh
- - &store_test_artifacts
- store_artifacts:
- # we might want to add the whole output of the test phase
- # too at some point
- path: test-results/junit.xml
- - &slowtest
- run:
- name: Full Test
- command: |
- mkdir -p test-results
- make slowtest SKIP_PERF_TESTS=YES THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../test-results/junit.xml
- - &bindist
- run:
- name: Create bindist
- # Reduce compression effort to 3
- command: make binary-dist TAR_COMP_OPTS="-2" && mv ghc*.tar.xz ghc.tar.xz
- # Building bindist takes ~15 minutes without output, account for
- # that.
- no_output_timeout: "30m"
- - &store_bindist
- store_artifacts:
- path: ghc.tar.xz
- - &only_release_tags
- tags:
- only: /^ghc-.*/
- - &ignore_gitlab_branches
- branches:
- ignore: /^gitlab\/.*/
-
-jobs:
- "validate-x86_64-freebsd":
- docker:
- - image: ghcci/x86_64-freebsd
- environment:
- TARGET: FreeBSD
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: x86_64-freebsd
- TEST_ENV: x86_64-freebsd
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_bsd
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-x86_64-darwin":
- macos:
- xcode: "9.0"
- environment:
- # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex
- BUILD_SPHINX_PDF: "NO"
- MACOSX_DEPLOYMENT_TARGET: "10.7"
- # Only Sierra and onwards supports clock_gettime. See #12858
- ac_cv_func_clock_gettime: "no"
- GHC_COLLECTOR_FLAVOR: x86_64-darwin
- <<: *buildenv
- TEST_ENV: x86_64-darwin
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-x86_64-linux-deb8":
- docker:
- - image: ghcci/x86_64-linux-deb8:0.1
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: x86_64-linux
- TEST_ENV: x86_64-linux-deb8
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-x86_64-linux-deb9-integer-simple":
- docker:
- - image: ghcci/x86_64-linux-deb9:0.2
- environment:
- <<: *buildenv
- INTEGER_LIBRARY: integer-simple
- GHC_COLLECTOR_FLAVOR: x86_64-linux-deb9
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-x86_64-linux-deb9":
- docker:
- - image: ghcci/x86_64-linux-deb9:0.1
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: x86_64-linux-deb9
- TEST_ENV: x86_64-linux-deb9
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-hadrian-x86_64-linux-deb8":
- docker:
- - image: ghcci/x86_64-linux-deb8:0.1
- environment:
- <<: *buildenv
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *build_hadrian
-
- "validate-x86_64-linux-deb8-unreg":
- docker:
- - image: ghcci/x86_64-linux-deb8:0.1
- environment:
- <<: *buildenv
- TEST_ENV: x86_64-linux-deb8-unreg
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unreg
- - *make
- - *test
- - *store_test_results
- - *push_perf_note
- - *store_test_artifacts
-
- "validate-x86_64-linux-deb9-llvm":
- docker:
- - image: ghcci/x86_64-linux-deb9:0.2
- environment:
- <<: *buildenv
- BUILD_FLAVOUR: perf-llvm
- TEST_ENV: x86_64-linux-deb9-llvm
- steps:
- - run:
- name: Verify that llc works
- command: llc
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- # Nightly build with -DDEBUG using devel2 flavour
- "validate-x86_64-linux-deb8-debug":
- docker:
- - image: ghcci/x86_64-linux-deb8:0.1
- environment:
- BUILD_FLAVOUR: devel2
- <<: *buildenv
- TEST_ENV: x86_64-linux-deb8-debug
- SKIP_PERF_TESTS: YES
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-i386-linux-deb9":
- docker:
- - image: ghcci/i386-linux-deb9:0.2
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: i386-linux-deb9
- TEST_ENV: i386-linux-deb9
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix_32
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-i386-linux-deb8":
- docker:
- - image: ghcci/i386-linux-deb8:0.1
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: i386-linux
- TEST_ENV: i386-linux-deb8
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix_32
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-x86_64-linux-centos7":
- docker:
- - image: ghcci/x86_64-linux-centos7:0.1
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: x86_64-centos7
- LANG: en_US.UTF-8
- TEST_ENV: x86_64-centos7
- # Sphinx is too old
- BUILD_SPHINX_PDF: NO
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "validate-x86_64-linux-fedora27":
- docker:
- - image: ghcci/x86_64-linux-fedora27:0.1
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: x86_64-fedora
- TEST_ENV: x86_64-linux-fedora27
- steps:
- - checkout
- - *set_git_identity
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *bindist
- - *store_bindist
- - *test
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
- "slow-validate-x86_64-linux-deb8":
- docker:
- - image: ghcci/x86_64-linux-deb8:0.1
- environment:
- <<: *buildenv
- GHC_COLLECTOR_FLAVOR: x86_64-linux-deb8
- steps:
- - checkout
- - *prepare
- - *submodules
- - *boot
- - *configure_unix
- - *make
- - *slowtest
- - *store_test_results
- - *store_test_artifacts
- - *push_perf_note
-
-workflows:
- version: 2
- validate:
- jobs:
- - validate-x86_64-linux-deb8:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
- # FreeBSD disabled: https://github.com/haskell/unix/issues/102
- # - validate-x86_64-freebsd
- - validate-x86_64-darwin:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
- - validate-x86_64-linux-deb8-llvm:
- filters:
- <<: *ignore_gitlab_branches
- - validate-i386-linux-deb8:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
- - validate-x86_64-linux-deb9:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
- - validate-i386-linux-deb9:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
- - validate-x86_64-linux-centos7:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
- - validate-hadrian-x86_64-linux-deb8:
- filters:
- <<: *ignore_gitlab_branches
- - validate-x86_64-linux-fedora27:
- filters:
- <<: [*only_release_tags, *ignore_gitlab_branches]
-
- nightly:
- triggers:
- - schedule:
- cron: "0 0 * * *"
- filters:
- branches:
- only:
- - master
- jobs:
- - validate-x86_64-linux-deb8-unreg
- - validate-x86_64-linux-deb8-llvm
- - validate-x86_64-linux-deb8-debug
- - validate-x86_64-linux-deb9
- - validate-x86_64-linux-deb9-integer-simple
- - slow-validate-x86_64-linux-deb8
-
-notify:
- webhooks:
- - url: https://phabricator.haskell.org/harbormaster/hook/circleci/
diff --git a/.circleci/fetch-submodules.sh b/.circleci/fetch-submodules.sh
deleted file mode 100755
index 7279d21fd4..0000000000
--- a/.circleci/fetch-submodules.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-
-# Use github.com/ghc for those submodule repositories we couldn't connect to.
-git config remote.origin.url git://github.com/ghc/ghc.git
-git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
-git submodule init # Don't be quiet, we want to show these urls.
-git submodule --quiet update --recursive # Now we can be quiet again.
diff --git a/.circleci/push-test-metrics.sh b/.circleci/push-test-metrics.sh
deleted file mode 100755
index e383a4c4e7..0000000000
--- a/.circleci/push-test-metrics.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env bash
-# vim: sw=2 et
-set -euo pipefail
-
-fail() {
- echo "ERROR: $*" >&2
- exit 1
-}
-
-if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:ghc/ghc.git" ]; then
- exit 0
-fi
-
-GHC_ORIGIN=git@git.haskell.org:ghc
-
-# Add git.haskell.org as a known host.
-echo "|1|F3mPVCE55+KfApNIMYQ3Dv39sGE=|1bRkvJEJhAN2R0LE/lAjFCEJGl0= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBUZS9jGBkE5UzpSo6irnIgcQcfzvbuIOsFc8+N61FwtZncRntbaKPuUimOFPgeaUZLl6Iajz6IIs7aduU0/v+I=" >> ~/.ssh/known_hosts
-echo "|1|2VUMjYSRVpT2qJPA0rA9ap9xILY=|5OThkI4ED9V0J+Es7D5FOD55Klk= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+3TLluLAO4lkW60W+N2DFkS+WoRFGqLwHzgd1ifxG9TIm31wChPY3E/hgMnJmgGqWCF4UDUemmyCycEaL7FtKfzjTAclg9EfpQnozyE3T5hIo2WL7SN5O8ttG/bYGuDnn14jLnWwJyN4oz/znWFiDG9e2Oc9YFNlQ+PK8ae5xR4gqBB7EOoj9J1EiPqG2OXRr5Mei3TLsRDU6fnz/e4oFJpKWWeN6M63oePv0qoaGjxcrATZUWsuWrxVMmYo9kP1xRuFJbAUw2m4uVP+793SW1zxySi1HBMtJG+gCDdZZSwYbkV1hassLWBHv1qPttncfX8Zek3Z3VolaTmfWJTo9" >> ~/.ssh/known_hosts
-
-# Check that a git notes dont already exist.
-# This is a percausion as we reset refs/notes/perf and we want to avoid data loss.
-if [ $(git notes --ref=perf list | wc -l) -ne 0 ]
-then
- fail "Found an existing git note on HEAD. Expected no git note."
-fi
-
-# Assert that the METRICS_FILE exists and can be read.
-if [ "$METRICS_FILE" = "" ] || ! [ -r $METRICS_FILE ]
-then
- fail "Metrics file not found: $METRICS_FILE"
-fi
-
-# Reset the git notes and append the metrics file to the notes, then push and return the result.
-# This is favoured over a git notes merge as it avoids potential data loss/duplication from the merge strategy.
-function reset_append_note_push {
- git fetch -f $GHC_ORIGIN refs/notes/perf:refs/notes/perf || true
- echo "git notes --ref=perf append -F $METRICS_FILE HEAD"
- git notes --ref=perf append -F $METRICS_FILE HEAD
- git push $GHC_ORIGIN refs/notes/perf
-}
-
-# Push the metrics file as a git note. This may fail if another task pushes a note first. In that case
-# the latest note is fetched and appended.
-MAX_RETRY=20
-until reset_append_note_push || [ $MAX_RETRY -le 0 ]
-do
- ((MAX_RETRY--))
- echo ""
- echo "Failed to push git notes. Fetching, appending, and retrying... $MAX_RETRY retries left."
-done
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d17d36674e..c83b10f688 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -154,7 +154,7 @@ lint-release-changelogs:
script:
- cabal update
- git clean -xdf && git submodule foreach git clean -xdf
- - bash .circleci/prepare-system.sh
+ - .gitlab/prepare-system.sh
- if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
- ./boot
- ./configure $CONFIGURE_ARGS
@@ -205,7 +205,7 @@ hadrian-ghc-in-ghci:
- cabal update
- cd hadrian; cabal new-build --project-file=ci.project; cd ..
- git clean -xdf && git submodule foreach git clean -xdf
- - bash .circleci/prepare-system.sh
+ - .gitlab/prepare-system.sh
- if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
- ./boot
- ./configure $CONFIGURE_ARGS
@@ -353,7 +353,7 @@ validate-x86_64-darwin:
echo "EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump" >> mk/build.mk
fi
- - bash .circleci/prepare-system.sh
+ - .gitlab/prepare-system.sh
# workaround for docker permissions
- sudo chown ghc:ghc -R .
after_script:
diff --git a/.circleci/prepare-system.sh b/.gitlab/prepare-system.sh
index fbbb81b260..fbbb81b260 100755
--- a/.circleci/prepare-system.sh
+++ b/.gitlab/prepare-system.sh