Improvements: Add GRDzhadzha as dependency #109
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GCC Tests | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
gcc-version: [9, 10, 11, 12] | |
mpi: ['FALSE', 'TRUE'] | |
opt: ['FALSE', 'TRUE'] | |
include: | |
- debug: 'TRUE' | |
opt: 'FALSE' | |
- debug: 'FALSE' | |
opt: 'TRUE' | |
name: GCC ${{ matrix.gcc-version }}, MPI = ${{ matrix.mpi }}, OPT = ${{ matrix.opt }} | |
env: | |
CHOMBO_HOME: ${{ github.workspace }}/Chombo/lib | |
GRCHOMBO_SOURCE: ${{ github.workspace }}/GRChombo/Source | |
GRDZHADZHA_SOURCE: ${{ github.workspace }}/GRDzhadzha/Source | |
OMP_NUM_THREADS: 1 | |
BUILD_ARGS: MPI=${{ matrix.mpi}} OPT=${{ matrix.opt }} DEBUG=${{ matrix.debug }} | |
steps: | |
- name: Checkout Chombo from GRTLCollaboration | |
uses: actions/checkout@master | |
with: | |
repository: GRTLCollaboration/Chombo | |
token: ${{ secrets.CI_SECRET || github.token }} | |
path: Chombo | |
- name: Checkout GRChombo from GRTLCollaboration | |
uses: actions/checkout@master | |
with: | |
repository: GRTLCollaboration/GRChombo | |
token: ${{ secrets.CI_SECRET || github.token }} | |
path: GRChombo | |
- name: Checkout GRDzhadzha from GRTLCollaboration | |
uses: actions/checkout@master | |
with: | |
repository: GRTLCollaboration/GRDzhadzha | |
token: ${{ secrets.CI_SECRET || github.token }} | |
path: GRDzhadzha | |
- name: Checkout GRBoondi | |
uses: actions/checkout@master | |
with: | |
repository: ShaunFell/GRBoondi | |
token: ${{ secrets.CI_SECRET || github.token }} | |
path: GRBoondi | |
- name: Update package manager database | |
id: update-database | |
continue-on-error: true | |
run: sudo apt-get update | |
# This is quite slow so only do this if the previous command fails | |
- name: Update package repository mirrors if necessary | |
if: steps.update-database.outcome == 'failure' | |
run: | | |
sudo gem install apt-spy2 | |
sudo apt-spy2 fix --commit --launchpad --country=US | |
sudo apt-get update | |
- name: Install common dependencies | |
run: sudo apt-get -y --no-install-recommends install csh libhdf5-dev libblas-dev liblapack-dev libgetopt-complete-perl | |
- name: Install MPI dependencies | |
if: matrix.mpi == 'TRUE' | |
run: sudo apt-get -y --no-install-recommends install libhdf5-openmpi-dev petsc-dev openmpi-bin | |
- name: Set Compilers | |
run: | | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc-version }} 200 | |
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc-version }} 200 | |
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-${{ matrix.gcc-version }} 200 | |
# MUST reload intel environment variables to load in mpiicpc after 'Install Intel MPI' | |
- name: Build Chombo | |
run: | | |
cp $GITHUB_WORKSPACE/GRBoondi/InstallNotes/MakeDefsExamples/Make.defs.local.GNU $CHOMBO_HOME/mk/Make.defs.local | |
make -j 4 AMRTimeDependent AMRTools BaseTools BoxTools $BUILD_ARGS | |
working-directory: ${{ env.CHOMBO_HOME }} | |
- name: Build GRChombo Tests | |
run: | | |
rm -rf Tests/ApparentHorizonFinderTest2D | |
make test -j 4 $BUILD_ARGS | |
working-directory: ${{ github.workspace }}/GRChombo | |
- name: Run GRChombo Tests | |
run: | | |
make test run -j 2 $BUILD_ARGS | |
working-directory: ${{ github.workspace }}/GRChombo | |
- name: Build GRBoondi Tests | |
run: | | |
make test -j 4 $BUILD_ARGS | |
working-directory: ${{ github.workspace }}/GRBoondi | |
- name: Build GRBoondi Examples | |
run: | | |
make examples -j 4 $BUILD_ARGS | |
working-directory: ${{ github.workspace }}/GRBoondi | |
- name: Run GRBoondi Tests | |
run: | | |
export OMP_NUM_THREADS=4 | |
make run -j 1 $BUILD_ARGS TestDirs='Tests/SimpleDataReader_test/' | |
working-directory: ${{ github.workspace }}/GRBoondi | |