From 146748816b3d36e6fdc47322c3c3f86a738cc922 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Tue, 12 Mar 2024 22:59:25 +0100 Subject: [PATCH 1/6] CI --- .github/alma9 | 12 ++++++ .github/workflows/publish.yml | 73 +++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 .github/alma9 create mode 100644 .github/workflows/publish.yml diff --git a/.github/alma9 b/.github/alma9 new file mode 100644 index 00000000000..dd7d5996ba7 --- /dev/null +++ b/.github/alma9 @@ -0,0 +1,12 @@ +FROM alma:9 +RUN set -x && \ + uname -a && \ + cat /etc/issue && \ + dnf -y update && \ + dnf config-manager --set-enabled crb && \ + dnf install epel-release && \ + dnf install dnf-plug* && \ + dnf -y install cmake gcc-c++ doxygen zlib-devel expat-devel xerces-c-devel xerces-c ccache && \ + yum -y clean all + +RUN dnf -y copr enable averbyts/HEPrpms && yum -y install PTL-devel clhep-devel && yum -y clean all \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000000..7c49fda0e70 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,73 @@ +name: publish +on: + push: + pull_request: + schedule: + - cron: "0 7 * * 2" + +jobs: + + build-geant4-docker-image-alma9: + runs-on: ubuntu-latest + name: Alma image + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Check if the Docker file was changed + id: changed-docker-files + uses: tj-actions/changed-files@v38 + with: + files: .github/alma9 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build the geant4 Docker image on the change of Dockerfile + if: steps.changed-docker-files.outputs.any_changed == 'true' + run: | + docker build . -f .github/alma9 --tag ghcr.io/andriish/geant4alma9:latest + docker run ghcr.io/andriish/geant4alma9:latest + docker push ghcr.io/andriish/geant4alma9:latest + - name: Build the geant4 Docker image on schedule + if: ${{ github.event_name == 'schedule' }} + run: | + docker build . -f .github/alma9 --tag ghcr.io/andriish/geant4alma9:latest + docker run ghcr.io/andriish/geant4alma9:latest + docker push ghcr.io/andriish/geant4alma9:latest + + + run-in-geant4-docker-image-alma9: + name: Alma + runs-on: ubuntu-latest + needs: build-geant4-docker-image-alma9 + container: + image: ghcr.io/andriish/geant4alma9:latest + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 3 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.11 + with: + key: alma9 + + - name: Run + run : | + cmake -S . -B BUILD -DGEANT4_INSTALL_DATA:BOOL=ON -DGEANT4_USE_SYSTEM_CLHEP:BOOL=ON -DGEANT4_USE_SYSTEM_EXPAT:BOOL=ON \ + -DGEANT4_USE_SYSTEM_ZLIB:BOOL=ON \ + -DGEANT4_USE_SYSTEM_PTL:BOOL=ON \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ + -DGEANT4_USE_GDML:BOOL=ON \ + -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_BUILD_TLS_MODEL=global-dynamic \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --build BUILD + From f9767db296db61b044597e7dd4b6834964b7b9d1 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Tue, 12 Mar 2024 23:00:43 +0100 Subject: [PATCH 2/6] CI --- .github/alma9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/alma9 b/.github/alma9 index dd7d5996ba7..0d463c93ea0 100644 --- a/.github/alma9 +++ b/.github/alma9 @@ -1,4 +1,4 @@ -FROM alma:9 +FROM almalinux:9 RUN set -x && \ uname -a && \ cat /etc/issue && \ From d0bff0bc7d6648eccea8d880b5d0d8284c9af8a5 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Tue, 12 Mar 2024 23:02:22 +0100 Subject: [PATCH 3/6] CI --- .github/alma9 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/alma9 b/.github/alma9 index 0d463c93ea0..0ca3a55898e 100644 --- a/.github/alma9 +++ b/.github/alma9 @@ -2,11 +2,11 @@ FROM almalinux:9 RUN set -x && \ uname -a && \ cat /etc/issue && \ - dnf -y update && \ - dnf config-manager --set-enabled crb && \ - dnf install epel-release && \ - dnf install dnf-plug* && \ - dnf -y install cmake gcc-c++ doxygen zlib-devel expat-devel xerces-c-devel xerces-c ccache && \ + dnf -y update && \ + dnf config-manager --set-enabled crb && \ + dnf install epel-release && \ + dnf install dnf-plug* && \ + dnf -y install cmake gcc-c++ doxygen zlib-devel expat-devel xerces-c-devel xerces-c ccache && \ yum -y clean all RUN dnf -y copr enable averbyts/HEPrpms && yum -y install PTL-devel clhep-devel && yum -y clean all \ No newline at end of file From 2c85d035b91d93830fffe3362e1f915be7842412 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Tue, 12 Mar 2024 23:03:41 +0100 Subject: [PATCH 4/6] CI --- .github/alma9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/alma9 b/.github/alma9 index 0ca3a55898e..72197b2a73e 100644 --- a/.github/alma9 +++ b/.github/alma9 @@ -4,8 +4,8 @@ RUN set -x && \ cat /etc/issue && \ dnf -y update && \ dnf config-manager --set-enabled crb && \ - dnf install epel-release && \ - dnf install dnf-plug* && \ + dnf -y install epel-release && \ + dnf -y install dnf-plug* && \ dnf -y install cmake gcc-c++ doxygen zlib-devel expat-devel xerces-c-devel xerces-c ccache && \ yum -y clean all From 609186843191f9ae25297f4c4624f3053fafeb20 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Tue, 12 Mar 2024 23:06:01 +0100 Subject: [PATCH 5/6] CI --- .github/alma9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/alma9 b/.github/alma9 index 72197b2a73e..09b12748bcd 100644 --- a/.github/alma9 +++ b/.github/alma9 @@ -3,9 +3,9 @@ RUN set -x && \ uname -a && \ cat /etc/issue && \ dnf -y update && \ + dnf -y install dnf-plug* && \ dnf config-manager --set-enabled crb && \ dnf -y install epel-release && \ - dnf -y install dnf-plug* && \ dnf -y install cmake gcc-c++ doxygen zlib-devel expat-devel xerces-c-devel xerces-c ccache && \ yum -y clean all From 8f78ce43d95b23c93cd6298125dbe3ec254ce3f3 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Wed, 13 Mar 2024 07:41:30 +0100 Subject: [PATCH 6/6] CI --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7c49fda0e70..c2eec349d0c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -62,7 +62,7 @@ jobs: - name: Run run : | - cmake -S . -B BUILD -DGEANT4_INSTALL_DATA:BOOL=ON -DGEANT4_USE_SYSTEM_CLHEP:BOOL=ON -DGEANT4_USE_SYSTEM_EXPAT:BOOL=ON \ + cmake -S . -B BUILD -DGEANT4_INSTALL_DATA:BOOL=OFF -DGEANT4_USE_SYSTEM_CLHEP:BOOL=ON -DGEANT4_USE_SYSTEM_EXPAT:BOOL=ON \ -DGEANT4_USE_SYSTEM_ZLIB:BOOL=ON \ -DGEANT4_USE_SYSTEM_PTL:BOOL=ON \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \