Commit 2709670f authored by Tomas Härdin's avatar Tomas Härdin

Add builds for ubuntu:bionic and debian:stretch

parent 2b844e69
Pipeline #1105 passed with stages
in 69 minutes and 5 seconds
......@@ -34,6 +34,20 @@ build:xenial-fsanitize:
tags:
- shell
build:bionic:
stage: build
script:
- docker build -t umit/bionic:$(git rev-parse HEAD) -f Buildstuff/Dockerfile.bionic .
tags:
- shell
build:stretch:
stage: build
script:
- docker build -t umit/stretch:$(git rev-parse HEAD) -f Buildstuff/Dockerfile.stretch .
tags:
- shell
test:trusty:
stage: test
script:
......@@ -76,3 +90,21 @@ test:xenial:
# - build:xenial-fsanitize
# tags:
# - shell
test:bionic:
stage: test
script:
- docker run --workdir /home/gitlab-ci/umit umit/bionic:$(git rev-parse HEAD) bash run_tests.sh
dependencies:
- build:bionic
tags:
- shell
test:stretch:
stage: test
script:
- docker run --workdir /home/gitlab-ci/umit umit/stretch:$(git rev-parse HEAD) bash run_tests.sh
dependencies:
- build:stretch
tags:
- shell
FROM ubuntu:bionic
RUN apt-get update
# Tell tzdata installer that we're in Europe first, then fix it up to be Europe/Stockholm
# echo -e "8\n49" doesn't work for some reason..
RUN echo 8 | apt-get install --yes tzdata
RUN echo Europe/Stockholm > /etc/timezone
RUN dpkg-reconfigure -f noninteractive tzdata
#
# Some notes on the packages installed here where it may not be obvious why
# they are installed:
#
# build-essential: for gcc
# git: for being able to fetch submodules, since gitlab doesn't
# do this for us yet
# psmisc: for killall
# python-dev: for pip to build psutil
# libxml2-dev: for lxml
# libxstl1-dev: for lxml
#
RUN apt-get install --yes \
build-essential cmake ninja-build git python bc psmisc \
protobuf-compiler protobuf-c-compiler libprotobuf-dev \
libsuitesparse-dev libzmqpp-dev libhdf5-dev \
libopenmpi-dev libgsl-dev clang valgrind \
python-pip python-dev libxml2-dev libxslt1-dev ccache
RUN apt-get install -y python-numpy python-scipy python-matplotlib
RUN apt-get install -y python3-pip libmatio-dev
#
# Create user, since mpiexec doesn't like to run as root
#
RUN useradd -ms /bin/bash gitlab-ci
# Copy code into image
RUN mkdir /home/gitlab-ci/umit
COPY . /home/gitlab-ci/umit
RUN chown -R gitlab-ci /home/gitlab-ci/umit
# Install python requirements
WORKDIR /home/gitlab-ci/umit
RUN pip2 install -r Buildstuff/requirements.txt
RUN pip3 install -r Buildstuff/requirements.txt
# Finally, make us run as gitlab-ci
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
RUN mkdir build
RUN mkdir build-clang
WORKDIR /home/gitlab-ci/umit/build
# First build without libmatio, then run another build with it enabled
RUN cmake .. -G Ninja -DUSE_MATIO=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
RUN cmake .. -G Ninja -DUSE_MATIO=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
WORKDIR /home/gitlab-ci/umit/build-clang
RUN cmake .. -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUSE_MATIO=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
RUN cmake .. -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUSE_MATIO=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
FROM debian:stretch
RUN apt-get update
#
# Some notes on the packages installed here where it may not be obvious why
# they are installed:
#
# build-essential: for gcc
# git: for being able to fetch submodules, since gitlab doesn't
# do this for us yet
# psmisc: for killall
# python-dev: for pip to build psutil
# libxml2-dev: for lxml
# libxstl1-dev: for lxml
#
RUN apt-get install --yes \
build-essential cmake ninja-build git python bc psmisc \
protobuf-compiler protobuf-c-compiler libprotobuf-dev \
libsuitesparse-dev libhdf5-dev \
libopenmpi-dev libgsl-dev clang valgrind \
python-pip python-dev libxml2-dev libxslt1-dev ccache
RUN apt-get install -y python-numpy python-scipy python-matplotlib
RUN apt-get install -y python3-pip libmatio-dev
RUN apt-get install -y libczmq-dev
#
# Create user, since mpiexec doesn't like to run as root
#
RUN useradd -ms /bin/bash gitlab-ci
# Copy code into image
RUN mkdir /home/gitlab-ci/umit
COPY . /home/gitlab-ci/umit
RUN chown -R gitlab-ci /home/gitlab-ci/umit
# Install python requirements
WORKDIR /home/gitlab-ci/umit
RUN pip2 install -r Buildstuff/requirements.txt
RUN pip3 install -r Buildstuff/requirements.txt
# Finally, make us run as gitlab-ci
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
RUN mkdir build
RUN mkdir build-clang
WORKDIR /home/gitlab-ci/umit/build
# First build without libmatio, then run another build with it enabled
RUN cmake .. -G Ninja -DUSE_MATIO=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
RUN cmake .. -G Ninja -DUSE_MATIO=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
WORKDIR /home/gitlab-ci/umit/build-clang
RUN cmake .. -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUSE_MATIO=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
RUN cmake .. -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUSE_MATIO=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
RUN ninja install
......@@ -3,7 +3,7 @@
# For some reason there isn't a convenient command for running
# all jobs in the proper order (build -> test), hence this script.
set -e
for t in xenial trusty trusty-cmake3.5.0
for t in xenial trusty trusty-cmake3.5.0 bionic stretch
do
gitlab-ci-multi-runner exec shell build:$t && gitlab-ci-multi-runner exec shell test:$t || exit $?
done
......
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