From 187d8a35930debd86306631973f86e2419d4529c Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 30 Apr 2023 10:31:28 -0500 Subject: [PATCH 01/28] started changes but found problems in images --- .github/workflows/linux_build_test.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 862ce01da1..beeb578e68 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -28,8 +28,8 @@ jobs: strategy: matrix: ubuntu_versions : [ - 18.04, 20.04, + 22.04, ] compiler : [ gcc, @@ -51,6 +51,24 @@ jobs: with: submodules: recursive + - name: Build DAGMC + run: | + ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC + cd $GITHUB_WORKSPACE + mkdir -p build + cd build + cmake .. -DMOAB_DIR=/root/opt/moab \ + -DBUILD_GEANT4=ON \ + -DGEANT4_DIR=/root/opt/geant4 \ + -DBUILD_CI_TESTS=ON \ + -DBUILD_MW_REG_TESTS=OFF \ + -DBUILD_STATIC_EXE=OFF \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_Fortran_COMPILER=gfortran \ + -DCMAKE_INSTALL_PREFIX=/root/opt/dagmc \ + -DDOUBLE_DOWN=${double_down} \ + -Ddd_ROOT=${double_down_install_dir} && \ + - name: Setup run: | echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV From ebf2c948586c3609b240bca131191c23a54e09d8 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 6 May 2023 17:55:27 -0500 Subject: [PATCH 02/28] first thoughts on updating build --- .github/workflows/linux_build_test.yml | 70 ++++++++------------------ 1 file changed, 21 insertions(+), 49 deletions(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index beeb578e68..b832971917 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -19,11 +19,8 @@ on: - 'CI/**' jobs: - BuildTest: + dagmc_build_test: runs-on: ubuntu-latest - env: - hdf5_versions: ${{ matrix.hdf5_versions }} - hdf5_build_dir: hdf5_build_dir strategy: matrix: @@ -39,54 +36,29 @@ jobs: 1.10.4, ] moab_versions : [ - 5.3.0, + 5.3.0, ] - container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable + name: Installing DAGMC + steps: + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - steps: - name: Checkout repository uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Build DAGMC - run: | - ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC - cd $GITHUB_WORKSPACE - mkdir -p build - cd build - cmake .. -DMOAB_DIR=/root/opt/moab \ - -DBUILD_GEANT4=ON \ - -DGEANT4_DIR=/root/opt/geant4 \ - -DBUILD_CI_TESTS=ON \ - -DBUILD_MW_REG_TESTS=OFF \ - -DBUILD_STATIC_EXE=OFF \ - -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_Fortran_COMPILER=gfortran \ - -DCMAKE_INSTALL_PREFIX=/root/opt/dagmc \ - -DDOUBLE_DOWN=${double_down} \ - -Ddd_ROOT=${double_down_install_dir} && \ - - name: Setup - run: | - echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV - echo "COMPILER=${{ matrix.compiler }}" >> $GITHUB_ENV - echo "HDF5_VERSION=${{ matrix.hdf5_versions }}" >> $GITHUB_ENV - echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV - echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV - echo "DOUBLE_DOWN="OFF"" >> $GITHUB_ENV - echo "PYTHONPATH=/root/build_dir/moab/bld/pymoab/lib/python3.8/site-packages:${PYTHONPATH}" >> $GITHUB_ENV - ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC - - - name: Building DAGMC - run: | - cd $GITHUB_WORKSPACE - git config --global --add safe.directory /__w/DAGMC/DAGMC - CI/scripts/install.sh - - - name: Testing DAGMC - run: | - cd $GITHUB_WORKSPACE - CI/scripts/tests.sh + - name: Test DAGMC in Docker image + uses: firehed/multistage-docker-build-action@v1 + with: + repository: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} + stages: moab, dagmc + server-stage: dagmc_test + quiet: false + parallel: true + tag-latest-on-default: false + dockerfile: CI/Dockerfile + build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} From 8076e978ac883605c21f408ad9723de50a524977 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 7 May 2023 15:35:56 -0500 Subject: [PATCH 03/28] try simple test strategy --- .github/workflows/linux_build_test.yml | 32 ++++++++------------------ 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index b832971917..ef1d387887 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -1,25 +1,12 @@ -name: Linux Build/Test +name: Build & Publish docker image for DAGMC-CI & Build/Test DAGMC on: # allows us to run workflows manually workflow_dispatch: pull_request: - branches: - - develop - paths-ignore: - - '.github/workflows/docker_publish.yml' - - '.github/workflows/housekeeping.yml' - - 'CI/**' - push: - branches: - - develop - paths-ignore: - - '.github/workflows/docker_publish.yml' - - '.github/workflows/housekeeping.yml' - - 'CI/**' jobs: - dagmc_build_test: + build-dependency-img: runs-on: ubuntu-latest strategy: @@ -39,7 +26,7 @@ jobs: 5.3.0, ] - name: Installing DAGMC + name: Installing Dependencies steps: - name: Log in to the Container registry uses: docker/login-action@v2 @@ -51,14 +38,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Test DAGMC in Docker image + - name: Installing Dependencies in Docker image & Testing DAGMC + id: build uses: firehed/multistage-docker-build-action@v1 with: - repository: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} - stages: moab, dagmc - server-stage: dagmc_test + repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} + stages: base, external_deps, hdf5, moab, dagmc + server-stage: dagmc-test quiet: false parallel: true - tag-latest-on-default: false + tag-latest-on-default: true dockerfile: CI/Dockerfile - build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} + build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} \ No newline at end of file From 8a4557f918c6d88bb5291760a1ee53f6257b256d Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 7 May 2023 20:25:45 -0500 Subject: [PATCH 04/28] dumb typo in stage name --- .github/workflows/linux_build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index ef1d387887..c7fdc6bf0f 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -44,7 +44,7 @@ jobs: with: repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} stages: base, external_deps, hdf5, moab, dagmc - server-stage: dagmc-test + server-stage: dagmc_test quiet: false parallel: true tag-latest-on-default: true From d79c4a73afcc42a8507191c875b37be4810125af Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 8 May 2023 06:56:17 -0500 Subject: [PATCH 05/28] correct/add PR numbers --- doc/CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 841e973b9e..6dddd2cee6 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -17,7 +17,7 @@ Next version * Update Pyne submodule (#845) * Update Pyne submodule (#848) * Minor typo fixes in documentation (#851) - * Moved scripts to Dockerfile and parallel CI (#822) + * Moved scripts to Dockerfile and parallel CI (#863) * Removed unused Circle CI yml (#859) * Added configuration options to CMake configuration file (#867) * Change test-on-merge against MOAB master/develop to be optional (#870) From 92ab249d37a159a00c704ea9ff414b57240d053a Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 8 May 2023 06:56:59 -0500 Subject: [PATCH 06/28] Update Changelog for this PR --- doc/CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 6dddd2cee6..64708b1846 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -22,6 +22,7 @@ Next version * Added configuration options to CMake configuration file (#867) * Change test-on-merge against MOAB master/develop to be optional (#870) * Introduced logger to better manage console output (#876) + * Streamline CI to take advantage of better docker image management () **Fixed:** * Patch to compile with Geant4 10.6 (#803) From 63350bf9eb5211cb0628ca05c448a14c2cfd20a7 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 8 May 2023 07:31:32 -0500 Subject: [PATCH 07/28] test tagging options --- .github/workflows/linux_build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index c7fdc6bf0f..450c17a3bf 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -47,6 +47,6 @@ jobs: server-stage: dagmc_test quiet: false parallel: true - tag-latest-on-default: true + tag-latest-on-default: false dockerfile: CI/Dockerfile build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} \ No newline at end of file From 3e1f34d13479b7263863d9c11ad31939d6205217 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Thu, 20 Jul 2023 08:56:50 -0500 Subject: [PATCH 08/28] add step to retag final images on merge --- .github/workflows/linux_build_test.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 450c17a3bf..95f7e41ddf 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -49,4 +49,28 @@ jobs: parallel: true tag-latest-on-default: false dockerfile: CI/Dockerfile - build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} \ No newline at end of file + build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} + + name: Pushing final images + steps: + - name: Log in to the Container registry + if: ${{ github.repository_owner == 'svalinn' }} + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push Image as stable img + if: ${{ github.repository_owner == 'svalinn' }} + uses: akhilerm/tag-push-action@v2.1.0 + with: + src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 + dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable + + - name: Push Image as latest img + if: ${{ github.repository_owner == 'svalinn' }} + uses: akhilerm/tag-push-action@v2.1.0 + with: + src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 + dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest From ca27f3ecf06916cd812d671e4d8e623fb1e14f1b Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Thu, 20 Jul 2023 08:59:11 -0500 Subject: [PATCH 09/28] fix workflow structure --- .github/workflows/linux_build_test.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 95f7e41ddf..8dac2f8654 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -51,6 +51,27 @@ jobs: dockerfile: CI/Dockerfile build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} + push_stable_ci_img: + needs: [build-dependency-img] + runs-on: ubuntu-latest + + strategy: + matrix: + ubuntu_versions : [ + 20.04, + 22.04, + ] + compiler : [ + gcc, + clang, + ] + hdf5_versions : [ + 1.10.4, + ] + moab_versions : [ + 5.3.0, + ] + name: Pushing final images steps: - name: Log in to the Container registry From 58de6f74f704626b6ccd2988caa41c3c7913f893 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Thu, 20 Jul 2023 13:18:38 -0500 Subject: [PATCH 10/28] temporarily serialize moab build --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 10ef11db2a..5cd7946c3e 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -237,7 +237,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ -DDOUBLE_DOWN=${double_down} \ -Ddd_ROOT=${double_down_install_dir} && \ - make -j${ci_jobs} && \ + make -j1 && \ make install From 8b2c6bd44642797035c0b0ddc8baf09256354b89 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Thu, 20 Jul 2023 13:29:50 -0500 Subject: [PATCH 11/28] serialize the correct build! --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 5cd7946c3e..19d7f22730 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -183,7 +183,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - make -j${ci_jobs} && \ + make -j1 && \ make install && \ cd && \ rm -rf ${moab_build_dir} @@ -237,7 +237,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ -DDOUBLE_DOWN=${double_down} \ -Ddd_ROOT=${double_down_install_dir} && \ - make -j1 && \ + make -j${ci_jobs} && \ make install From 9deee60c751229fee6a465a9511e6c5fb3dc4c28 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Thu, 20 Jul 2023 19:50:43 -0500 Subject: [PATCH 12/28] minor dockerfile tweak to force rebuild from scratch --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 19d7f22730..608143ce4c 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -44,8 +44,8 @@ RUN apt-get -y update; \ python3-pip \ python3-setuptools \ python3-dev \ - libpython3-dev \ wget \ + libpython3-dev \ software-properties-common; \ add-apt-repository ppa:git-core/ppa; \ apt-get update; \ From e2cafccad966060fa987c508873d5286777aa0d2 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Fri, 21 Jul 2023 17:20:48 -0500 Subject: [PATCH 13/28] restore parallel moab build and constrain cython version --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 608143ce4c..272f8303ca 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -52,7 +52,7 @@ RUN apt-get -y update; \ apt-get install -y git; \ update-alternatives --install /usr/bin/python python /usr/bin/python3 10; \ update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10; \ - pip install cython; + pip install "cython<3"; ARG build_dir ARG install_dir @@ -183,7 +183,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - make -j1 && \ + make -j${ci_jobs} && \ make install && \ cd && \ rm -rf ${moab_build_dir} From ecb77de730ef5b462baf7d0f7811de248faa3ad6 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 22 Jul 2023 11:19:09 -0500 Subject: [PATCH 14/28] try github.actor? --- .github/workflows/linux_build_test.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 8dac2f8654..d7afd6ef4e 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -32,7 +32,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository @@ -42,7 +42,7 @@ jobs: id: build uses: firehed/multistage-docker-build-action@v1 with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} + repository: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false @@ -75,23 +75,23 @@ jobs: name: Pushing final images steps: - name: Log in to the Container registry - if: ${{ github.repository_owner == 'svalinn' }} + if: ${{ github.actor == 'svalinn' }} uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push Image as stable img - if: ${{ github.repository_owner == 'svalinn' }} + if: ${{ github.actor == 'svalinn' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable + src: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 + dst: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable - name: Push Image as latest img - if: ${{ github.repository_owner == 'svalinn' }} + if: ${{ github.actor == 'svalinn' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest + src: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 + dst: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest From fc90112fb5463775abee9840fabf89dd5a553403 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 22 Jul 2023 11:40:28 -0500 Subject: [PATCH 15/28] allow package writing for github.actor? --- .github/workflows/linux_build_test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index d7afd6ef4e..e8c3961a1f 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -8,7 +8,9 @@ on: jobs: build-dependency-img: runs-on: ubuntu-latest - + permissions: + packages: write + strategy: matrix: ubuntu_versions : [ From d89410d4af60782c505e8f6a0aa539bb8fa01286 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 5 Aug 2023 15:45:39 -0500 Subject: [PATCH 16/28] revert to repo owner with public packages --- .github/workflows/linux_build_test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index e8c3961a1f..8e06ec9ee3 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -34,7 +34,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} + username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository @@ -44,7 +44,7 @@ jobs: id: build uses: firehed/multistage-docker-build-action@v1 with: - repository: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} + repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false @@ -81,19 +81,19 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} + username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push Image as stable img if: ${{ github.actor == 'svalinn' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable + src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 + dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable - name: Push Image as latest img if: ${{ github.actor == 'svalinn' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest + src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 + dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest From 9bc928122c47f607158288e5c94e96a50bc18313 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 5 Aug 2023 16:00:03 -0500 Subject: [PATCH 17/28] add a test using the std build/push --- .github/workflows/test_simple_build_push.yml | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test_simple_build_push.yml diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml new file mode 100644 index 0000000000..0d18a40d48 --- /dev/null +++ b/.github/workflows/test_simple_build_push.yml @@ -0,0 +1,47 @@ +name: Test the permissions for a simple build/push + +on: + # allows us to run workflows manually + workflow_dispatch: + pull_request: + +jobs: + build-dependency-img: + runs-on: ubuntu-latest + permissions: + packages: write + + strategy: + matrix: + ubuntu_versions : [ + 22.04, + ] + compiler : [ + gcc, + ] + hdf5_versions : [ + 1.10.4, + ] + moab_versions : [ + 5.3.0, + ] + + name: Installing Dependencies + steps: + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Installing Dependencies in Docker image & Testing DAGMC + id: build + uses: docker/build-push-action@v4 + with: + context: CI/ + target: base + tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test From ed1512106fbc23de96ebed173316492770975489 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 5 Aug 2023 16:10:02 -0500 Subject: [PATCH 18/28] need to push --- .github/workflows/test_simple_build_push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index 0d18a40d48..d68a0ba3af 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -44,4 +44,5 @@ jobs: with: context: CI/ target: base + push: true tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test From 737f192dbbc6f2ae8754395cf6d9c8d6bb066cd0 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 5 Aug 2023 16:13:18 -0500 Subject: [PATCH 19/28] remove extra workflows --- .github/workflows/docker_publish.yml | 150 ------------------- .github/workflows/linux_build_test.yml | 99 ------------ .github/workflows/linux_build_test_merge.yml | 66 -------- .github/workflows/mac_build_test.yml | 75 ---------- 4 files changed, 390 deletions(-) delete mode 100644 .github/workflows/docker_publish.yml delete mode 100644 .github/workflows/linux_build_test.yml delete mode 100644 .github/workflows/linux_build_test_merge.yml delete mode 100644 .github/workflows/mac_build_test.yml diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml deleted file mode 100644 index a2b313afed..0000000000 --- a/.github/workflows/docker_publish.yml +++ /dev/null @@ -1,150 +0,0 @@ -name: Build & Publish docker image for DAGMC-CI - -on: - # allows us to run workflows manually - workflow_dispatch: - push: - paths: - - 'CI/Dockerfile' - - '.github/workflows/docker_publish.yml' - -jobs: - build-dependency-img: - runs-on: ubuntu-latest - env: - hdf5_build_dir: hdf5_build_dir - - strategy: - matrix: - ubuntu_versions : [ - 20.04, - 22.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - 5.3.0, - ] - - name: Installing Dependencies - steps: - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Installing Dependencies in Docker image - uses: firehed/multistage-docker-build-action@v1 - with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} - stages: base, external_deps, hdf5 - server-stage: moab - quiet: false - parallel: true - tag-latest-on-default: false - dockerfile: CI/Dockerfile - build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} - - build-dagmc_test-img: - needs: [build-dependency-img] - runs-on: ubuntu-latest - env: - hdf5_build_dir: hdf5_build_dir - - strategy: - matrix: - ubuntu_versions : [ - 20.04, - 22.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - 5.3.0, - ] - - name: Installing DAGMC - steps: - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Test DAGMC in Docker image - uses: firehed/multistage-docker-build-action@v1 - with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }} - stages: moab, dagmc - server-stage: dagmc_test - quiet: false - parallel: true - tag-latest-on-default: false - dockerfile: CI/Dockerfile - build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} - - push_stable_ci_img: - needs: [build-dagmc_test-img] - runs-on: ubuntu-latest - env: - hdf5_build_dir: hdf5_build_dir - - strategy: - matrix: - ubuntu_versions : [ - 20.04, - 22.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - 5.3.0, - ] - - name: Pushing final images - steps: - - name: Log in to the Container registry - if: ${{ github.repository_owner == 'svalinn' }} - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Push Image as stable img - if: ${{ github.repository_owner == 'svalinn' }} - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable - - - name: Push Image as latest img - if: ${{ github.repository_owner == 'svalinn' }} - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml deleted file mode 100644 index 8e06ec9ee3..0000000000 --- a/.github/workflows/linux_build_test.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Build & Publish docker image for DAGMC-CI & Build/Test DAGMC - -on: - # allows us to run workflows manually - workflow_dispatch: - pull_request: - -jobs: - build-dependency-img: - runs-on: ubuntu-latest - permissions: - packages: write - - strategy: - matrix: - ubuntu_versions : [ - 20.04, - 22.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - 5.3.0, - ] - - name: Installing Dependencies - steps: - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Installing Dependencies in Docker image & Testing DAGMC - id: build - uses: firehed/multistage-docker-build-action@v1 - with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} - stages: base, external_deps, hdf5, moab, dagmc - server-stage: dagmc_test - quiet: false - parallel: true - tag-latest-on-default: false - dockerfile: CI/Dockerfile - build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5=${{ matrix.hdf5_versions }}, MOAB=${{ matrix.moab_versions }} - - push_stable_ci_img: - needs: [build-dependency-img] - runs-on: ubuntu-latest - - strategy: - matrix: - ubuntu_versions : [ - 20.04, - 22.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - 5.3.0, - ] - - name: Pushing final images - steps: - - name: Log in to the Container registry - if: ${{ github.actor == 'svalinn' }} - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Push Image as stable img - if: ${{ github.actor == 'svalinn' }} - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable - - - name: Push Image as latest img - if: ${{ github.actor == 'svalinn' }} - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:refs_heads_${{ github.ref_name }}-bk0 - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest diff --git a/.github/workflows/linux_build_test_merge.yml b/.github/workflows/linux_build_test_merge.yml deleted file mode 100644 index fcc94c78e2..0000000000 --- a/.github/workflows/linux_build_test_merge.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Linux Build/Test on Merge - -on: - # allows us to run workflows manually - workflow_dispatch: - push: - branches: - - develop - paths-ignore: - - '.github/workflows/docker_publish.yml' - - '.github/workflows/housekeeping.yml' - - 'CI/**' - -jobs: - BuildTestMasterDev: - runs-on: ubuntu-latest - env: - hdf5_versions: ${{ matrix.hdf5_versions }} - hdf5_build_dir: hdf5_build_dir - - strategy: - matrix: - ubuntu_versions : [ - 18.04, - 20.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - master, - ] - - container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Setup - run: | - echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV - echo "COMPILER=${{ matrix.compiler }}" >> $GITHUB_ENV - echo "HDF5_VERSION=${{ matrix.hdf5_versions }}" >> $GITHUB_ENV - echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV - echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV - echo "DOUBLE_DOWN="OFF"" >> $GITHUB_ENV - echo "PYTHONPATH=/root/build_dir/moab/bld/pymoab/lib/python3.8/site-packages:${PYTHONPATH}" >> $GITHUB_ENV - ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC - - - name: Building DAGMC - run: | - cd $GITHUB_WORKSPACE - CI/scripts/install.sh - - - name: Testing DAGMC - run: | - cd $GITHUB_WORKSPACE - CI/scripts/tests.sh diff --git a/.github/workflows/mac_build_test.yml b/.github/workflows/mac_build_test.yml deleted file mode 100644 index bdea71c329..0000000000 --- a/.github/workflows/mac_build_test.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Mac Build/Test - -on: - # allows us to run workflows manually - workflow_dispatch: - pull_request: - branches: - - develop - push: - branches: - - develop - - release: - types: # This configuration does not affect the page_build event above - - created -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - BuildTest: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - - name: Initial setup - shell: bash -l {0} - run: | - brew install eigen gcc@6 hdf5 - - - name: Environment Variables - shell: bash -l {0} - run: | - echo "HOME=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV - - - - name: Build MOAB - shell: bash -l {0} - run: | - cd ${HOME} - mkdir -pv moab/bld - cd moab - git clone https://bitbucket.org/fathomteam/moab -b 5.3.0 --depth 1 --shallow-submodules - cd bld - cmake ../moab -DENABLE_HDF5=ON \ - -DENABLE_PYMOAB=OFF \ - -DHDF5_ROOT=$HDF5_PATH \ - -DBUILD_SHARED_LIBS=ON \ - -DENABLE_BLASLAPACK=OFF \ - -DENABLE_FORTRAN=OFF \ - -DCMAKE_INSTALL_PREFIX=${HOME}/moab - make - make install - rm -rf ${HOME}/moab/moab ${HOME}/moab/bld - - - name: Build DAGMC - shell: bash -l {0} - run: | - mkdir -p $GITHUB_WORKSPACE/bld - cd $GITHUB_WORKSPACE/bld - cmake ../ -DMOAB_DIR=${HOME}/moab \ - -DBUILD_CI_TESTS=ON \ - -DBUILD_STATIC_EXE=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_INSTALL_PREFIX=${HOME}/dagmc - make - make install - - - name: Testing DAGMC - shell: bash -l {0} - run: | - cd $GITHUB_WORKSPACE/bld - PATH=$GITHUB_WORKSPACE/bld/bin:$PATH make test - From a90f974f7e61dbcac878f2f0fb6f7d4f25165a38 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 5 Aug 2023 18:17:48 -0500 Subject: [PATCH 20/28] remove windows test again --- .github/workflows/windows_build_test.yml | 118 ----------------------- 1 file changed, 118 deletions(-) delete mode 100644 .github/workflows/windows_build_test.yml diff --git a/.github/workflows/windows_build_test.yml b/.github/workflows/windows_build_test.yml deleted file mode 100644 index 4a81330d0b..0000000000 --- a/.github/workflows/windows_build_test.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Windows Build/Test - -on: - # allows us to run workflows manually - workflow_dispatch: - pull_request: - branches: - - develop - push: - branches: - - develop - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - BuildTest: - runs-on: windows-2019 - steps: - - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - activate-environment: "" - - # yaml-cpp package has conflicting gtest headers and is not needed for this project - - name: Conda dependencies - shell: bash -l {0} - run: | - conda install curl eigen - conda install -c conda-forge hdf5=1.10.6 - conda remove -y yaml-cpp - - - name: Environment Variables - shell: bash -l {0} - run: | - echo "HOME_PATH=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV - echo "CONDA_LOC=C:/Miniconda/Library" >> $GITHUB_ENV - cd ${HOME_PATH} - mkdir install_dir - - - name: Build MOAB - shell: bash -l {0} - run: | - cd ${HOME_PATH} - git clone --depth 1 https://bitbucket.org/fathomteam/moab -b 5.3.0 - mkdir moab_build - cd moab_build - cmake ../moab \ - -DENABLE_BLASLAPACK=OFF \ - -DENABLE_FORTRAN=OFF \ - -DENABLE_IMESH=OFF \ - -DENABLE_TESTING=OFF \ - -DENABLE_HDF5=ON \ - -DBUILD_SHARED_LIBS=ON \ - -G"Visual Studio 16 2019" \ - -DCMAKE_INSTALL_PREFIX=../install_dir/ \ - -DHDF5_ROOT="${CONDA_LOC}" \ - -DHDF5_hdf5_LIBRARY_RELEASE="${CONDA_LOC}/lib/libhdf5_hl.lib;${CONDA_LOC}/lib/libhdf5.lib;${CONDA_LOC}/lib/zlib.lib;${CONDA_LOC}/lib/libhdf5_cpp.lib" \ - -DCMAKE_EXE_LINKER_FLAGS="/std:c++latest -DH5_BUILT_AS_DYNAMIC_LIB" \ - -DCMAKE_MODULE_LINKER_FLAGS="/std:c++latest" \ - -DCMAKE_SHARED_LINKER_FLAGS="/std:c++latest" \ - -DCMAKE_STATIC_LINKER_FLAGS="" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe" \ - -DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe" - cmake --build . --config Release - cmake --install . --config Release - - - uses: actions/checkout@v3 - - - name: build DAGMC - shell: bash -l {0} - run: | - cd ${HOME_PATH} - mkdir build - cd build - cmake ../dagmc \ - -G"Visual Studio 16 2019" \ - -DBUILD_EXE=ON \ - -DBUILD_STATIC_EXE=ON \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_TALLY=OFF \ - -DBUILD_BUILD_OBB=OFF \ - -DBUILD_UWUW=ON \ - -DBUILD_MAKE_WATERTIGHT=ON \ - -DBUILD_OVERLAP_CHECK=OFF \ - -DBUILD_TESTS=ON \ - -DMOAB_DIR=../install_dir \ - -DHDF5_ROOT="${CONDA_LOC}" \ - -DHDF5_hdf5_LIBRARY_RELEASE="${CONDA_LOC}/lib/libhdf5_hl.lib;${CONDA_LOC}/lib/libhdf5.lib;${CONDA_LOC}/lib/zlib.lib;${CONDA_LOC}/lib/libhdf5_cpp.lib" \ - -DCMAKE_INSTALL_PREFIX=../install_dir/ \ - -DCMAKE_EXE_LINKER_FLAGS="" \ - -DCMAKE_MODULE_LINKER_FLAGS="" \ - -DCMAKE_SHARED_LINKER_FLAGS="" \ - -DCMAKE_STATIC_LINKER_FLAGS="" \ - -DCMAKE_BUILD_TYPE=Release - cmake --build . --config Release - cmake --install . --config Release - - - name: Installation Environment Variables - shell: bash -l {0} - run: | - echo "PATH=$PATH:/d/a/DAGMC/install_dir/bin:/d/a/DAGMC/install_dir/tests" >> $GITHUB_ENV - - - name: test DAGMC - shell: bash -l {0} - run: | - cd $HOME_PATH/install_dir/tests - dagmc_pointinvol_test.exe - dagmc_rayfire_test.exe - dagmc_simple_test.exe - dagmc_unit_tests.exe - make_watertight_cone_tests.exe - make_watertight_cylinder_tests.exe - make_watertight_no_curve_sphere_tests.exe - make_watertight_sphere_n_box_test.exe From 81da4a8716d8b5a7946845a4f481aa25625efe88 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 5 Aug 2023 18:31:46 -0500 Subject: [PATCH 21/28] try actor --- .github/workflows/test_simple_build_push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index d68a0ba3af..4e73f3639b 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -32,7 +32,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository @@ -45,4 +45,4 @@ jobs: context: CI/ target: base push: true - tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test + tags: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test From c169b1b366e712ba6d25addcfdff60a452fa911d Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:12:47 -0500 Subject: [PATCH 22/28] case 1 --- .github/workflows/test_simple_build_push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index 4e73f3639b..8b2b22f060 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -3,6 +3,7 @@ name: Test the permissions for a simple build/push on: # allows us to run workflows manually workflow_dispatch: + push: pull_request: jobs: From 3f90c5d95940a633a2f2c42e4cdffaeff5c36756 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:16:49 -0500 Subject: [PATCH 23/28] cases 3/4 --- .github/workflows/test_simple_build_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index 8b2b22f060..ad330ec315 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -46,4 +46,4 @@ jobs: context: CI/ target: base push: true - tags: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test + tags: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test From 3dd4cc35de1781b0e5019a91491a5a807f8054d3 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:22:54 -0500 Subject: [PATCH 24/28] cases 5/6 --- .github/workflows/test_simple_build_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index ad330ec315..d4c30b8cad 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -33,7 +33,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} + username: svalinn password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository From 07e29a0c99d6ea61680b986f32c0a1813a0b6ce9 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:26:38 -0500 Subject: [PATCH 25/28] cases 7/8 --- .github/workflows/test_simple_build_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index d4c30b8cad..d5c7697c9a 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -46,4 +46,4 @@ jobs: context: CI/ target: base push: true - tags: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test + tags: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test From 2860c4b19856ba9e2547f45a384c162ecb0d6b81 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:31:31 -0500 Subject: [PATCH 26/28] bogus username --- .github/workflows/test_simple_build_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index d5c7697c9a..853e39294f 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -33,7 +33,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: svalinn + username: foo password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository From 3f4c45094ec82fe71ff120a146fe819b2f0391b0 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:39:28 -0500 Subject: [PATCH 27/28] actor x 2 --- .github/workflows/test_simple_build_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index 853e39294f..8b2b22f060 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -33,7 +33,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: foo + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository From 2afc0b6d7b7647e6dd5a09c3f940e323b102a3a7 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 6 Aug 2023 09:42:36 -0500 Subject: [PATCH 28/28] repo_owner --- .github/workflows/test_simple_build_push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_simple_build_push.yml b/.github/workflows/test_simple_build_push.yml index 8b2b22f060..bf72eba325 100644 --- a/.github/workflows/test_simple_build_push.yml +++ b/.github/workflows/test_simple_build_push.yml @@ -33,7 +33,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} + username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout repository @@ -46,4 +46,4 @@ jobs: context: CI/ target: base push: true - tags: ghcr.io/${{ github.actor }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test + tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/base:test