diff --git a/ci/ubuntu2204/Dockerfile b/ci/ubuntu2204/Dockerfile new file mode 100644 index 00000000..fe621f75 --- /dev/null +++ b/ci/ubuntu2204/Dockerfile @@ -0,0 +1,52 @@ +FROM ubuntu:22.04 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + git g++ python3 \ + libblas-dev \ + liblapack-dev \ + liblapacke-dev \ + libopenmpi-dev \ + openmpi-bin \ + libeigen3-dev \ + libboost-all-dev \ + ca-certificates \ + libhdf5-dev \ + gdb vim wget\ + libhdf5-dev \ + python3-pip \ + python3-numpy python3-pybind11 python3-setuptools \ + python3-scipy python3-pandas \ + python3-joblib python3-sklearn \ + python3-h5py \ + python3-pytest python3-parameterized \ + && rm -rf /var/lib/apt/lists/* + + +# Install Catch v3 +RUN cd /tmp && \ + wget -O Catch2.tar.gz https://github.com/catchorg/Catch2/archive/refs/tags/v3.6.0.tar.gz && \ + tar xzf Catch2.tar.gz && \ + rm Catch2.tar.gz && \ + cd Catch2* && \ + cmake -S . -B build -DBUILD_TESTING=OFF && \ + cmake --build build && \ + cmake --install build && \ + cd .. && \ + rm -r Catch* + +#install HighFive +RUN cd /tmp && \ + wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.9.0.tar.gz && \ + tar xzf HighFive.tar.gz && \ + rm HighFive.tar.gz && \ + cd HighFive* && \ + mkdir build && \ + cd build && \ + cmake .. -DHIGHFIVE_USE_BOOST=OFF && \ + make -j2 && \ + make install && \ + cd ../.. && \ + rm -r HighFive* diff --git a/ci/ubuntu2204/build_script.sh b/ci/ubuntu2204/build_script.sh new file mode 100755 index 00000000..bd48b37f --- /dev/null +++ b/ci/ubuntu2204/build_script.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Start this script in a Docker container like this: +# +# docker run -eCPU_COUNT=2 -v $(git rev-parse --show-toplevel):/smurff -ti smurff2204 /smurff/ci/ubuntu2204/build_script.sh +# +# where smurff2204 is the image name + + +set -e +set -x + +rm -rf /work +mkdir /work +cd /work + +git config --global --add safe.directory /smurff/.git +git clone /smurff + +cd smurff +cmake -S . -B build +cmake --build build --parallel 32 +cmake --install build + +python3 setup.py install --install-binaries +/usr/local/libexec/tests +pytest-3 python/test