Commit f4ac0b0c authored by Ben Gamari's avatar Ben Gamari 🐢

gitlab-ci: Add LLVM way

parent 4d776465
......@@ -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
......
......@@ -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"
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment