Skip to content

Commit

Permalink
Fix Docker build (needs C++14 for ROOT)
Browse files Browse the repository at this point in the history
  • Loading branch information
zykure committed Aug 17, 2022
1 parent 807b8f5 commit f32b167
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ RUN cd /usr/src/kasper && \
mkdir -p build && \
pushd build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_UNIT_TESTS=ON \
-DKASPER_USE_ROOT=ON \
-DKASPER_USE_VTK=ON \
-DKASPER_USE_TBB=ON \
-DKASPER_USE_TBB=OFF \
-DKEMField_USE_OPENCL=OFF \
.. && \
make -j $((($(nproc)+1)/2)) && \
Expand Down
30 changes: 30 additions & 0 deletions Scripts/update-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

VERSION="${1:-testing}"
IMAGE="katrinexperiment/kassiopeia"

RELEASE="$(git describe --tags --exact-match || git symbolic-ref -q --short HEAD)"

if [ "${VERSION}" != "${RELEASE}" -a "v${VERSION}" != "${RELEASE}" ]; then
echo "ERROR: Provided image version $VERSION does not match git branch/tag: $RELEASE"
exit 1
fi

shift 1

echo "-- building $IMAGE:$VERSION ..."
sudo docker build -t $IMAGE $@ . || exit $?
sudo docker run -it katrinexperiment/kassiopeia UnitTestKasper || exit $?

######
#exit 0
######

echo "-- pushing to DockerHub ..."
sudo docker tag $IMAGE:latest katrinexperiment/kassiopeia:$VERSION
sudo docker push katrinexperiment/kassiopeia:$VERSION
sudo docker push katrinexperiment/kassiopeia:latest

echo "-- pushing to GitHub ..."
sudo docker tag $IMAGE:latest docker.pkg.github.com/katrin-experiment/kassiopeia/kassiopeia:$VERSION
sudo docker push docker.pkg.github.com/katrin-experiment/kassiopeia/kassiopeia:$VERSION

0 comments on commit f32b167

Please sign in to comment.