Skip to content

Commit

Permalink
Merge pull request #880 from gonuke/update_build_test
Browse files Browse the repository at this point in the history
Streamline and simplify CI building
  • Loading branch information
shimwell authored Aug 15, 2023
2 parents e9da6ab + cac65e6 commit 73ed77b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux Build/Test
name: Linux Build/Test for PR and collaborator push

on:
# allows us to run workflows manually
Expand Down Expand Up @@ -27,15 +27,12 @@ on:
jobs:
BuildTest:
runs-on: ubuntu-latest
env:
hdf5_versions: ${{ matrix.hdf5_versions }}
hdf5_build_dir: hdf5_build_dir

strategy:
matrix:
ubuntu_versions : [
18.04,
20.04,
22.04,
]
compiler : [
gcc,
Expand All @@ -49,32 +46,37 @@ jobs:
]

container:
image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable
image: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/moab:latest

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
git config --global --add safe.directory /__w/DAGMC/DAGMC
CI/scripts/install.sh
ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC
mkdir -p ./build
cd ./build
git config --global --add safe.directory $GITHUB_WORKSPACE
cmake ../ -DMOAB_DIR=${moab_install_dir} \
-DBUILD_GEANT4=ON \
-DGEANT4_DIR=${geant4_install_dir} \
-DBUILD_CI_TESTS=ON \
-DBUILD_MW_REG_TESTS=OFF \
-DBUILD_STATIC_EXE=OFF \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_Fortran_COMPILER=gfortran \
-DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \
-DDOUBLE_DOWN=${double_down} \
-Ddd_ROOT=${double_down_install_dir} && \
make -j2 && \
make install
- name: Testing DAGMC
run: |
cd $GITHUB_WORKSPACE
CI/scripts/tests.sh
cd $GITHUB_WORKSPACE/build
PATH=${install_dir}/dagmc/bin:${PATH} CTEST_OUTPUT_ON_FAILURE=1 make test
3 changes: 2 additions & 1 deletion doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ 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)
* Introduced logger to better manage console output (#876)
* Streamline CI to take advantage of better docker image management (#880)

**Fixed:**
* Patch to compile with Geant4 10.6 (#803)
Expand Down

0 comments on commit 73ed77b

Please sign in to comment.