From 7509341e43311c757d67c8c672ad1e40b858bfe0 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Sat, 6 Jul 2024 12:05:29 -0500 Subject: [PATCH 01/43] Add basic Python dependency caching --- .github/workflows/ci.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9293e319b42..a3818374dc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,10 +65,10 @@ jobs: python-version: "3.10" omp: n mpi: y - name: "Python ${{ matrix.python-version }} (omp=${{ matrix.omp }}, - mpi=${{ matrix.mpi }}, dagmc=${{ matrix.dagmc }}, ncrystal=${{ matrix.ncrystal }}, - libmesh=${{ matrix.libmesh }}, event=${{ matrix.event }} - vectfit=${{ matrix.vectfit }})" + name: "Python ${{ matrix.python-version }} (omp=${{ matrix.omp }}, + mpi=${{ matrix.mpi }}, dagmc=${{ matrix.dagmc }}, + ncrystal=${{ matrix.ncrystal }},libmesh=${{ matrix.libmesh }}, + event=${{ matrix.event }}, vectfit=${{ matrix.vectfit }})" env: MPI: ${{ matrix.mpi }} @@ -94,6 +94,18 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Restore Python cache + uses: actions/cache@v4 + with: + path: ${{ env.pythonLocation }} + key: python-cache-(python=${{ matrix.python-version }} (omp=${{ matrix.omp }} + mpi=${{ matrix.mpi }} dagmc=${{ matrix.dagmc }} ncrystal=${{ matrix.ncrystal }} + libmesh=${{ matrix.libmesh }} event=${{ matrix.event }} + vectfit=${{ matrix.vectfit }}) + # How to handle when each individual dependency changes? + # Should each dependency have its own individual cache? + # Or should they all be bundled together? + - name: Environment Variables run: | echo "DAGMC_ROOT=$HOME/DAGMC" @@ -143,7 +155,7 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - name: test + - name: test ## possibly refactor to make more shell: bash run: | CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ From 1524cf74bbfb83f5ec8545db68a784ebf0ea1ef3 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:46:44 -0500 Subject: [PATCH 02/43] Test NJOY install script refactor for specific install location --- .github/workflows/ci.yml | 9 +++++++-- tools/ci/gha-install-njoy.sh | 13 ++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3818374dc7..17ed2424a4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,6 @@ jobs: vectfit=${{ matrix.vectfit }}) # How to handle when each individual dependency changes? # Should each dependency have its own individual cache? - # Or should they all be bundled together? - name: Environment Variables run: | @@ -137,6 +136,12 @@ jobs: if: ${{ matrix.vectfit == 'y' }} run: sudo apt install -y libblas-dev liblapack-dev + #- name: Install NJOY2016 + # uses: actions/cache@v4 + # with: + # path: "$HOME/NJOY2016" + # key: NJOY2016- + - name: install shell: bash run: | @@ -155,7 +160,7 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - name: test ## possibly refactor to make more + - name: test shell: bash run: | CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 8255ffea836..b045b7610dd 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -1,7 +1,14 @@ #!/bin/bash set -ex + +# NJOY variables +NJOY_BRANCH='main' +NJOY_REPO='https://github.com/njoy/NJOY2016' +NJOY_INSTALL_DIR=$HOME/NJOY2016/ + cd $HOME -git clone https://github.com/njoy/NJOY2016 -cd NJOY2016 +git clone -b $NJOY_BRANCH $NJOY_REPO +cd $NJOY_INSTALL_DIR mkdir build && cd build -cmake -Dstatic=on .. && make 2>/dev/null && sudo make install +cmake -Dstatic=on -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR .. +make 2>/dev/null && sudo make install \ No newline at end of file From 1bc85729dba3387132f9b0d2c1b14bbfcf499c07 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:53:37 -0500 Subject: [PATCH 03/43] Temporarily turn off testing suite --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17ed2424a4a..e6235a313f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,11 +160,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - name: test - shell: bash - run: | - CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - $GITHUB_WORKSPACE/tools/ci/gha-script.sh + #- name: test + # shell: bash + # run: | + # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + # $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash From ac060420c42921fee19aaabcc73ecde575cfefb6 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:49:54 -0500 Subject: [PATCH 04/43] Refactor mcpl install script --- tools/ci/gha-install-mcpl.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 9b8609398a0..df0eb376725 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -1,7 +1,13 @@ #!/bin/bash set -ex + +MCPL_BRANCH='main' +MCPL_REPO='https://github.com/mctools/mcpl' +MCPL_INSTALL_DIR=$HOME/mcpl/ + cd $HOME -git clone https://github.com/mctools/mcpl -cd mcpl +git clone -b $MCPL_BRANCH $MCPL_REPO +cd $MCPL_INSTALL_DIR mkdir build && cd build -cmake .. && make 2>/dev/null && sudo make install +cmake .. -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR +make 2>/dev/null && sudo make install \ No newline at end of file From d7c1bdc475594de88e3daadd2ef7a7dab8080ad3 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:50:27 -0500 Subject: [PATCH 05/43] Add commit hashing and dependency caching for testing --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++--------- tools/ci/gha-caches.sh | 28 ++++++++++++++++++++++++++++ tools/ci/gha-install.sh | 8 ++++++-- 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100755 tools/ci/gha-caches.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6235a313f0..1330dd526d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,8 +102,6 @@ jobs: mpi=${{ matrix.mpi }} dagmc=${{ matrix.dagmc }} ncrystal=${{ matrix.ncrystal }} libmesh=${{ matrix.libmesh }} event=${{ matrix.event }} vectfit=${{ matrix.vectfit }}) - # How to handle when each individual dependency changes? - # Should each dependency have its own individual cache? - name: Environment Variables run: | @@ -136,11 +134,29 @@ jobs: if: ${{ matrix.vectfit == 'y' }} run: sudo apt install -y libblas-dev liblapack-dev - #- name: Install NJOY2016 - # uses: actions/cache@v4 - # with: - # path: "$HOME/NJOY2016" - # key: NJOY2016- + - name: Grab hashes of required dependencies (just NJOY, DAGMC, and MCPL for now) + run: | + $GITHUB_WORKSPACE/tools/ci/gha-caches.sh + + - name: Restore NJOY2016 from cache + uses: actions/cache@v4 + with: + path: ~/NJOY2016/ + key: NJOY2016-${{ env.NJOY_HASH}} + + - name: Restore DAGMC from cache + if: ${{ matrix.dagmc == 'y' }} + uses: actions/cache@v4 + with: + path: | + ~/NJOY2016/ + key: DAGMC-${{ env.DAGMC_HASH}}/MOAB-${{ env.MOAB_HASH }} + + - name: Restore MCPL + uses: actions/cache@v4 + with: + path: ~/MCPL/ + key: MCPL-${{ env.MCPL_HASH }} - name: install shell: bash @@ -148,13 +164,13 @@ jobs: echo "$HOME/NJOY2016/build" >> $GITHUB_PATH $GITHUB_WORKSPACE/tools/ci/gha-install.sh - - name: cache-xs + - name: Restore endf-b-vii.1 cache uses: actions/cache@v4 with: path: | ~/nndc_hdf5 ~/endf-b-vii.1 - key: ${{ runner.os }}-build-xs-cache + key: endf-b-vii.1-cache - name: before shell: bash diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh new file mode 100755 index 00000000000..8f6faefda75 --- /dev/null +++ b/tools/ci/gha-caches.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -ex + +echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV + +if [[ $DAGMC = 'y' ]]; then + echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV + echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV +fi + +# Check for NCrystal cache if needed +#if [[ $NCRYSTAL = 'y' ]]; then +# ./tools/ci/gha-install-ncrystal.sh +#fi + +# Install vectfit for WMP generation if needed +#if [[ $VECTFIT = 'y' ]]; then +# ./tools/ci/gha-install-vectfit.sh +#fi + +# Check for libmesh cache if needed +#if [[ $LIBMESH = 'y' ]]; then +# ./tools/ci/gha-install-libmesh.sh +#fi + +echo "MCPL_HASH=$(git ls-remote https://github.com/mctools/mcpl.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV + +# may be able to use this to control the directories to be cached. \ No newline at end of file diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 87952fda9cb..1ad2356addd 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -7,7 +7,9 @@ pip install --upgrade pytest pip install --upgrade numpy # Install NJOY 2016 -./tools/ci/gha-install-njoy.sh +if [[ ! -d "$HOME/NJOY2016" ]]; then + ./tools/ci/gha-install-njoy.sh +fi # Install DAGMC if needed if [[ $DAGMC = 'y' ]]; then @@ -30,7 +32,9 @@ if [[ $LIBMESH = 'y' ]]; then fi # Install MCPL -./tools/ci/gha-install-mcpl.sh +if [[ ! -d "$HOME/MCPL" ]]; then + ./tools/ci/gha-install-mcpl.sh +fi # For MPI configurations, make sure mpi4py and h5py are built against the # correct version of MPI From d168428e5cc2d19802f8b27947dd0dba0e16dad3 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:16:46 -0500 Subject: [PATCH 06/43] Adjust MCPL branch --- .github/workflows/ci.yml | 4 ++-- tools/ci/gha-install-mcpl.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1330dd526d5..6d727967521 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,13 +138,13 @@ jobs: run: | $GITHUB_WORKSPACE/tools/ci/gha-caches.sh - - name: Restore NJOY2016 from cache + - name: Restore NJOY2016 uses: actions/cache@v4 with: path: ~/NJOY2016/ key: NJOY2016-${{ env.NJOY_HASH}} - - name: Restore DAGMC from cache + - name: Restore DAGMC if: ${{ matrix.dagmc == 'y' }} uses: actions/cache@v4 with: diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index df0eb376725..63f9cebf458 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ex -MCPL_BRANCH='main' +MCPL_BRANCH='master' MCPL_REPO='https://github.com/mctools/mcpl' MCPL_INSTALL_DIR=$HOME/mcpl/ @@ -9,5 +9,5 @@ cd $HOME git clone -b $MCPL_BRANCH $MCPL_REPO cd $MCPL_INSTALL_DIR mkdir build && cd build -cmake .. -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR +cmake -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR .. make 2>/dev/null && sudo make install \ No newline at end of file From b572a0e5d06cfb84e8f930bef3cec77f85fb1792 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:35:28 -0500 Subject: [PATCH 07/43] Add MCPL build to path --- .github/workflows/ci.yml | 29 ++++++++++++++++------------- tools/ci/gha-caches.sh | 9 +++++---- tools/ci/gha-install-dagmc.sh | 4 ++-- tools/ci/gha-install-mcpl.sh | 9 +++++---- tools/ci/gha-install-njoy.sh | 4 ++-- tools/ci/gha-install.sh | 21 ++++++++++++++++++++- 6 files changed, 50 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d727967521..770092ef834 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,29 +134,32 @@ jobs: if: ${{ matrix.vectfit == 'y' }} run: sudo apt install -y libblas-dev liblapack-dev - - name: Grab hashes of required dependencies (just NJOY, DAGMC, and MCPL for now) + - name: Grab hashes of required dependencies (just NJOY, and MCPL for now) run: | $GITHUB_WORKSPACE/tools/ci/gha-caches.sh - name: Restore NJOY2016 uses: actions/cache@v4 with: - path: ~/NJOY2016/ - key: NJOY2016-${{ env.NJOY_HASH}} + path: ~/NJOY2016 + key: NJOY2016-${{ env.NJOY_HASH }} + restore-keys: NJOY2016- - name: Restore DAGMC if: ${{ matrix.dagmc == 'y' }} uses: actions/cache@v4 with: path: | - ~/NJOY2016/ - key: DAGMC-${{ env.DAGMC_HASH}}/MOAB-${{ env.MOAB_HASH }} + ~/DAGMC + ~/MOAB + key: DAGMC-${{ env.DAGMC_HASH }}/MOAB-${{ env.MOAB_HASH }} - - name: Restore MCPL + - name: Restore mcpl uses: actions/cache@v4 with: - path: ~/MCPL/ - key: MCPL-${{ env.MCPL_HASH }} + path: ~/mcpl + key: mcpl-${{ env.MCPL_HASH }} + restore-keys: mcpl- - name: install shell: bash @@ -176,11 +179,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - #- name: test - # shell: bash - # run: | - # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - # $GITHUB_WORKSPACE/tools/ci/gha-script.sh + - name: test + shell: bash + run: | + CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index 8f6faefda75..2dcbc4dc646 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -3,10 +3,11 @@ set -ex echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV -if [[ $DAGMC = 'y' ]]; then - echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV - echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV -fi + +#if [[ $DAGMC = 'y' ]]; then +# echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV +# echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV +#fi # Check for NCrystal cache if needed #if [[ $NCRYSTAL = 'y' ]]; then diff --git a/tools/ci/gha-install-dagmc.sh b/tools/ci/gha-install-dagmc.sh index 82759c9bcce..fb41503854e 100755 --- a/tools/ci/gha-install-dagmc.sh +++ b/tools/ci/gha-install-dagmc.sh @@ -21,7 +21,7 @@ git clone -b $MOAB_BRANCH $MOAB_REPO mkdir build && cd build cmake ../moab -DENABLE_HDF5=ON -DENABLE_NETCDF=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$MOAB_INSTALL_DIR -DENABLE_BLASLAPACK=OFF make -j && make -j install -rm -rf $HOME/MOAB/moab $HOME/MOAB/build +#rm -rf $HOME/MOAB/moab $HOME/MOAB/build # DAGMC Install cd $HOME @@ -30,6 +30,6 @@ git clone -b $DAGMC_BRANCH $DAGMC_REPO mkdir build && cd build cmake ../dagmc -DBUILD_TALLY=ON -DCMAKE_INSTALL_PREFIX=$DAGMC_INSTALL_DIR -DBUILD_STATIC_LIBS=OFF -DMOAB_DIR=$MOAB_INSTALL_DIR make -j install -rm -rf $HOME/DAGMC/dagmc $HOME/DAGMC/build +#rm -rf $HOME/DAGMC/dagmc $HOME/DAGMC/build cd $CURRENT_DIR diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 63f9cebf458..179221829a0 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -1,13 +1,14 @@ #!/bin/bash set -ex +# MCPL variables MCPL_BRANCH='master' MCPL_REPO='https://github.com/mctools/mcpl' -MCPL_INSTALL_DIR=$HOME/mcpl/ +#MCPL_INSTALL_DIR=$HOME/mcpl/ cd $HOME -git clone -b $MCPL_BRANCH $MCPL_REPO -cd $MCPL_INSTALL_DIR +git clone $MCPL_REPO +cd mcpl mkdir build && cd build -cmake -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR .. +cmake .. # -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index b045b7610dd..5b63afdcf6f 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -8,7 +8,7 @@ NJOY_INSTALL_DIR=$HOME/NJOY2016/ cd $HOME git clone -b $NJOY_BRANCH $NJOY_REPO -cd $NJOY_INSTALL_DIR +cd NJOY2016 mkdir build && cd build -cmake -Dstatic=on -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR .. +cmake -Dstatic=on .. #-DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 1ad2356addd..cd3a51b7a49 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -9,11 +9,16 @@ pip install --upgrade numpy # Install NJOY 2016 if [[ ! -d "$HOME/NJOY2016" ]]; then ./tools/ci/gha-install-njoy.sh +else + cd $HOME/NJOY2016/build && cmake -Dstatic=on .. && + make 2>/dev/null && sudo make install fi # Install DAGMC if needed if [[ $DAGMC = 'y' ]]; then + #if [[ ! -d "$HOME/DAGMC" | ! -d "$HOME/MOAB"]]; then ./tools/ci/gha-install-dagmc.sh + #else fi # Install NCrystal if needed @@ -32,10 +37,14 @@ if [[ $LIBMESH = 'y' ]]; then fi # Install MCPL -if [[ ! -d "$HOME/MCPL" ]]; then +if [[ ! -d "$HOME/mcpl" ]]; then ./tools/ci/gha-install-mcpl.sh +else + cd $HOME/mcpl/build && cmake .. && + make 2>/dev/null && sudo make install fi + # For MPI configurations, make sure mpi4py and h5py are built against the # correct version of MPI if [[ $MPI == 'y' ]]; then @@ -52,4 +61,14 @@ fi python tools/ci/gha-install.py # Install Python API in editable mode +<<<<<<< HEAD pip install -e .[test,vtk,ci] +======= +pip install -e .[test,vtk] + +# For coverage testing of the C++ source files +pip install cpp-coveralls + +# For coverage testing of the Python source files +pip install coveralls +>>>>>>> 9198dde0e (Fix gha-install issue) From d2dec2da1326a963be60ffa51a43e69bb4389921 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:24:25 -0500 Subject: [PATCH 08/43] Return to github workspace after reinstalling makes --- .github/workflows/ci.yml | 10 +++++----- tools/ci/gha-install-mcpl.sh | 5 ++--- tools/ci/gha-install-njoy.sh | 7 +++---- tools/ci/gha-install.sh | 8 ++++---- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 770092ef834..c0879ab9436 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,11 +179,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - name: test - shell: bash - run: | - CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - $GITHUB_WORKSPACE/tools/ci/gha-script.sh + #- name: test + # shell: bash + # run: | + # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + # $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 179221829a0..ead3344f5a0 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -2,13 +2,12 @@ set -ex # MCPL variables -MCPL_BRANCH='master' MCPL_REPO='https://github.com/mctools/mcpl' -#MCPL_INSTALL_DIR=$HOME/mcpl/ +MCPL_INSTALL_DIR=$HOME/mcpl/build cd $HOME git clone $MCPL_REPO cd mcpl mkdir build && cd build -cmake .. # -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR +cmake .. #-DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR && make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 5b63afdcf6f..1fde1650f6e 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -2,13 +2,12 @@ set -ex # NJOY variables -NJOY_BRANCH='main' NJOY_REPO='https://github.com/njoy/NJOY2016' -NJOY_INSTALL_DIR=$HOME/NJOY2016/ +NJOY_INSTALL_DIR=$HOME/NJOY2016 cd $HOME -git clone -b $NJOY_BRANCH $NJOY_REPO +git clone $NJOY_REPO cd NJOY2016 mkdir build && cd build -cmake -Dstatic=on .. #-DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR +cmake -Dstatic=on .. #-DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index cd3a51b7a49..4ac246cbff5 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -10,8 +10,8 @@ pip install --upgrade numpy if [[ ! -d "$HOME/NJOY2016" ]]; then ./tools/ci/gha-install-njoy.sh else - cd $HOME/NJOY2016/build && cmake -Dstatic=on .. && - make 2>/dev/null && sudo make install + cd $HOME/NJOY2016/build && sudo make install + cd $GITHUB_WORKSPACE fi # Install DAGMC if needed @@ -40,8 +40,8 @@ fi if [[ ! -d "$HOME/mcpl" ]]; then ./tools/ci/gha-install-mcpl.sh else - cd $HOME/mcpl/build && cmake .. && - make 2>/dev/null && sudo make install + cd $HOME/mcpl/build && sudo make install + cd $GITHUB_WORKSPACE fi From dd2f4fbab6e11b7a0afae33279a974219a2d9bee Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:46:46 -0500 Subject: [PATCH 09/43] Re-add support for DAGMC caching --- tools/ci/gha-caches.sh | 9 ++++----- tools/ci/gha-install.sh | 11 ++++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index 2dcbc4dc646..8f6faefda75 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -3,11 +3,10 @@ set -ex echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV - -#if [[ $DAGMC = 'y' ]]; then -# echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV -# echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV -#fi +if [[ $DAGMC = 'y' ]]; then + echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV + echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV +fi # Check for NCrystal cache if needed #if [[ $NCRYSTAL = 'y' ]]; then diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 4ac246cbff5..aa8b9a26374 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -16,9 +16,14 @@ fi # Install DAGMC if needed if [[ $DAGMC = 'y' ]]; then - #if [[ ! -d "$HOME/DAGMC" | ! -d "$HOME/MOAB"]]; then - ./tools/ci/gha-install-dagmc.sh - #else + if [ ! -d "$HOME/DAGMC" ] || [ ! -d "$HOME/MOAB" ] + then + ./tools/ci/gha-install-dagmc.sh + else + cd $HOME/DAGMC/build && make -j install + cd $HOME/MOAB/build && make -j install + cd $GITHUB_WORKSPACE + fi fi # Install NCrystal if needed From 9a170cdcd62c846c1cdb410457980da94309194a Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:13:14 -0500 Subject: [PATCH 10/43] Reenable testing and fix DAGMC hashing --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0879ab9436..770092ef834 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,11 +179,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - #- name: test - # shell: bash - # run: | - # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - # $GITHUB_WORKSPACE/tools/ci/gha-script.sh + - name: test + shell: bash + run: | + CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash From 67a4740c0da812635a3b102335a9d441b5e7ec52 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:57:27 -0500 Subject: [PATCH 11/43] Add cache support for ncrystal and temporarily take out testing --- .github/workflows/ci.yml | 24 +++++++++++++++++------- tools/ci/gha-caches.sh | 20 +++++++++++++------- tools/ci/gha-install.sh | 9 ++++++++- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 770092ef834..f184b91d280 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,7 +134,7 @@ jobs: if: ${{ matrix.vectfit == 'y' }} run: sudo apt install -y libblas-dev liblapack-dev - - name: Grab hashes of required dependencies (just NJOY, and MCPL for now) + - name: Hash remote required dependencies run: | $GITHUB_WORKSPACE/tools/ci/gha-caches.sh @@ -153,7 +153,17 @@ jobs: ~/DAGMC ~/MOAB key: DAGMC-${{ env.DAGMC_HASH }}/MOAB-${{ env.MOAB_HASH }} - + + - name: Restore NCrystal + if: ${{ matrix.ncrystal == 'y' }} + uses: actions/cache@v4 + with: + path: + ~/ncrystal_bld + ~/ncrystal_inst + key: NCrystal-${{ env.NC_HASH }} + restore-keys: NCrystal- + - name: Restore mcpl uses: actions/cache@v4 with: @@ -179,11 +189,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - name: test - shell: bash - run: | - CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - $GITHUB_WORKSPACE/tools/ci/gha-script.sh + #- name: test + # shell: bash + # run: | + # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + # $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index 8f6faefda75..377e6800e53 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -1,17 +1,22 @@ #!/bin/bash set -ex -echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV +echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 |\ + head -c 15)" >> $GITHUB_ENV if [[ $DAGMC = 'y' ]]; then - echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV - echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV + echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git |\ + cut -f 1 | head -c 15)" >> $GITHUB_ENV + + echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git |\ + cut -f 1 | head -c 15)" >> $GITHUB_ENV fi # Check for NCrystal cache if needed -#if [[ $NCRYSTAL = 'y' ]]; then -# ./tools/ci/gha-install-ncrystal.sh -#fi +if [[ $NCRYSTAL = 'y' ]]; then + echo "NC_HASH=$(git ls-remote https://github.com/mctools/ncrystal \ + --branch develop | cut -f 1 | head -c 15)" >> $GITHUB_ENV +fi # Install vectfit for WMP generation if needed #if [[ $VECTFIT = 'y' ]]; then @@ -23,6 +28,7 @@ fi # ./tools/ci/gha-install-libmesh.sh #fi -echo "MCPL_HASH=$(git ls-remote https://github.com/mctools/mcpl.git | cut -f 1 | head -c 15)" >> $GITHUB_ENV +echo "MCPL_HASH=$(git ls-remote https://github.com/mctools/mcpl.git | cut -f 1 |\ + head -c 15)" >> $GITHUB_ENV # may be able to use this to control the directories to be cached. \ No newline at end of file diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index aa8b9a26374..08fe12eb0ff 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -28,7 +28,14 @@ fi # Install NCrystal if needed if [[ $NCRYSTAL = 'y' ]]; then - ./tools/ci/gha-install-ncrystal.sh + if [ ! -d "$HOME/ncrystal_bld" ] + then + ./tools/ci/gha-install-ncrystal.sh + else + cd $HOME/ncrystal_bld && make -j install + eval $( "$HOME/ncrystal_inst/bin/ncrystal-config" --setup ) + cd $GITHUB_WORKSPACE + fi fi # Install vectfit for WMP generation if needed From afd514473be63fdf1e58b3339b0a963d26669ddf Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:55:07 -0500 Subject: [PATCH 12/43] Re-add testing and minor tweaks for ncrystal --- .github/workflows/ci.yml | 14 +++++++------- tools/ci/gha-install-ncrystal.sh | 1 - tools/ci/gha-install.sh | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f184b91d280..cb8f25a9bd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,7 +134,7 @@ jobs: if: ${{ matrix.vectfit == 'y' }} run: sudo apt install -y libblas-dev liblapack-dev - - name: Hash remote required dependencies + - name: Hash dependencies to check caches run: | $GITHUB_WORKSPACE/tools/ci/gha-caches.sh @@ -158,7 +158,7 @@ jobs: if: ${{ matrix.ncrystal == 'y' }} uses: actions/cache@v4 with: - path: + path: | ~/ncrystal_bld ~/ncrystal_inst key: NCrystal-${{ env.NC_HASH }} @@ -189,11 +189,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - #- name: test - # shell: bash - # run: | - # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - # $GITHUB_WORKSPACE/tools/ci/gha-script.sh + - name: test + shell: bash + run: | + CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash diff --git a/tools/ci/gha-install-ncrystal.sh b/tools/ci/gha-install-ncrystal.sh index 16f77e13e2b..f352e700612 100755 --- a/tools/ci/gha-install-ncrystal.sh +++ b/tools/ci/gha-install-ncrystal.sh @@ -34,7 +34,6 @@ make install # yet. If it appears in the future, we should add it here. # Output the configuration to the log - "${INST_DIR}/bin/ncrystal-config" --setup # Change environmental variables diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 08fe12eb0ff..fac1aaa5ebf 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -32,14 +32,14 @@ if [[ $NCRYSTAL = 'y' ]]; then then ./tools/ci/gha-install-ncrystal.sh else - cd $HOME/ncrystal_bld && make -j install + cd $HOME/ncrystal_bld && make install eval $( "$HOME/ncrystal_inst/bin/ncrystal-config" --setup ) cd $GITHUB_WORKSPACE fi fi # Install vectfit for WMP generation if needed -if [[ $VECTFIT = 'y' ]]; then +if [[ $VECTFIT = 'y' ]]; then ./tools/ci/gha-install-vectfit.sh fi From 8349c8af7440a6f7f787e629d69eb904effed31e Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:00:40 -0500 Subject: [PATCH 13/43] Add cache support for libmesh --- .github/workflows/ci.yml | 29 ++++++++++++++++++++--------- tools/ci/gha-caches.sh | 17 ++++++++--------- tools/ci/gha-install-libmesh.sh | 5 +++-- tools/ci/gha-install-mcpl.sh | 2 +- tools/ci/gha-install-njoy.sh | 2 +- tools/ci/gha-install.sh | 12 ++++++++++-- 6 files changed, 43 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb8f25a9bd2..907d4690dee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,10 +65,7 @@ jobs: python-version: "3.10" omp: n mpi: y - name: "Python ${{ matrix.python-version }} (omp=${{ matrix.omp }}, - mpi=${{ matrix.mpi }}, dagmc=${{ matrix.dagmc }}, - ncrystal=${{ matrix.ncrystal }},libmesh=${{ matrix.libmesh }}, - event=${{ matrix.event }}, vectfit=${{ matrix.vectfit }})" + env: MPI: ${{ matrix.mpi }} @@ -86,6 +83,15 @@ jobs: # FI_EFA_FORK_SAFE=1 in more recent versions. RDMAV_FORK_SAFE: 1 + name: "Py ${{ matrix.python-version }} + (omp=${{ matrix.omp }}, + mpi=${{ matrix.mpi }}, + dagmc=${{ matrix.dagmc }}, + ncrystal=${{ matrix.ncrystal }}, + libmesh=${{ matrix.libmesh }}, + event=${{ matrix.event }}, + vectfit=${{ matrix.vectfit }})" + steps: - uses: actions/checkout@v4 @@ -98,7 +104,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: python-cache-(python=${{ matrix.python-version }} (omp=${{ matrix.omp }} + key: py-(python=${{ matrix.python-version }} (omp=${{ matrix.omp }} mpi=${{ matrix.mpi }} dagmc=${{ matrix.dagmc }} ncrystal=${{ matrix.ncrystal }} libmesh=${{ matrix.libmesh }} event=${{ matrix.event }} vectfit=${{ matrix.vectfit }}) @@ -143,7 +149,6 @@ jobs: with: path: ~/NJOY2016 key: NJOY2016-${{ env.NJOY_HASH }} - restore-keys: NJOY2016- - name: Restore DAGMC if: ${{ matrix.dagmc == 'y' }} @@ -159,22 +164,28 @@ jobs: uses: actions/cache@v4 with: path: | + ~/ncrystal_src ~/ncrystal_bld ~/ncrystal_inst key: NCrystal-${{ env.NC_HASH }} - restore-keys: NCrystal- + - name: Restore libmesh + if: ${{ matrix.libmesh == 'y' }} + uses: actions/cache@v4 + with: + path: | + ~/LIBMESH + key: libmesh-mpi-${{matrix.mpi}}-${{ env.NC_HASH }} + - name: Restore mcpl uses: actions/cache@v4 with: path: ~/mcpl key: mcpl-${{ env.MCPL_HASH }} - restore-keys: mcpl- - name: install shell: bash run: | - echo "$HOME/NJOY2016/build" >> $GITHUB_PATH $GITHUB_WORKSPACE/tools/ci/gha-install.sh - name: Restore endf-b-vii.1 cache diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index 377e6800e53..e0b374e0a3f 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -5,8 +5,8 @@ echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 head -c 15)" >> $GITHUB_ENV if [[ $DAGMC = 'y' ]]; then - echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git |\ - cut -f 1 | head -c 15)" >> $GITHUB_ENV + echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git \ + --branch Version5.1.0 | cut -f 1 | head -c 15)" >> $GITHUB_ENV echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git |\ cut -f 1 | head -c 15)" >> $GITHUB_ENV @@ -24,11 +24,10 @@ fi #fi # Check for libmesh cache if needed -#if [[ $LIBMESH = 'y' ]]; then -# ./tools/ci/gha-install-libmesh.sh -#fi - -echo "MCPL_HASH=$(git ls-remote https://github.com/mctools/mcpl.git | cut -f 1 |\ - head -c 15)" >> $GITHUB_ENV +if [[ $LIBMESH = 'y' ]]; then + echo "NC_HASH=$(git ls-remote https://github.com/libmesh/libmesh \ + --branch v1.7.1 | cut -f 1 | head -c 15)" >> $GITHUB_ENV +fi -# may be able to use this to control the directories to be cached. \ No newline at end of file +echo "MCPL_HASH=$(git ls-remote https://github.com/mctools/mcpl.git |\ + cut -f 1 | head -c 15)" >> $GITHUB_ENV diff --git a/tools/ci/gha-install-libmesh.sh b/tools/ci/gha-install-libmesh.sh index cb808ae5b3b..6771e69d5a6 100755 --- a/tools/ci/gha-install-libmesh.sh +++ b/tools/ci/gha-install-libmesh.sh @@ -13,10 +13,11 @@ if [[ $MPI == 'y' ]]; then ../libmesh/configure --prefix=$HOME/LIBMESH CXX=mpicxx CC=mpicc FC=mpifort F77=mpif77 \ --enable-exodus --disable-netcdf-4 --disable-eigen --disable-lapack else - ../libmesh/configure --prefix=$HOME/LIBMESH --enable-exodus --disable-netcdf-4 --disable-eigen --disable-lapack --disable-mpi + ../libmesh/configure --prefix=$HOME/LIBMESH --enable-exodus --disable-netcdf-4 \ + --disable-eigen --disable-lapack --disable-mpi fi make -j4 install export LIBMESH_PC=$HOME/LIBMESH/lib/pkgconfig/ -rm -rf $HOME/LIBMESH/build +#rm -rf $HOME/LIBMESH/build popd diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index ead3344f5a0..7cbb58acd69 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -9,5 +9,5 @@ cd $HOME git clone $MCPL_REPO cd mcpl mkdir build && cd build -cmake .. #-DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR && +cmake .. -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR && make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 1fde1650f6e..01a19da249d 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -9,5 +9,5 @@ cd $HOME git clone $NJOY_REPO cd NJOY2016 mkdir build && cd build -cmake -Dstatic=on .. #-DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && +cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index fac1aaa5ebf..57320bf5a9a 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -13,6 +13,7 @@ else cd $HOME/NJOY2016/build && sudo make install cd $GITHUB_WORKSPACE fi +echo "$HOME/NJOY2016/build" >> $GITHUB_PATH # Install DAGMC if needed if [[ $DAGMC = 'y' ]]; then @@ -32,7 +33,7 @@ if [[ $NCRYSTAL = 'y' ]]; then then ./tools/ci/gha-install-ncrystal.sh else - cd $HOME/ncrystal_bld && make install + cd $HOME/ncrystal_bld eval $( "$HOME/ncrystal_inst/bin/ncrystal-config" --setup ) cd $GITHUB_WORKSPACE fi @@ -45,7 +46,14 @@ fi # Install libMesh if needed if [[ $LIBMESH = 'y' ]]; then - ./tools/ci/gha-install-libmesh.sh + if [ ! -d "$HOME/LIBMESH" ] + then + ./tools/ci/gha-install-libmesh.sh + else + cd $HOME/LIBMESH/build && make -j4 install + export LIBMESH_PC=$HOME/LIBMESH/lib/pkgconfig/ + cd $GITHUB_WORKSPACE + fi fi # Install MCPL From 41e8f3dba6813232a9d5da27e4b7c764c4c02141 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:36:27 -0500 Subject: [PATCH 14/43] Test removal of make install --- .github/workflows/ci.yml | 6 +++--- tools/ci/gha-install.sh | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 907d4690dee..74c71b0e26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,9 +104,9 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: py-(python=${{ matrix.python-version }} (omp=${{ matrix.omp }} - mpi=${{ matrix.mpi }} dagmc=${{ matrix.dagmc }} ncrystal=${{ matrix.ncrystal }} - libmesh=${{ matrix.libmesh }} event=${{ matrix.event }} + key: py-${{ matrix.python-version }}-(omp=${{ matrix.omp }}- + mpi=${{ matrix.mpi }}-dagmc=${{ matrix.dagmc }}-ncrystal=${{ matrix.ncrystal }}- + libmesh=${{ matrix.libmesh }}-event=${{ matrix.event }}- vectfit=${{ matrix.vectfit }}) - name: Environment Variables diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 57320bf5a9a..cb7d7e00113 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -10,7 +10,7 @@ pip install --upgrade numpy if [[ ! -d "$HOME/NJOY2016" ]]; then ./tools/ci/gha-install-njoy.sh else - cd $HOME/NJOY2016/build && sudo make install + #cd $HOME/NJOY2016/build && sudo make install cd $GITHUB_WORKSPACE fi echo "$HOME/NJOY2016/build" >> $GITHUB_PATH @@ -21,8 +21,8 @@ if [[ $DAGMC = 'y' ]]; then then ./tools/ci/gha-install-dagmc.sh else - cd $HOME/DAGMC/build && make -j install - cd $HOME/MOAB/build && make -j install + #cd $HOME/DAGMC/build && make -j install + #cd $HOME/MOAB/build && make -j install cd $GITHUB_WORKSPACE fi fi @@ -50,7 +50,7 @@ if [[ $LIBMESH = 'y' ]]; then then ./tools/ci/gha-install-libmesh.sh else - cd $HOME/LIBMESH/build && make -j4 install + #cd $HOME/LIBMESH/build && make -j4 install export LIBMESH_PC=$HOME/LIBMESH/lib/pkgconfig/ cd $GITHUB_WORKSPACE fi @@ -60,7 +60,7 @@ fi if [[ ! -d "$HOME/mcpl" ]]; then ./tools/ci/gha-install-mcpl.sh else - cd $HOME/mcpl/build && sudo make install + #cd $HOME/mcpl/build && sudo make install cd $GITHUB_WORKSPACE fi From b38e1fa4f811afbc54f143ed4dd56856c4eec0c8 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:44:50 -0500 Subject: [PATCH 15/43] Fix mcpl install dir and remove testing again --- .github/workflows/ci.yml | 16 ++++++++-------- tools/ci/gha-install-mcpl.sh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74c71b0e26e..41e703c872d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,9 +104,9 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: py-${{ matrix.python-version }}-(omp=${{ matrix.omp }}- - mpi=${{ matrix.mpi }}-dagmc=${{ matrix.dagmc }}-ncrystal=${{ matrix.ncrystal }}- - libmesh=${{ matrix.libmesh }}-event=${{ matrix.event }}- + key: py-${{ matrix.python-version }}-(omp=${{ matrix.omp }} + mpi=${{ matrix.mpi }} dagmc=${{ matrix.dagmc }} ncrystal=${{ matrix.ncrystal }} + libmesh=${{ matrix.libmesh }} event=${{ matrix.event }} vectfit=${{ matrix.vectfit }}) - name: Environment Variables @@ -200,11 +200,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - name: test - shell: bash - run: | - CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - $GITHUB_WORKSPACE/tools/ci/gha-script.sh + #- name: test + # shell: bash + # run: | + # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + # $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 7cbb58acd69..7de970810c7 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -3,7 +3,7 @@ set -ex # MCPL variables MCPL_REPO='https://github.com/mctools/mcpl' -MCPL_INSTALL_DIR=$HOME/mcpl/build +MCPL_INSTALL_DIR=$HOME/mcpl/ cd $HOME git clone $MCPL_REPO From 8dc462c29ada46ad9de4eb94e49c140014a07e0f Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:53:26 -0500 Subject: [PATCH 16/43] Add mcpl prefix path to gha-install.py --- .github/workflows/ci.yml | 10 +++++----- tools/ci/gha-install-mcpl.sh | 2 +- tools/ci/gha-install.py | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41e703c872d..5bfdf2d9ed3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,11 +200,11 @@ jobs: shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - #- name: test - # shell: bash - # run: | - # CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ - # $GITHUB_WORKSPACE/tools/ci/gha-script.sh + - name: test + shell: bash + run: | + CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/ + $GITHUB_WORKSPACE/tools/ci/gha-script.sh - name: after_success shell: bash diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 7de970810c7..4af01d61c47 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -3,7 +3,7 @@ set -ex # MCPL variables MCPL_REPO='https://github.com/mctools/mcpl' -MCPL_INSTALL_DIR=$HOME/mcpl/ +MCPL_INSTALL_DIR=$HOME/mcpl cd $HOME git clone $MCPL_REPO diff --git a/tools/ci/gha-install.py b/tools/ci/gha-install.py index f046e863470..7d49f46616b 100644 --- a/tools/ci/gha-install.py +++ b/tools/ci/gha-install.py @@ -11,6 +11,8 @@ def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False, ncrys # Build in debug mode by default with support for MCPL cmake_cmd = ['cmake', '-DCMAKE_BUILD_TYPE=Debug', '-DOPENMC_USE_MCPL=on'] + mcpl_cmake_path = os.environ.get('HOME') + '/mcpl/lib/cmake/MCPL' + cmake_cmd.append(f'-DMCPL_DIR={mcpl_cmake_path}') # Turn off OpenMP if specified if not omp: From 8877edbec0e857fb78b54b9927394c1b0ea20c1b Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:09:56 -0500 Subject: [PATCH 17/43] Cache vectfit and temporarily remove testing --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ tools/ci/gha-caches.sh | 15 ++++++++------- tools/ci/gha-install.sh | 13 +++++-------- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bfdf2d9ed3..52f1ba16c3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,6 +169,18 @@ jobs: ~/ncrystal_inst key: NCrystal-${{ env.NC_HASH }} + - name: Restore vectfit + if: ${{ matrix.vectfit == 'y' }} + uses: actions/cache@v4 + with: + path: | + ~/pybind11 + ~/xtl + ~/xtensor-python + ~/xtensor-blas + ~/vectfit + key: vectfit-${{ env.VF_HASH }}/pybind-${{ env.PYBIND_HASH }} + - name: Restore libmesh if: ${{ matrix.libmesh == 'y' }} uses: actions/cache@v4 @@ -176,12 +188,21 @@ jobs: path: | ~/LIBMESH key: libmesh-mpi-${{matrix.mpi}}-${{ env.NC_HASH }} +<<<<<<< HEAD - name: Restore mcpl uses: actions/cache@v4 with: path: ~/mcpl key: mcpl-${{ env.MCPL_HASH }} +======= + + #- name: Restore mcpl + # uses: actions/cache@v4 + # with: + # path: ~/mcpl + # key: mcpl-${{ env.MCPL_HASH }} +>>>>>>> 322d1d221 (Cache vectfit and temporarily remove testing) - name: install shell: bash diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index e0b374e0a3f..4ea8624c765 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -9,21 +9,22 @@ if [[ $DAGMC = 'y' ]]; then --branch Version5.1.0 | cut -f 1 | head -c 15)" >> $GITHUB_ENV echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git |\ - cut -f 1 | head -c 15)" >> $GITHUB_ENV + cut -f 1 | head -c 15)" >> $GITHUB_ENV fi -# Check for NCrystal cache if needed if [[ $NCRYSTAL = 'y' ]]; then echo "NC_HASH=$(git ls-remote https://github.com/mctools/ncrystal \ --branch develop | cut -f 1 | head -c 15)" >> $GITHUB_ENV fi -# Install vectfit for WMP generation if needed -#if [[ $VECTFIT = 'y' ]]; then -# ./tools/ci/gha-install-vectfit.sh -#fi +if [[ $VECTFIT = 'y' ]]; then + echo "PYBIND_HASH=$(git ls-remote https://github.com/pybind/pybind11 \ + --branch master | cut -f 1 | head -c 15)" >> $GITHUB_ENV + + echo "VF_HASH=$(git ls-remote https://github.com/liangjg/vectfit.git |\ + cut -f 1 | head -c 15)" >> $GITHUB_ENV +fi -# Check for libmesh cache if needed if [[ $LIBMESH = 'y' ]]; then echo "NC_HASH=$(git ls-remote https://github.com/libmesh/libmesh \ --branch v1.7.1 | cut -f 1 | head -c 15)" >> $GITHUB_ENV diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index cb7d7e00113..4ffd90e268a 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -46,22 +46,19 @@ fi # Install libMesh if needed if [[ $LIBMESH = 'y' ]]; then - if [ ! -d "$HOME/LIBMESH" ] + if [ ! -d "$HOME/vectfit" ] then - ./tools/ci/gha-install-libmesh.sh + ./tools/ci/gha-install-vectfit.sh else - #cd $HOME/LIBMESH/build && make -j4 install - export LIBMESH_PC=$HOME/LIBMESH/lib/pkgconfig/ - cd $GITHUB_WORKSPACE + pip install $HOME/pybind11 + pip install wheel + pip install --no-build-isolation ./vectfit fi fi # Install MCPL if [[ ! -d "$HOME/mcpl" ]]; then ./tools/ci/gha-install-mcpl.sh -else - #cd $HOME/mcpl/build && sudo make install - cd $GITHUB_WORKSPACE fi From 83d41deb108b735013fd83881b457dd261b79760 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:23:31 -0500 Subject: [PATCH 18/43] Handle case for successful vectfit restore --- tools/ci/gha-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 4ffd90e268a..4cf8e2e8d05 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -41,7 +41,10 @@ fi # Install vectfit for WMP generation if needed if [[ $VECTFIT = 'y' ]]; then - ./tools/ci/gha-install-vectfit.sh + if [ ! -d "$HOME/vectfit" ] + then + ./tools/ci/gha-install-vectfit.sh + fi fi # Install libMesh if needed From 57b6388c6d0507e2aa90fda73a82915d12eb0f1c Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:11:14 -0500 Subject: [PATCH 19/43] Try renaming scheme for job matrix --- .github/workflows/ci.yml | 202 +++++++++++++++++++++++++++++---------- 1 file changed, 151 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52f1ba16c3f..2cdc0cca4a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,51 +21,157 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: + job-setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v4 + - name: set job matrix for main + id: jobs + shell: bash + run: | + echo "matrix={ + \"include\": + { + \"job-name\": \"Py3.10\", + \"python-version\": \"3.10\", + \"omp\": \"n\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 omp\", + \"python-version\": \"3.10\", + \"omp\": \"y\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 mpi\", + \"python-version\": \"3.10\", + \"omp\": \"n\", + \"mpi\": \"y\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 omp mpi\", + \"python-version\": \"3.10\", + \"omp\": \"y\", + \"mpi\": \"y\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.11\", + \"python-version\": \"3.11\", + \"omp\": \"n\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.12\", + \"python-version\": \"3.12\", + \"omp\": \"n\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 omp mpi dagmc\", + \"python-version\": \"3.10\", + \"omp\": \"y\", + \"mpi\": \"y\", + \"dagmc\": \"y\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 ncrystal\", + \"python-version\": \"3.10\", + \"omp\": \"n\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"y\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 omp mpi libmesh\", + \"python-version\": \"3.10\", + \"omp\": \"y\", + \"mpi\": \"y\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"y\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 omp libmesh\", + \"python-version\": \"3.10\", + \"omp\": \"y\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"y\", + \"event\": \"n\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 omp event\", + \"python-version\": \"3.10\", + \"omp\": \"y\", + \"mpi\": \"n\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"y\", + \"vectfit\": \"n\" + }, + { + \"job-name\": \"Py3.10 mpi vectfit\", + \"python-version\": \"3.10\", + \"omp\": \"n\", + \"mpi\": \"y\", + \"dagmc\": \"n\", + \"ncrystal\": \"n\", + \"libmesh\": \"n\", + \"event\": \"n\", + \"vectfit\": \"y\" + }}" >> $GITHUB_OUTPUT + main: runs-on: ubuntu-22.04 strategy: - matrix: - python-version: ["3.10"] - mpi: [n, y] - omp: [n, y] - dagmc: [n] - ncrystal: [n] - libmesh: [n] - event: [n] - vectfit: [n] - - include: - - python-version: "3.11" - omp: n - mpi: n - - python-version: "3.12" - omp: n - mpi: n - - dagmc: y - python-version: "3.10" - mpi: y - omp: y - - ncrystal: y - python-version: "3.10" - mpi: n - omp: n - - libmesh: y - python-version: "3.10" - mpi: y - omp: y - - libmesh: y - python-version: "3.10" - mpi: n - omp: y - - event: y - python-version: "3.10" - omp: y - mpi: n - - vectfit: y - python-version: "3.10" - omp: n - mpi: y - + matrix: ${{fromJson(needs.setup.outputs.matrix)}} + + name: "${{ matrix.job-name }}" env: MPI: ${{ matrix.mpi }} @@ -83,15 +189,6 @@ jobs: # FI_EFA_FORK_SAFE=1 in more recent versions. RDMAV_FORK_SAFE: 1 - name: "Py ${{ matrix.python-version }} - (omp=${{ matrix.omp }}, - mpi=${{ matrix.mpi }}, - dagmc=${{ matrix.dagmc }}, - ncrystal=${{ matrix.ncrystal }}, - libmesh=${{ matrix.libmesh }}, - event=${{ matrix.event }}, - vectfit=${{ matrix.vectfit }})" - steps: - uses: actions/checkout@v4 @@ -197,6 +294,7 @@ jobs: key: mcpl-${{ env.MCPL_HASH }} ======= +<<<<<<< HEAD #- name: Restore mcpl # uses: actions/cache@v4 # with: @@ -204,6 +302,8 @@ jobs: # key: mcpl-${{ env.MCPL_HASH }} >>>>>>> 322d1d221 (Cache vectfit and temporarily remove testing) +======= +>>>>>>> f991cf9bb (Try renaming scheme for job matrix) - name: install shell: bash run: | From 62c31aa9ac74a2d9c270c5a7e5bdb6978cdfa9dd Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:30:07 -0500 Subject: [PATCH 20/43] Extract job matrix from json --- .github/workflows/ci.yml | 147 +-------------------------------------- tools/ci/matrix.json | 136 ++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 146 deletions(-) create mode 100644 tools/ci/matrix.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cdc0cca4a7..40096cfce21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,155 +21,10 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - job-setup: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - - name: set job matrix for main - id: jobs - shell: bash - run: | - echo "matrix={ - \"include\": - { - \"job-name\": \"Py3.10\", - \"python-version\": \"3.10\", - \"omp\": \"n\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 omp\", - \"python-version\": \"3.10\", - \"omp\": \"y\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 mpi\", - \"python-version\": \"3.10\", - \"omp\": \"n\", - \"mpi\": \"y\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 omp mpi\", - \"python-version\": \"3.10\", - \"omp\": \"y\", - \"mpi\": \"y\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.11\", - \"python-version\": \"3.11\", - \"omp\": \"n\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.12\", - \"python-version\": \"3.12\", - \"omp\": \"n\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 omp mpi dagmc\", - \"python-version\": \"3.10\", - \"omp\": \"y\", - \"mpi\": \"y\", - \"dagmc\": \"y\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 ncrystal\", - \"python-version\": \"3.10\", - \"omp\": \"n\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"y\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 omp mpi libmesh\", - \"python-version\": \"3.10\", - \"omp\": \"y\", - \"mpi\": \"y\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"y\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 omp libmesh\", - \"python-version\": \"3.10\", - \"omp\": \"y\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"y\", - \"event\": \"n\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 omp event\", - \"python-version\": \"3.10\", - \"omp\": \"y\", - \"mpi\": \"n\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"y\", - \"vectfit\": \"n\" - }, - { - \"job-name\": \"Py3.10 mpi vectfit\", - \"python-version\": \"3.10\", - \"omp\": \"n\", - \"mpi\": \"y\", - \"dagmc\": \"n\", - \"ncrystal\": \"n\", - \"libmesh\": \"n\", - \"event\": \"n\", - \"vectfit\": \"y\" - }}" >> $GITHUB_OUTPUT - main: runs-on: ubuntu-22.04 strategy: - matrix: ${{fromJson(needs.setup.outputs.matrix)}} + matrix: ${{ fromJson("$GITHUB_WORKSPACE/tools/ci/matrix.json") }} name: "${{ matrix.job-name }}" diff --git a/tools/ci/matrix.json b/tools/ci/matrix.json new file mode 100644 index 00000000000..3ddca93baf5 --- /dev/null +++ b/tools/ci/matrix.json @@ -0,0 +1,136 @@ +{ + "include": [ + { + "job-name": "Py3.10", + "python-version": "3.10", + "omp": "n", + "mpi": "n", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 omp", + "python-version": "3.10", + "omp": "y", + "mpi": "n", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 mpi", + "python-version": "3.10", + "omp": "n", + "mpi": "y", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 omp mpi", + "python-version": "3.10", + "omp": "y", + "mpi": "y", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.11", + "python-version": "3.11", + "omp": "n", + "mpi": "n", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.12", + "python-version": "3.12", + "omp": "n", + "mpi": "n", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 omp mpi dagmc", + "python-version": "3.10", + "omp": "y", + "mpi": "y", + "dagmc": "y", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 ncrystal", + "python-version": "3.10", + "omp": "n", + "mpi": "n", + "dagmc": "n", + "ncrystal": "y", + "libmesh": "n", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 omp mpi libmesh", + "python-version": "3.10", + "omp": "y", + "mpi": "y", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "y", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 omp libmesh", + "python-version": "3.10", + "omp": "y", + "mpi": "n", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "y", + "event": "n", + "vectfit": "n" + }, + { + "job-name": "Py3.10 omp event", + "python-version": "3.10", + "omp": "y", + "mpi": "n", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "y", + "vectfit": "n" + }, + { + "job-name": "Py3.10 mpi vectfit", + "python-version": "3.10", + "omp": "n", + "mpi": "y", + "dagmc": "n", + "ncrystal": "n", + "libmesh": "n", + "event": "n", + "vectfit": "y" + } + ] +} \ No newline at end of file From 1e7de1e8ebc9fc7643ca523acca2cd1b5a7d7ad0 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:45:31 -0500 Subject: [PATCH 21/43] Add in setup-job and try JSON input/output scheme --- .github/workflows/ci.yml | 18 +++++++++++++++++- tools/ci/matrix.json | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40096cfce21..d528633ee7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,26 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: + setup: + runs-on: ubuntu-22.04 + outputs: + matrix: ${{ steps.read-json.outputs.matrix }} + + steps: + - uses: actions/checkout@v4 + + - name: Read JSON + id: read-json + shell: bash + run: | + echo "matrix<> $GITHUB_OUTPUT + cat $GITHUB_WORKSPACE/tools/ci/matrix.json >> $GITHUB_OUTPUT + main: runs-on: ubuntu-22.04 + needs: setup strategy: - matrix: ${{ fromJson("$GITHUB_WORKSPACE/tools/ci/matrix.json") }} + matrix: "${{ fromJSON( needs.setup.outputs.matrix ) }}" name: "${{ matrix.job-name }}" diff --git a/tools/ci/matrix.json b/tools/ci/matrix.json index 3ddca93baf5..3383552bea9 100644 --- a/tools/ci/matrix.json +++ b/tools/ci/matrix.json @@ -133,4 +133,5 @@ "vectfit": "y" } ] -} \ No newline at end of file +} +EOF \ No newline at end of file From faa48835d5a83d9b15f451349388f7c6fcf22dbf Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:50:24 -0500 Subject: [PATCH 22/43] Clean up comments and prepare for PR --- .github/workflows/ci.yml | 20 +------------------- tools/ci/gha-caches.sh | 3 --- tools/ci/gha-install-dagmc.sh | 4 ++-- tools/ci/gha-install-libmesh.sh | 2 +- tools/ci/gha-install-mcpl.sh | 1 - tools/ci/gha-install.sh | 7 ------- 6 files changed, 4 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d528633ee7a..60af96efa65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,25 +156,7 @@ jobs: path: | ~/LIBMESH key: libmesh-mpi-${{matrix.mpi}}-${{ env.NC_HASH }} -<<<<<<< HEAD - - - name: Restore mcpl - uses: actions/cache@v4 - with: - path: ~/mcpl - key: mcpl-${{ env.MCPL_HASH }} -======= - -<<<<<<< HEAD - #- name: Restore mcpl - # uses: actions/cache@v4 - # with: - # path: ~/mcpl - # key: mcpl-${{ env.MCPL_HASH }} ->>>>>>> 322d1d221 (Cache vectfit and temporarily remove testing) - -======= ->>>>>>> f991cf9bb (Try renaming scheme for job matrix) + - name: install shell: bash run: | diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index 4ea8624c765..83ac2943922 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -29,6 +29,3 @@ if [[ $LIBMESH = 'y' ]]; then echo "NC_HASH=$(git ls-remote https://github.com/libmesh/libmesh \ --branch v1.7.1 | cut -f 1 | head -c 15)" >> $GITHUB_ENV fi - -echo "MCPL_HASH=$(git ls-remote https://github.com/mctools/mcpl.git |\ - cut -f 1 | head -c 15)" >> $GITHUB_ENV diff --git a/tools/ci/gha-install-dagmc.sh b/tools/ci/gha-install-dagmc.sh index fb41503854e..82759c9bcce 100755 --- a/tools/ci/gha-install-dagmc.sh +++ b/tools/ci/gha-install-dagmc.sh @@ -21,7 +21,7 @@ git clone -b $MOAB_BRANCH $MOAB_REPO mkdir build && cd build cmake ../moab -DENABLE_HDF5=ON -DENABLE_NETCDF=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$MOAB_INSTALL_DIR -DENABLE_BLASLAPACK=OFF make -j && make -j install -#rm -rf $HOME/MOAB/moab $HOME/MOAB/build +rm -rf $HOME/MOAB/moab $HOME/MOAB/build # DAGMC Install cd $HOME @@ -30,6 +30,6 @@ git clone -b $DAGMC_BRANCH $DAGMC_REPO mkdir build && cd build cmake ../dagmc -DBUILD_TALLY=ON -DCMAKE_INSTALL_PREFIX=$DAGMC_INSTALL_DIR -DBUILD_STATIC_LIBS=OFF -DMOAB_DIR=$MOAB_INSTALL_DIR make -j install -#rm -rf $HOME/DAGMC/dagmc $HOME/DAGMC/build +rm -rf $HOME/DAGMC/dagmc $HOME/DAGMC/build cd $CURRENT_DIR diff --git a/tools/ci/gha-install-libmesh.sh b/tools/ci/gha-install-libmesh.sh index 6771e69d5a6..dd1c1b37f96 100755 --- a/tools/ci/gha-install-libmesh.sh +++ b/tools/ci/gha-install-libmesh.sh @@ -18,6 +18,6 @@ else fi make -j4 install export LIBMESH_PC=$HOME/LIBMESH/lib/pkgconfig/ -#rm -rf $HOME/LIBMESH/build +rm -rf $HOME/LIBMESH/build popd diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 4af01d61c47..7915378aab5 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -3,7 +3,6 @@ set -ex # MCPL variables MCPL_REPO='https://github.com/mctools/mcpl' -MCPL_INSTALL_DIR=$HOME/mcpl cd $HOME git clone $MCPL_REPO diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 4cf8e2e8d05..081d68bd653 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -9,9 +9,6 @@ pip install --upgrade numpy # Install NJOY 2016 if [[ ! -d "$HOME/NJOY2016" ]]; then ./tools/ci/gha-install-njoy.sh -else - #cd $HOME/NJOY2016/build && sudo make install - cd $GITHUB_WORKSPACE fi echo "$HOME/NJOY2016/build" >> $GITHUB_PATH @@ -20,10 +17,6 @@ if [[ $DAGMC = 'y' ]]; then if [ ! -d "$HOME/DAGMC" ] || [ ! -d "$HOME/MOAB" ] then ./tools/ci/gha-install-dagmc.sh - else - #cd $HOME/DAGMC/build && make -j install - #cd $HOME/MOAB/build && make -j install - cd $GITHUB_WORKSPACE fi fi From f43fed5b09ef7c22660afe3b0335a271c61fdf08 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:24:42 -0500 Subject: [PATCH 23/43] Minor tweaks and clean up trash --- tools/ci/gha-install.sh | 14 ++------------ tools/ci/matrix.json | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 081d68bd653..960f15c655c 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -42,9 +42,9 @@ fi # Install libMesh if needed if [[ $LIBMESH = 'y' ]]; then - if [ ! -d "$HOME/vectfit" ] + if [ ! -d "$HOME/libmesh" ] then - ./tools/ci/gha-install-vectfit.sh + ./tools/ci/gha-install-libmesh.sh else pip install $HOME/pybind11 pip install wheel @@ -74,14 +74,4 @@ fi python tools/ci/gha-install.py # Install Python API in editable mode -<<<<<<< HEAD pip install -e .[test,vtk,ci] -======= -pip install -e .[test,vtk] - -# For coverage testing of the C++ source files -pip install cpp-coveralls - -# For coverage testing of the Python source files -pip install coveralls ->>>>>>> 9198dde0e (Fix gha-install issue) diff --git a/tools/ci/matrix.json b/tools/ci/matrix.json index 3383552bea9..72d236fbd7e 100644 --- a/tools/ci/matrix.json +++ b/tools/ci/matrix.json @@ -1,7 +1,7 @@ { "include": [ { - "job-name": "Py3.10", + "job-name": "Python 3.10", "python-version": "3.10", "omp": "n", "mpi": "n", @@ -12,7 +12,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 omp", + "job-name": "Python 3.10 [omp]", "python-version": "3.10", "omp": "y", "mpi": "n", @@ -23,7 +23,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 mpi", + "job-name": "Python 3.10 [mpi]", "python-version": "3.10", "omp": "n", "mpi": "y", @@ -34,7 +34,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 omp mpi", + "job-name": "Python 3.10 [omp,mpi]", "python-version": "3.10", "omp": "y", "mpi": "y", @@ -45,7 +45,7 @@ "vectfit": "n" }, { - "job-name": "Py3.11", + "job-name": "Python 3.11", "python-version": "3.11", "omp": "n", "mpi": "n", @@ -56,7 +56,7 @@ "vectfit": "n" }, { - "job-name": "Py3.12", + "job-name": "Python 3.12", "python-version": "3.12", "omp": "n", "mpi": "n", @@ -67,7 +67,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 omp mpi dagmc", + "job-name": "Python 3.10 [omp,mpi,dagmc]", "python-version": "3.10", "omp": "y", "mpi": "y", @@ -78,7 +78,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 ncrystal", + "job-name": "Python 3.10 [ncrystal]", "python-version": "3.10", "omp": "n", "mpi": "n", @@ -89,7 +89,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 omp mpi libmesh", + "job-name": "Python 3.10 [omp,mpi,libmesh]", "python-version": "3.10", "omp": "y", "mpi": "y", @@ -100,7 +100,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 omp libmesh", + "job-name": "Python 3.10 [omp,libmesh]", "python-version": "3.10", "omp": "y", "mpi": "n", @@ -111,7 +111,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 omp event", + "job-name": "Python 3.10 [omp,event]", "python-version": "3.10", "omp": "y", "mpi": "n", @@ -122,7 +122,7 @@ "vectfit": "n" }, { - "job-name": "Py3.10 mpi vectfit", + "job-name": "Python 3.10 [mpi,vectfit]", "python-version": "3.10", "omp": "n", "mpi": "y", From a5b5a75029dbfae6a0168f310e964e1ca9783244 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:11:16 -0500 Subject: [PATCH 24/43] Remove mcpl build dir flag --- tools/ci/gha-install-mcpl.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ci/gha-install-mcpl.sh b/tools/ci/gha-install-mcpl.sh index 7915378aab5..3713d40e065 100755 --- a/tools/ci/gha-install-mcpl.sh +++ b/tools/ci/gha-install-mcpl.sh @@ -8,5 +8,4 @@ cd $HOME git clone $MCPL_REPO cd mcpl mkdir build && cd build -cmake .. -DCMAKE_INSTALL_PREFIX=$MCPL_INSTALL_DIR && -make 2>/dev/null && sudo make install \ No newline at end of file +cmake .. && make 2>/dev/null && sudo make install \ No newline at end of file From 2264f3eeae51fa37979e12fc93fe78609ea17c16 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:54:10 -0500 Subject: [PATCH 25/43] Remove nonfunctional mcpl_cmake_path and -DMCPL_DIR cmake flags --- tools/ci/gha-install.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/ci/gha-install.py b/tools/ci/gha-install.py index 7d49f46616b..f046e863470 100644 --- a/tools/ci/gha-install.py +++ b/tools/ci/gha-install.py @@ -11,8 +11,6 @@ def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False, ncrys # Build in debug mode by default with support for MCPL cmake_cmd = ['cmake', '-DCMAKE_BUILD_TYPE=Debug', '-DOPENMC_USE_MCPL=on'] - mcpl_cmake_path = os.environ.get('HOME') + '/mcpl/lib/cmake/MCPL' - cmake_cmd.append(f'-DMCPL_DIR={mcpl_cmake_path}') # Turn off OpenMP if specified if not omp: From cd4d97747067d7eda9ed210b4a2a06a20e86d372 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:11:55 -0500 Subject: [PATCH 26/43] Fix libmesh/vectfit install commands in gha-install.sh --- tools/ci/gha-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 960f15c655c..45ac2a2015a 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -37,6 +37,10 @@ if [[ $VECTFIT = 'y' ]]; then if [ ! -d "$HOME/vectfit" ] then ./tools/ci/gha-install-vectfit.sh + else + pip install $HOME/pybind11 + pip install wheel + pip install --no-build-isolation ./vectfit fi fi @@ -45,10 +49,6 @@ if [[ $LIBMESH = 'y' ]]; then if [ ! -d "$HOME/libmesh" ] then ./tools/ci/gha-install-libmesh.sh - else - pip install $HOME/pybind11 - pip install wheel - pip install --no-build-isolation ./vectfit fi fi From 36d0dedd07a898bd71fe2f9b1f810176cf017528 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:20:25 -0500 Subject: [PATCH 27/43] Improve gha-caches.sh hash commands --- tools/ci/gha-caches.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/ci/gha-caches.sh b/tools/ci/gha-caches.sh index 83ac2943922..71edbc3fbbb 100755 --- a/tools/ci/gha-caches.sh +++ b/tools/ci/gha-caches.sh @@ -1,31 +1,31 @@ #!/bin/bash set -ex -echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git | cut -f 1 |\ +echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git HEAD |\ head -c 15)" >> $GITHUB_ENV if [[ $DAGMC = 'y' ]]; then echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git \ - --branch Version5.1.0 | cut -f 1 | head -c 15)" >> $GITHUB_ENV + --branch Version5.1.0 HEAD | head -c 15)" >> $GITHUB_ENV - echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git |\ - cut -f 1 | head -c 15)" >> $GITHUB_ENV + echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git HEAD |\ + head -c 15)" >> $GITHUB_ENV fi if [[ $NCRYSTAL = 'y' ]]; then echo "NC_HASH=$(git ls-remote https://github.com/mctools/ncrystal \ - --branch develop | cut -f 1 | head -c 15)" >> $GITHUB_ENV + --branch develop HEAD | head -c 15)" >> $GITHUB_ENV fi if [[ $VECTFIT = 'y' ]]; then echo "PYBIND_HASH=$(git ls-remote https://github.com/pybind/pybind11 \ - --branch master | cut -f 1 | head -c 15)" >> $GITHUB_ENV + --branch master HEAD | head -c 15)" >> $GITHUB_ENV - echo "VF_HASH=$(git ls-remote https://github.com/liangjg/vectfit.git |\ - cut -f 1 | head -c 15)" >> $GITHUB_ENV + echo "VF_HASH=$(git ls-remote https://github.com/liangjg/vectfit.git HEAD |\ + head -c 15)" >> $GITHUB_ENV fi if [[ $LIBMESH = 'y' ]]; then echo "NC_HASH=$(git ls-remote https://github.com/libmesh/libmesh \ - --branch v1.7.1 | cut -f 1 | head -c 15)" >> $GITHUB_ENV + --branch v1.7.1 HEAD | head -c 15)" >> $GITHUB_ENV fi From f1076433c59b769c12442fda3b688021a1c3fac6 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:27:21 -0500 Subject: [PATCH 28/43] Clarify GHA 'setup' step name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60af96efa65..cb5dda90906 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Read JSON + - name: Send JSON matrix contents to job output id: read-json shell: bash run: | From 048feeb9e1eed9d5ddf4afcd54a973a35e7e05be Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:58:39 -0500 Subject: [PATCH 29/43] Remove build dirs after NJOY and vectfit installs --- tools/ci/gha-install-njoy.sh | 3 ++- tools/ci/gha-install-vectfit.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 01a19da249d..5ab20db25b0 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -10,4 +10,5 @@ git clone $NJOY_REPO cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && -make 2>/dev/null && sudo make install \ No newline at end of file +make 2>/dev/null && sudo make install +rm -rf $HOME/NJOY2016/build \ No newline at end of file diff --git a/tools/ci/gha-install-vectfit.sh b/tools/ci/gha-install-vectfit.sh index bd38e1ea8cd..c4a3ffc97ad 100755 --- a/tools/ci/gha-install-vectfit.sh +++ b/tools/ci/gha-install-vectfit.sh @@ -20,22 +20,27 @@ cd $HOME git clone -b $PYBIND_BRANCH $PYBIND_REPO cd pybind11 && mkdir build && cd build && cmake .. && sudo make install pip install $HOME/pybind11 +rm -rf build cd $HOME git clone -b $XTL_BRANCH $XTL_REPO cd xtl && mkdir build && cd build && cmake .. && sudo make install +rm -rf build cd $HOME git clone -b $XTENSOR_BRANCH $XTENSOR_REPO cd xtensor && mkdir build && cd build && cmake .. && sudo make install +rm -rf build cd $HOME git clone -b $XTENSOR_PYTHON_BRANCH $XTENSOR_PYTHON_REPO cd xtensor-python && mkdir build && cd build && cmake .. && sudo make install +rm -rf build cd $HOME git clone -b $XTENSOR_BLAS_BRANCH $XTENSOR_BLAS_REPO cd xtensor-blas && mkdir build && cd build && cmake .. && sudo make install +rm -rf build # Install wheel (remove when vectfit supports installation with build isolation) pip install wheel From 652c57c532f9db76ab90063c7e67d0be8657f46a Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:19:07 -0500 Subject: [PATCH 30/43] Try removing NJOY2016 tests dir after install --- tools/ci/gha-install-njoy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 5ab20db25b0..586e1025f37 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -11,4 +11,4 @@ cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install -rm -rf $HOME/NJOY2016/build \ No newline at end of file +rm -rf $HOME/NJOY2016/build $HOME/NJOY2016/tests \ No newline at end of file From 6e9b9416be6edf20fe49c5825227b6ef6ad17399 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:34:42 -0500 Subject: [PATCH 31/43] Fix vectfit in gha-install.sh --- tools/ci/gha-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 45ac2a2015a..2b03cda8fa0 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -38,9 +38,11 @@ if [[ $VECTFIT = 'y' ]]; then then ./tools/ci/gha-install-vectfit.sh else + cd $HOME pip install $HOME/pybind11 pip install wheel pip install --no-build-isolation ./vectfit + cd $GITHUB_WORKSPACE fi fi From a35fa53590413b0caf8f1472f63f5dd174c6a256 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:55:49 -0500 Subject: [PATCH 32/43] Re-add NJOY2016 tests dir --- tools/ci/gha-install-njoy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 586e1025f37..5ab20db25b0 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -11,4 +11,4 @@ cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install -rm -rf $HOME/NJOY2016/build $HOME/NJOY2016/tests \ No newline at end of file +rm -rf $HOME/NJOY2016/build \ No newline at end of file From dd7896694fab0c5f5c7c7882c775c94ca3dfbcac Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:22:33 -0500 Subject: [PATCH 33/43] Revert vectfit changes in gha-install.sh --- tools/ci/gha-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 2b03cda8fa0..5e94b162c1a 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -37,12 +37,6 @@ if [[ $VECTFIT = 'y' ]]; then if [ ! -d "$HOME/vectfit" ] then ./tools/ci/gha-install-vectfit.sh - else - cd $HOME - pip install $HOME/pybind11 - pip install wheel - pip install --no-build-isolation ./vectfit - cd $GITHUB_WORKSPACE fi fi From b6391690867cd58c3bde03b12edac30db753a875 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:03:53 -0500 Subject: [PATCH 34/43] Revert all changes to NJOY and vectfit caches to fix install issues --- tools/ci/gha-install-njoy.sh | 3 +-- tools/ci/gha-install-vectfit.sh | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 5ab20db25b0..01a19da249d 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -10,5 +10,4 @@ git clone $NJOY_REPO cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && -make 2>/dev/null && sudo make install -rm -rf $HOME/NJOY2016/build \ No newline at end of file +make 2>/dev/null && sudo make install \ No newline at end of file diff --git a/tools/ci/gha-install-vectfit.sh b/tools/ci/gha-install-vectfit.sh index c4a3ffc97ad..2ead59fc229 100755 --- a/tools/ci/gha-install-vectfit.sh +++ b/tools/ci/gha-install-vectfit.sh @@ -20,27 +20,22 @@ cd $HOME git clone -b $PYBIND_BRANCH $PYBIND_REPO cd pybind11 && mkdir build && cd build && cmake .. && sudo make install pip install $HOME/pybind11 -rm -rf build cd $HOME git clone -b $XTL_BRANCH $XTL_REPO cd xtl && mkdir build && cd build && cmake .. && sudo make install -rm -rf build cd $HOME git clone -b $XTENSOR_BRANCH $XTENSOR_REPO cd xtensor && mkdir build && cd build && cmake .. && sudo make install -rm -rf build cd $HOME git clone -b $XTENSOR_PYTHON_BRANCH $XTENSOR_PYTHON_REPO cd xtensor-python && mkdir build && cd build && cmake .. && sudo make install -rm -rf build cd $HOME git clone -b $XTENSOR_BLAS_BRANCH $XTENSOR_BLAS_REPO cd xtensor-blas && mkdir build && cd build && cmake .. && sudo make install -rm -rf build # Install wheel (remove when vectfit supports installation with build isolation) pip install wheel @@ -48,4 +43,4 @@ pip install wheel # Install vectfit cd $HOME git clone https://github.com/liangjg/vectfit.git -pip install --no-build-isolation ./vectfit +pip install --no-build-isolation ./vectfit \ No newline at end of file From 1897a46b2da82b134d9d55923b2f9ae3ac5d30ff Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:33:29 -0500 Subject: [PATCH 35/43] Re-try removal of njoy-specific testing suite --- tools/ci/gha-install-njoy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 01a19da249d..21db928b07b 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -10,4 +10,5 @@ git clone $NJOY_REPO cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && -make 2>/dev/null && sudo make install \ No newline at end of file +make 2>/dev/null && sudo make install +rm -rf $HOME/NJOY2016/tests \ No newline at end of file From 6a1d1c04473002ae7d1a9d18d518384068aa856b Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:32:26 -0500 Subject: [PATCH 36/43] Remove njoy build directory after successful build to trim cache --- tools/ci/gha-install-njoy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 21db928b07b..eeec8138759 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -11,4 +11,4 @@ cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install -rm -rf $HOME/NJOY2016/tests \ No newline at end of file +rm -rf $HOME/NJOY2016/tests $HOME/NJOY2016/build \ No newline at end of file From 6ef06d3b861dd51e86225d2c862911d797f24074 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Fri, 16 Aug 2024 13:08:50 -0500 Subject: [PATCH 37/43] Retain NJOY build directory for cache --- tools/ci/gha-install-njoy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index eeec8138759..21db928b07b 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -11,4 +11,4 @@ cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install -rm -rf $HOME/NJOY2016/tests $HOME/NJOY2016/build \ No newline at end of file +rm -rf $HOME/NJOY2016/tests \ No newline at end of file From d7714cee5bb928b6c05dee35d58f99a8d1d780a6 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:52:46 -0500 Subject: [PATCH 38/43] Properly add NJOY dir to path and remove build dir --- tools/ci/gha-install-njoy.sh | 3 ++- tools/ci/gha-install.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/ci/gha-install-njoy.sh b/tools/ci/gha-install-njoy.sh index 21db928b07b..9f2775add77 100755 --- a/tools/ci/gha-install-njoy.sh +++ b/tools/ci/gha-install-njoy.sh @@ -11,4 +11,5 @@ cd NJOY2016 mkdir build && cd build cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && make 2>/dev/null && sudo make install -rm -rf $HOME/NJOY2016/tests \ No newline at end of file +rm -rf $HOME/NJOY2016/tests +rm -rf $HOME/NJOY2016/build \ No newline at end of file diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 5e94b162c1a..4ac67d6ece9 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -10,7 +10,7 @@ pip install --upgrade numpy if [[ ! -d "$HOME/NJOY2016" ]]; then ./tools/ci/gha-install-njoy.sh fi -echo "$HOME/NJOY2016/build" >> $GITHUB_PATH +echo "$HOME/NJOY2016" >> $GITHUB_PATH # Install DAGMC if needed if [[ $DAGMC = 'y' ]]; then From 53e9353faac8ddf6d68e9880dc9620acabea7063 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:06:13 -0500 Subject: [PATCH 39/43] Remove Python-version-dependency caches --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb5dda90906..c65bdca413b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,15 +68,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Restore Python cache - uses: actions/cache@v4 - with: - path: ${{ env.pythonLocation }} - key: py-${{ matrix.python-version }}-(omp=${{ matrix.omp }} - mpi=${{ matrix.mpi }} dagmc=${{ matrix.dagmc }} ncrystal=${{ matrix.ncrystal }} - libmesh=${{ matrix.libmesh }} event=${{ matrix.event }} - vectfit=${{ matrix.vectfit }}) - - name: Environment Variables run: | echo "DAGMC_ROOT=$HOME/DAGMC" From f7f32bf18da1b88f7fb06160181ef944b961d01b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 27 Aug 2024 17:05:01 -0500 Subject: [PATCH 40/43] NJOY2016/bin should be on PATH --- tools/ci/gha-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 4ac67d6ece9..132c66bd95b 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -10,7 +10,7 @@ pip install --upgrade numpy if [[ ! -d "$HOME/NJOY2016" ]]; then ./tools/ci/gha-install-njoy.sh fi -echo "$HOME/NJOY2016" >> $GITHUB_PATH +echo "$HOME/NJOY2016/bin" >> $GITHUB_PATH # Install DAGMC if needed if [[ $DAGMC = 'y' ]]; then @@ -33,7 +33,7 @@ if [[ $NCRYSTAL = 'y' ]]; then fi # Install vectfit for WMP generation if needed -if [[ $VECTFIT = 'y' ]]; then +if [[ $VECTFIT = 'y' ]]; then if [ ! -d "$HOME/vectfit" ] then ./tools/ci/gha-install-vectfit.sh From fceb651f255bb6afcdf04a6c08101f9a60836788 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Thu, 2 Jan 2025 21:11:59 -0600 Subject: [PATCH 41/43] Trim NJOY cache --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c65bdca413b..74291ce86da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,11 @@ jobs: - name: Restore NJOY2016 uses: actions/cache@v4 with: - path: ~/NJOY2016 + path: | + ~/NJOY2016/metaconfigure + ~/NJOY2016/src + ~/NJOY2016/build/njoy + ~/NJOY2016/build/libnjoy.so key: NJOY2016-${{ env.NJOY_HASH }} - name: Restore DAGMC From dac7cb0cda82340976e23195b9cd49cc821f5aca Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Thu, 2 Jan 2025 21:12:53 -0600 Subject: [PATCH 42/43] Enforce 180 minutes for total CI suite --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74291ce86da..7ca4efe31d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: main: runs-on: ubuntu-22.04 + timeout-minutes: 180 needs: setup strategy: matrix: "${{ fromJSON( needs.setup.outputs.matrix ) }}" From b4ec8641708fa81e9a7047ef2953795328681a42 Mon Sep 17 00:00:00 2001 From: John Vincent Cauilan <64677361+johvincau@users.noreply.github.com> Date: Mon, 13 Jan 2025 20:06:57 -0600 Subject: [PATCH 43/43] Update matrix.json to have base Python version 3.11 --- tools/ci/matrix.json | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tools/ci/matrix.json b/tools/ci/matrix.json index 72d236fbd7e..3e50ecf2eee 100644 --- a/tools/ci/matrix.json +++ b/tools/ci/matrix.json @@ -1,8 +1,8 @@ { "include": [ { - "job-name": "Python 3.10", - "python-version": "3.10", + "job-name": "Python 3.11", + "python-version": "3.11", "omp": "n", "mpi": "n", "dagmc": "n", @@ -12,8 +12,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [omp]", - "python-version": "3.10", + "job-name": "Python 3.11 [omp]", + "python-version": "3.11", "omp": "y", "mpi": "n", "dagmc": "n", @@ -23,8 +23,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [mpi]", - "python-version": "3.10", + "job-name": "Python 3.11 [mpi]", + "python-version": "3.11", "omp": "n", "mpi": "y", "dagmc": "n", @@ -34,8 +34,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [omp,mpi]", - "python-version": "3.10", + "job-name": "Python 3.11 [omp,mpi]", + "python-version": "3.11", "omp": "y", "mpi": "y", "dagmc": "n", @@ -45,8 +45,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.11", - "python-version": "3.11", + "job-name": "Python 3.12", + "python-version": "3.12", "omp": "n", "mpi": "n", "dagmc": "n", @@ -56,8 +56,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.12", - "python-version": "3.12", + "job-name": "Python 3.13", + "python-version": "3.13", "omp": "n", "mpi": "n", "dagmc": "n", @@ -67,8 +67,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [omp,mpi,dagmc]", - "python-version": "3.10", + "job-name": "Python 3.11 [omp,mpi,dagmc]", + "python-version": "3.11", "omp": "y", "mpi": "y", "dagmc": "y", @@ -78,8 +78,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [ncrystal]", - "python-version": "3.10", + "job-name": "Python 3.11 [ncrystal]", + "python-version": "3.11", "omp": "n", "mpi": "n", "dagmc": "n", @@ -89,8 +89,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [omp,mpi,libmesh]", - "python-version": "3.10", + "job-name": "Python 3.11 [omp,mpi,libmesh]", + "python-version": "3.11", "omp": "y", "mpi": "y", "dagmc": "n", @@ -100,8 +100,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [omp,libmesh]", - "python-version": "3.10", + "job-name": "Python 3.11 [omp,libmesh]", + "python-version": "3.11", "omp": "y", "mpi": "n", "dagmc": "n", @@ -111,8 +111,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [omp,event]", - "python-version": "3.10", + "job-name": "Python 3.11 [omp,event]", + "python-version": "3.11", "omp": "y", "mpi": "n", "dagmc": "n", @@ -122,8 +122,8 @@ "vectfit": "n" }, { - "job-name": "Python 3.10 [mpi,vectfit]", - "python-version": "3.10", + "job-name": "Python 3.11 [mpi,vectfit]", + "python-version": "3.11", "omp": "n", "mpi": "y", "dagmc": "n",