diff options
Diffstat (limited to '.circleci/config.yml')
-rw-r--r-- | .circleci/config.yml | 108 |
1 files changed, 85 insertions, 23 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ee6c48b21..e38d265c29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,28 +1,90 @@ version: 2 -jobs: - build: + +aliases: + - &defaults working_directory: ~/ghc + - &prepare + run: + name: prepare-system + command: .circleci/prepare-system.sh + - &submodules + run: + name: submodules + command: .circleci/fetch-submodules.sh + - &build + run: + name: build + command: .circleci/build.sh + # Building bindist takes ~15 minutes without output, account for + # that. + no_output_timeout: "30m" + - &collectartifacts + run: + name: collect artifacts + # We need this because CircleCI expects a path without + # wildcards but bindist archive name is not static + command: | + mkdir -p /tmp/artifacts + pwd + find . + cp ghc*.tar.xz /tmp/artifacts + +jobs: + "validate-x86_64-linux": + resource_class: xlarge docker: - - image: haskell:8 + - image: haskell:8.2 + steps: + # Make sure we have proper openssh before checkout: CircleCI git + # does not check the repository out properly without it and also + # takes 20 times longer than it should be. + - run: + name: install openssh + command: | + apt-get update -qq + apt-get install -y openssh-client + - checkout + - *prepare + - *submodules + - *build + - *collectartifacts + - store-artifacts: + path: /tmp/artifacts + + "validate-x86_64-freebsd": resource_class: xlarge + docker: + - image: tweag/toolchain-x86_64-freebsd + environment: + TARGET: FreeBSD + steps: + - run: + name: install git + command: | + apt-get update -qq + apt-get install -qy openssh-client + - checkout + - *prepare + - *submodules + - *build + + "validate-x86_64-darwin": + macos: + xcode: "9.0" steps: - - run: - name: git - command: | - apt-get update - apt-get install -y git openssh-client make automake autoconf gcc perl python3 - - checkout - - run: - name: submodules - command: | - # 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. - - run: - name: build - command: | - echo 'BUILD_SPHINX_HTML = NO' >> mk/validate.mk - echo 'BUILD_SPHINX_PDF = NO' >> mk/validate.mk - THREADS=8 SKIP_PERF_TESTS=YES VERBOSE=2 ./validate --fast --quiet + - checkout + - *prepare + - *submodules + - *build + - *collectartifacts + - store-artifacts: + path: /tmp/artifacts + +workflows: + version: 2 + validate: + jobs: + - validate-x86_64-linux + # FreeBSD disabled: https://github.com/haskell/unix/issues/102 + # - validate-x86_64-freebsd + - validate-x86_64-darwin |