Commit a64c2d0b authored by Tomas Härdin's avatar Tomas Härdin

Merge branch 'buster'

Adds support for Debian 10 ('buster')
parents 4fc10e7f 6603e5d3
......@@ -48,6 +48,13 @@ build:stretch:
tags:
- shell
build:buster:
stage: build
script:
- docker build -t umit/buster:$(git rev-parse HEAD) -f Buildstuff/Dockerfile.buster .
tags:
- shell
test:trusty:
stage: test
script:
......@@ -108,3 +115,12 @@ test:stretch:
- build:stretch
tags:
- shell
test:buster:
stage: test
script:
- docker run --env OMPI_MCA_rmaps_base_oversubscribe=1 --workdir /home/gitlab-ci/umit umit/buster:$(git rev-parse HEAD) bash run_tests.sh
dependencies:
- build:buster
tags:
- shell
......@@ -47,6 +47,8 @@ RUN pip3 install -r Buildstuff/requirements.txt
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# Error out on warnings on all platforms except buster
RUN export WERROR=-Werror
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
......
FROM debian:buster
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
......@@ -42,6 +42,8 @@ RUN pip3 install -r Buildstuff/requirements.txt
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# Error out on warnings on all platforms except buster
RUN export WERROR=-Werror
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
......
......@@ -54,6 +54,8 @@ RUN pip3 install -r Buildstuff/requirements.txt
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# Error out on warnings on all platforms except buster
RUN export WERROR=-Werror
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
......
......@@ -66,6 +66,8 @@ RUN pip3 install -r Buildstuff/requirements.txt
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# Error out on warnings on all platforms except buster
RUN export WERROR=-Werror
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
......
......@@ -41,6 +41,8 @@ RUN pip3 install -r Buildstuff/requirements.txt
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# Error out on warnings on all platforms except buster
RUN export WERROR=-Werror
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
......
......@@ -41,6 +41,8 @@ RUN pip3 install -r Buildstuff/requirements.txt
USER gitlab-ci
WORKDIR /home/gitlab-ci/umit
RUN export PATH=/usr/lib/ccache:$PATH
# Error out on warnings on all platforms except buster
RUN export WERROR=-Werror
# docker doesn't copy empty directories for some reason
RUN mkdir 3rdparty/FMILibrary-2.0.1/ThirdParty/Expat/expat-2.1.0/src
......
......@@ -215,7 +215,7 @@ endif ()
if (NOT WIN32)
# cl.exe has a different set of flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Werror -Wno-unused-variable -Wno-unused-function -Wextra -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall ${WERROR} -Wno-unused-variable -Wno-unused-function -Wextra -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG")
FIND_PACKAGE(MPI REQUIRED)
......
......@@ -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 bionic stretch
for t in xenial trusty trusty-cmake3.5.0 bionic stretch buster
do
gitlab-ci-multi-runner exec shell build:$t && gitlab-ci-multi-runner exec shell test:$t || exit $?
done
......
......@@ -88,7 +88,7 @@ def fun(t, z, force, i):
zz = matrix(z).transpose()
ftot = Finternal*zz
if not force is None:
ftot += force
ftot += force.astype(ftot.dtype)
return matrix(diag([1,1] + splitms[(i*2):(i*2+2)]))**-1 * ftot
def fun0(t, z, force):
......@@ -109,7 +109,7 @@ def fun3(t, z, force):
zz = matrix(z).transpose()
ftot = Finternal*zz
if not force is None:
ftot += force
ftot += force.astype(ftot.dtype)
return matrix(diag([1, splitms[6]]))**-1 * ftot
# Permutes so we get all seven positions in a row, and all seven velocities after that
......
......@@ -15,7 +15,7 @@ fmu = os.path.join(FMUS_DIR, 'tests/typeconvtest/typeconvtest.fmu')
print('ZMQ control + pause test')
# Have timestep close to duration, to test that we only delay *between* steps
t_end = 0.7
t_end = 3.0
dt = 0.1
control_port = 5555
......
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