summaryrefslogtreecommitdiff
path: root/.circleci
diff options
context:
space:
mode:
authormrkkrp <markkarpov92@gmail.com>2018-02-28 18:18:58 +0700
committerBen Gamari <ben@smart-cactus.org>2018-03-19 11:54:56 -0400
commitf9a6d4207fb0e551821fee847ac064ac31d96bba (patch)
treee6f967aeda70ccbfe6a6a99b367fab756126c9b2 /.circleci
parent5a1ad231fc871f27f2811ae46285a79573d8dfae (diff)
downloadhaskell-f9a6d4207fb0e551821fee847ac064ac31d96bba.tar.gz
Add a build with 32bit Ubuntu container
Diffstat (limited to '.circleci')
-rw-r--r--.circleci/config.yml24
-rw-r--r--.circleci/images/i386-linux/Dockerfile30
2 files changed, 54 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index b4a99473c8..2868f8d8eb 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -31,6 +31,11 @@ aliases:
run:
name: Configure
command: ./configure
+ - &configure_unix_32
+ run:
+ name: Configure
+ command: |
+ setarch i386 ./configure --with-ghc=/opt/ghc-i386/8.2.2/bin/ghc
- &configure_bsd
run:
name: Configure
@@ -207,6 +212,24 @@ jobs:
- *make
- *test
+ "validate-i386-linux":
+ resource_class: xlarge
+ docker:
+ - image: mrkkrp/ghcci-i386-linux:0.0.1
+ environment:
+ <<: *buildenv
+ steps:
+ - checkout
+ - *prepare
+ - *submodules
+ - *boot
+ - *configure_unix_32
+ - *make
+ - *test
+ - *bindist
+ - *collectartifacts
+ - *storeartifacts
+
workflows:
version: 2
validate:
@@ -216,6 +239,7 @@ workflows:
# - validate-x86_64-freebsd
- validate-x86_64-darwin
- validate-x86_64-linux-llvm
+ - validate-i386-linux
- validate-hadrian-x86_64-linux
nightly:
diff --git a/.circleci/images/i386-linux/Dockerfile b/.circleci/images/i386-linux/Dockerfile
new file mode 100644
index 0000000000..7d3e968195
--- /dev/null
+++ b/.circleci/images/i386-linux/Dockerfile
@@ -0,0 +1,30 @@
+# This Dockerfile tries to replicate haskell:8.2 a bit, but it does so on
+# top of i368/debian:jessie instead of debian:jessie because I had troubles
+# making i386 GHC bindist working there.
+
+FROM i386/debian:jessie
+
+ENV LANG C.UTF-8
+
+# Install the necessary packages, including HVR stuff.
+RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
+RUN apt-get update -qq
+RUN apt-get install -qy git make automake autoconf gcc perl python3 texinfo xz-utils lbzip2 bzip2 patch openssh-client sudo curl zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev ca-certificates g++ cabal-install-2.0 ghc-8.2.2 happy-1.19.5 alex-3.1.7
+ENV PATH /opt/cabal/2.0/bin:/opt/ghc/8.2.2/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.7/bin:$PATH
+
+# Get i386 GHC bindist for 32 bit CI builds.
+RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-i386-deb8-linux.tar.xz | tar -Jx
+RUN cd /tmp/ghc-8.2.2 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.2.2 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux
+RUN cd /tmp/ghc-8.2.2 && make install
+RUN rm -rf /tmp/ghc-8.2.2
+ENV PATH /opt/ghc-i386/8.2.2/bin:$PATH
+
+# Create a normal user.
+RUN adduser ghc --gecos "GHC builds" --disabled-password
+RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
+USER ghc
+
+WORKDIR /home/ghc/
+
+CMD ["bash"]