Update to match GEOSgcm main as of 2024-Aug-20 #52
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: Build Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# Do not run if the only files changed cannot affect the build | |
paths-ignore: | |
- "**.md" | |
- "**.json" | |
- "ChangeLog-PreJason.txt" | |
- "parallel_build.csh" | |
- ".github/CODEOWNERS" | |
- ".codebuild/**" | |
- ".circleci/**" | |
jobs: | |
build_ctm: | |
name: Build GEOSctm | |
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')" | |
runs-on: ubuntu-latest | |
container: | |
image: gmao/ubuntu20-geos-env:v7.25.0-intelmpi_2021.13-intel_2024.2 | |
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 | |
# It seems like we might not need secrets on GitHub Actions which is good for forked | |
# pull requests | |
#credentials: | |
#username: ${{ secrets.DOCKERHUB_USERNAME }} | |
#password: ${{ secrets.DOCKERHUB_TOKEN }} | |
env: | |
OMPI_ALLOW_RUN_AS_ROOT: 1 | |
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | |
OMPI_MCA_btl_vader_single_copy_mechanism: none | |
steps: | |
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout CTM | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set all directories as git safe | |
run: | | |
git config --global --add safe.directory '*' | |
- name: Versions etc. | |
run: | | |
ifort --version | |
mpirun --version | |
echo $BASEDIR | |
- name: Mepo clone external repos | |
run: | | |
mepo clone | |
mepo status | |
- name: Update other branches | |
if: | |
"!contains('refs/heads/main,refs/heads/develop', github.ref)" | |
run: | | |
mepo checkout-if-exists ${GITHUB_HEAD_REF} | |
mepo status | |
- name: CMake | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF | |
- name: Build | |
run: | | |
cd build | |
make -j4 install |