Skip to content

Commit

Permalink
testing tweaks (#57)
Browse files Browse the repository at this point in the history
* testing: cleaned up run_all_testcases.py; improved skip rule for github actions

* skip submodules if extern directory is not present

* changed ifx flag

* try newer ifx to work around spurious contiguous error with -check all

* workaround for ifx bug
  • Loading branch information
jornbr authored Mar 27, 2024
1 parent 5cf7d91 commit cdae2ca
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 141 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/fabm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
jobs:
gfortran:
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
strategy:
matrix:
version: [9, 10, 11, 12, 13]
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Run all test cases with pyfabm
run: python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
ifort:
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
strategy:
matrix:
include:
Expand Down Expand Up @@ -88,16 +88,20 @@ jobs:
env:
FFLAGS: ${{ env.FFLAGS }} -fp-model precise -fp-model source
ifx:
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
strategy:
matrix:
include:
- version: "2023.2.0.49254"
url_dir: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/237236c4-434b-4576-96ac-020ceeb22619"
#- version: "2024.0.2.28"
# url_dir: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/41df6814-ec4b-4698-a14d-421ee2b02aa7"
fail-fast: false
runs-on: ubuntu-latest
env:
FFLAGS: -check=all
FFLAGS: -check all,nouninit,nocontiguous
# nouninit because https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-missing-clang-rt-msan-to-link-Fortran-program-in-debug-build/m-p/1536555
# nocontiguous because spurious errors occur when assigning null() to contiguous pointers
steps:
- name: Set up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -125,7 +129,7 @@ jobs:
FFLAGS: ${{ env.FFLAGS }} -fp-model=precise
nvfortran:
# for available versions, see https://developer.nvidia.com/nvidia-hpc-sdk-releases
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
strategy:
matrix:
include:
Expand Down Expand Up @@ -170,7 +174,7 @@ jobs:
run: python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
aocc:
# for available versions, see https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/aocc/package.py
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
strategy:
matrix:
include:
Expand Down Expand Up @@ -210,7 +214,7 @@ jobs:
source /home/runner/setenv_AOCC.sh
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler flang ${{ matrix.pyfabm_cmake_args }}
pyfabm:
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -237,7 +241,7 @@ jobs:
for f in testcases/*.yaml; do fabm_describe_model $f; done
for f in testcases/*.yaml; do fabm_complete_yaml --add_missing $f; done
fabm0d:
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
runs-on: ubuntu-latest
steps:
- name: Install NetCDF
Expand All @@ -261,7 +265,7 @@ jobs:
cmake --build build --target install
stat ~/local/fabm/0d/bin/fabm0d
cmake:
if: github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
strategy:
matrix:
cmake-version: ["3.13"]
Expand Down
Loading

0 comments on commit cdae2ca

Please sign in to comment.