Skip to content

Commit

Permalink
Final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed May 19, 2022
1 parent 8495be6 commit 6e48b7f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- run: docker load --input /tmp/star-sw-root5-build.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v2
- run: |
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-root5-build star-sw/tests/executest.py -c ${{ matrix.test_id }})
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-root5-build tests/executest.py -c ${{ matrix.test_id }})
# Workaround https://sft.its.cern.ch/jira/browse/ROOT-7660 in ROOT 5 by checking the output log
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-root5-build \
sh -c "set -e; MALLOC_CHECK_=3 $TEST_CMD 2>&1 | tee log; grep 'Run completed' log"
Expand All @@ -76,5 +76,5 @@ jobs:
- run: docker load --input /tmp/star-sw-root616-build.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v2
- run: |
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-root616-build star-sw/tests/executest.py -c ${{ matrix.test_id }})
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-root616-build tests/executest.py -c ${{ matrix.test_id }})
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-root616-build sh -c "MALLOC_CHECK_=3 $TEST_CMD || echo 'Failed with an exit code: '\$?"
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:latest

ARG starenv=root5

FROM ghcr.io/star-bnl/star-spack:v0.1.4-${starenv}
Expand All @@ -11,20 +13,25 @@ ENV PATH=$STAR_BIN:$STAR/mgr:$PATH
ENV LD_LIBRARY_PATH=$STAR_LIB:$LD_LIBRARY_PATH
ENV ROOT_INCLUDE_PATH=$STAR/.${STAR_HOST_SYS}/include

COPY . /star-sw
WORKDIR ${STAR}
COPY . ${STAR}

SHELL ["/bin/bash", "-l", "-c"]

RUN cd /star-sw \
&& source /etc/profile \
&& module load vc-0.7.4 \
RUN module load vc-0.7.4 \
&& MYSQL=$(dirname $(mysql_config --variable=pkgincludedir)) \
LIBXML2_DIR=$(xml2-config --prefix) \
GSL_DIR=$(gsl-config --prefix) \
FASTJET_DIR=$(fastjet-config --prefix) \
cons \
&& find /star-sw/.$STAR_HOST_SYS -name *.o -exec rm '{}' \;
&& find .$STAR_HOST_SYS -name *.o -exec rm '{}' \;

RUN install /star-sw/StRoot/macros/.rootrc .
COPY --chmod=0755 <<-"EOF" /opt/entrypoint.sh
#!/bin/bash -l
set -e
install $STAR/StRoot/macros/.rootrc .
exec "$@"
EOF

RUN echo -e '#!/bin/bash --login\n set -e; eval "$@"' > entrypoint.sh && chmod 755 entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/opt/entrypoint.sh"]
CMD ["/bin/bash"]

0 comments on commit 6e48b7f

Please sign in to comment.