test: add POT3D as third party test repository #1
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 14.0 | |
jobs: | |
Compile_POT3D_with_GFortran: | |
name: "Build POT3D and validate" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["macos-latest", "ubuntu-20.04"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Micromamba | |
uses: mamba-org/setup-micromamba@v2.0.2 | |
with: | |
micromamba-version: '2.0.4-0' | |
environment-file: ci/environment_gfortran.yml | |
- name: Verify Environment | |
shell: bash -e -x -l {0} | |
run: | | |
echo "Active Environment: $MAMBA_DEFAULT_ENV" | |
which gfortran || { echo "gfortran not found"; exit 1; } | |
which mpif90 || { echo "mpif90 not found"; exit 1; } | |
# build and validation with GFortran's optimization | |
- name: POT3D Build and validation with GFortran with optimization (MPI only) | |
shell: bash -e -x -l {0} | |
run: | | |
cp src/mpi.f90 tests/pot3d/src/ | |
cp src/mpi_c_bindings.f90 tests/pot3d/src/ | |
cp src/mpi_wrapper.c tests/pot3d/src/ | |
cd tests/pot3d | |
FC="gfortran -O3" ./build_and_run_gfortran.sh | |
# build and validation without GFortran's optimization | |
- name: POT3D Build and validation with GFortran without optimization (MPI only) | |
shell: bash -e -x -l {0} | |
run: | | |
cp src/mpi.f90 tests/pot3d/src/ | |
cp src/mpi_c_bindings.f90 tests/pot3d/src/ | |
cp src/mpi_wrapper.c tests/pot3d/src/ | |
cd tests/pot3d | |
FC="gfortran" ./build_and_run_gfortran.sh |