diff --git a/.github/workflows/mac_build_test.yml b/.github/workflows/mac_build_test.yml new file mode 100644 index 0000000000..615ac57085 --- /dev/null +++ b/.github/workflows/mac_build_test.yml @@ -0,0 +1,76 @@ +name: Mac Build/Test + +on: + # allows us to run workflows manually + workflow_dispatch: + pull_request: + branches: + - develop + - master + push: + branches: + - develop + - master + release: + types: # This configuration does not affect the page_build event above + - created +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + BuildTest: + runs-on: macos-10.15 + + steps: + - uses: actions/checkout@v2 + + - name: Initial setup + shell: bash -l {0} + run: | + brew install eigen gcc@6 hdf5 + + - name: Environment Variables + shell: bash -l {0} + run: | + echo "HOME=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV + + + - name: Build MOAB + shell: bash -l {0} + run: | + cd ${HOME} + mkdir -pv moab/bld + cd moab + git clone https://bitbucket.org/fathomteam/moab -b 5.3.0 --depth 1 --shallow-submodules + cd bld + cmake ../moab -DENABLE_HDF5=ON \ + -DENABLE_PYMOAB=OFF \ + -DHDF5_ROOT=$HDF5_PATH \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_BLASLAPACK=OFF \ + -DENABLE_FORTRAN=OFF \ + -DCMAKE_INSTALL_PREFIX=${HOME}/moab + make + make install + rm -rf ${HOME}/moab/moab ${HOME}/moab/bld + + - name: Build DAGMC + shell: bash -l {0} + run: | + mkdir -p $GITHUB_WORKSPACE/bld + cd $GITHUB_WORKSPACE/bld + cmake ../ -DMOAB_DIR=${HOME}/moab \ + -DBUILD_CI_TESTS=ON \ + -DBUILD_STATIC_EXE=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_INSTALL_PREFIX=${HOME}/dagmc + make + make install + + - name: Testing DAGMC + shell: bash -l {0} + run: | + cd $GITHUB_WORKSPACE/bld + PATH=$GITHUB_WORKSPACE/bld/bin:$PATH make test + diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 8cd17fca97..818b499834 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -16,6 +16,7 @@ Next version * Enforcing usage of Python3 for PyNE amalgamation. (#773) * Adding workflow_dispatch option to docker_publish workflow (#776) * DagMC methods for creation and removal of the graveyard volume (#714) + * CI build and test now support MacOS (shared build, no pymoab, no Double Down) (#780) **Changed:** diff --git a/src/dagmc/DagMC.cpp b/src/dagmc/DagMC.cpp index c72eb7e859..94b39158e9 100644 --- a/src/dagmc/DagMC.cpp +++ b/src/dagmc/DagMC.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include