Skip to content

Commit

Permalink
ci: ubuntu 22.04 docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
tvandera committed Jun 24, 2024
1 parent 8ade9b6 commit 35ddecb
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
52 changes: 52 additions & 0 deletions ci/ubuntu2204/Dockerfile
Original file line number Diff line number Diff line change
@@ -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*
27 changes: 27 additions & 0 deletions ci/ubuntu2204/build_script.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 35ddecb

Please sign in to comment.