summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-12-13 00:26:59 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-13 21:59:20 -0500
commitf4ac0b0c73298de7a3223825274793215cbd2e86 (patch)
treec17e1023bb87342b8a9c2896631fbc35982c86b7
parent4d7764657251ad374fe12117d53dc4460b0c58bf (diff)
downloadhaskell-f4ac0b0c73298de7a3223825274793215cbd2e86.tar.gz
gitlab-ci: Add LLVM way
-rw-r--r--.circleci/config.yml12
-rwxr-xr-x.circleci/images/update-image1
-rw-r--r--.circleci/images/x86_64-linux-deb9/Dockerfile9
-rwxr-xr-x.circleci/prepare-system.sh8
-rw-r--r--.gitlab-ci.yml16
5 files changed, 33 insertions, 13 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index d455940f7b..ed10d21c6c 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -25,13 +25,6 @@ aliases:
name: Boot
command: |
./boot
-
- cat <<EOF >> mk/build.mk
- BuildFlavour=$BUILD_FLAVOUR
- ifneq "\$(BuildFlavour)" ""
- include mk/flavours/\$(BuildFlavour).mk
- endif
- EOF
- &set_git_identity
run:
name: Set Git Identity
@@ -187,7 +180,7 @@ jobs:
"validate-x86_64-linux-deb9-integer-simple":
resource_class: xlarge
docker:
- - image: ghcci/x86_64-linux-deb9:0.1
+ - image: ghcci/x86_64-linux-deb9:0.2
environment:
<<: *buildenv
INTEGER_LIBRARY: integer-simple
@@ -277,7 +270,6 @@ jobs:
- run:
name: Install LLVM
command: |
- curl http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-linux-gnu-debian8.tar.xz | tar -xJC ..
echo "export PATH=`pwd`/../clang+llvm-6.0.0-x86_64-linux-gnu-debian8/bin:\$PATH" >> $BASH_ENV
- run:
name: Verify that llc works
@@ -320,7 +312,7 @@ jobs:
"validate-i386-linux-deb9":
resource_class: xlarge
docker:
- - image: ghcci/i386-linux-deb9:0.1
+ - image: ghcci/i386-linux-deb9:0.2
environment:
<<: *buildenv
GHC_COLLECTOR_FLAVOR: i386-linux-deb9
diff --git a/.circleci/images/update-image b/.circleci/images/update-image
index 9900b354da..dd69122c1f 100755
--- a/.circleci/images/update-image
+++ b/.circleci/images/update-image
@@ -30,4 +30,5 @@ docker push $repo/$name:$version
repo_name="$repo/$name"
sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../config.yml
+sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../../.gitlab-ci.yml
echo "Built, pushed, and bumped $name:$version"
diff --git a/.circleci/images/x86_64-linux-deb9/Dockerfile b/.circleci/images/x86_64-linux-deb9/Dockerfile
index 6d14daaf8d..5341abe6ef 100644
--- a/.circleci/images/x86_64-linux-deb9/Dockerfile
+++ b/.circleci/images/x86_64-linux-deb9/Dockerfile
@@ -22,6 +22,15 @@ RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
+# LLVM
+ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
+ENV PATH /opt/llvm/bin:$PATH
+RUN curl $LLVM_TARBALL | tar -xJC ..; \
+ mkdir /opt/llvm; \
+ cp -R clang+llvm*/* /opt/llvm; \
+ rm -R clang+llvm*; \
+ llc --version
+
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
diff --git a/.circleci/prepare-system.sh b/.circleci/prepare-system.sh
index d42424372a..804e0fd890 100755
--- a/.circleci/prepare-system.sh
+++ b/.circleci/prepare-system.sh
@@ -12,6 +12,7 @@ hackage_index_state="@1522046735"
if [[ -z ${BUILD_SPHINX_HTML:-} ]]; then BUILD_SPHINX_HTML=YES; fi
if [[ -z ${BUILD_SPHINX_PDF:-} ]]; then BUILD_SPHINX_PDF=YES; fi
if [[ -z ${INTEGER_LIBRARY:-} ]]; then INTEGER_LIBRARY=integer-gmp; fi
+if [[ -z ${BUILD_FLAVOUR:-} ]]; then BUILD_FLAVOUR=perf; fi
cat > mk/build.mk <<EOF
V=1
@@ -24,6 +25,13 @@ BeConservative=YES
INTEGER_LIBRARY=$INTEGER_LIBRARY
EOF
+cat <<EOF >> mk/build.mk
+BuildFlavour=$BUILD_FLAVOUR
+ifneq "\$(BuildFlavour)" ""
+include mk/flavours/\$(BuildFlavour).mk
+endif
+EOF
+
case "$(uname)" in
Linux)
if [[ -n ${TARGET:-} ]]; then
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b4273c34b3..5af0b0c494 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -112,7 +112,17 @@ validate-x86_64-darwin:
validate-x86_64-linux-deb9:
extends: .validate-linux
- image: ghcci/x86_64-linux-deb9:0.1
+ image: ghcci/x86_64-linux-deb9:0.2
+ artifacts:
+ when: always
+ cache:
+ key: linux-x86_64-deb9
+
+validate-x86_64-linux-deb9-llvm:
+ extends: .validate-linux
+ image: ghcci/x86_64-linux-deb9:0.2
+ variables:
+ BUILD_FLAVOUR: perf-llvm
cache:
key: linux-x86_64-deb9
@@ -136,7 +146,7 @@ validate-x86_64-linux-deb9-integer-simple:
extends: .validate-linux
variables:
INTEGER_LIBRARY: integer-simple
- image: ghcci/x86_64-linux-deb9:0.1
+ image: ghcci/x86_64-linux-deb9:0.2
cache:
key: linux-x86_64-deb9
@@ -144,7 +154,7 @@ validate-x86_64-linux-deb9-unreg:
extends: .validate-linux
variables:
CONFIGURE_ARGS: --enable-unregisterised
- image: ghcci/x86_64-linux-deb9:0.1
+ image: ghcci/x86_64-linux-deb9:0.2
cache:
key: linux-x86_64-deb9