First pass at documenting assert preprocessor directives #692
Workflow file for this run
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 Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| # Do not run if the only files changed cannot affect the build | |
| paths-ignore: | |
| - "**.md" | |
| - "**.MD" | |
| - "LICENCE" | |
| - "COPYRIGHT" | |
| # This is a weekly run to try and keep the MPI caches ... cached | |
| schedule: | |
| - cron: '00 13 * * 1' | |
| # Allow us to trigger it manually | |
| workflow_dispatch: | |
| jobs: | |
| GNU: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15] | |
| compiler: [gfortran-12, gfortran-13, gfortran-14, gfortran-15] | |
| # gfortran-10 and -11 are only on ubuntu-22.04 | |
| # gfortran-13 and -14 and -15 are not on ubuntu-22.04 | |
| # gfortran-12 is not on macos | |
| # gfortran-15 is only on macos | |
| include: | |
| - os: ubuntu-22.04 | |
| compiler: gfortran-10 | |
| - os: ubuntu-22.04 | |
| compiler: gfortran-11 | |
| exclude: | |
| - os: ubuntu-22.04 | |
| compiler: gfortran-13 | |
| - os: ubuntu-22.04 | |
| compiler: gfortran-14 | |
| - os: ubuntu-22.04 | |
| compiler: gfortran-15 | |
| - os: ubuntu-24.04 | |
| compiler: gfortran-15 | |
| - os: macos-14 | |
| compiler: gfortran-12 | |
| - os: macos-15 | |
| compiler: gfortran-12 | |
| # fail-fast if set to 'true' here is good for production, but when | |
| # debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails | |
| # GitHub Actions will stop any other test immediately. So good for production, bad | |
| # when trying to figure something out. For more info see: | |
| # https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html | |
| fail-fast: false | |
| env: | |
| FC: ${{ matrix.compiler }} | |
| LANGUAGE: en_US.UTF-8 | |
| LC_ALL: en_US.UTF-8 | |
| LANG: en_US.UTF-8 | |
| LC_TYPE: en_US.UTF-8 | |
| OMPI_ALLOW_RUN_AS_ROOT: 1 | |
| OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | |
| OMPI_MCA_btl_vader_single_copy_mechanism: none | |
| name: ${{ matrix.os }} / ${{ matrix.compiler }} | |
| steps: | |
| - name: Compiler Versions | |
| run: | | |
| ${FC} --version | |
| cmake --version | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set all directories as git safe | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - name: Cache MPI | |
| id: cache-mpi | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/local/openmpi | |
| key: mpi-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }} | |
| - name: Build MPI | |
| if: steps.cache-mpi.outputs.cache-hit != 'true' | |
| run: | | |
| sh ${GITHUB_WORKSPACE}/tools/ci-install-mpi.sh openmpi 5.0.2 | |
| - name: Set MPI Environment | |
| run: | | |
| echo "${HOME}/local/openmpi/bin" >> $GITHUB_PATH | |
| echo "LD_LIBRARY_PATH=${HOME}/local/openmpi/lib" >> $GITHUB_ENV | |
| echo "DYLD_LIBRARY_PATH=${HOME}/local/openmpi/lib" >> $GITHUB_ENV | |
| - name: MPI Versions | |
| run: | | |
| ${FC} --version | |
| mpirun --version | |
| mpifort --show | |
| - name: Configure pFUnit | |
| run: cmake -B build | |
| - name: Build pfUnit | |
| run: cmake --build build --parallel 4 | |
| - name: Build Tests | |
| run: | | |
| cmake --build build --parallel 4 --target build-tests | |
| cmake --build build --parallel 4 --target tests | |
| - name: Run Ctest | |
| run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 | |
| - name: Archive log files on failure | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: logfiles-${{ matrix.compiler }}-${{ matrix.os }} | |
| path: | | |
| build/**/*.log | |
| Intel: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| FC: ifx | |
| CC: icx | |
| name: Intel Fortran | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set all directories as git safe | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - name: Setup Intel oneAPI repository | |
| run: | | |
| wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
| sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
| sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" | |
| sudo apt-get update | |
| - name: Install Intel oneAPI compilers | |
| timeout-minutes: 5 | |
| run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp | |
| # optional | |
| - name: Install Intel MPI | |
| timeout-minutes: 5 | |
| run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel | |
| - name: Setup Intel oneAPI environment | |
| run: | | |
| source /opt/intel/oneapi/setvars.sh | |
| printenv >> $GITHUB_ENV | |
| printenv | grep intel | |
| - name: Versions | |
| run: | | |
| ${FC} --version | |
| ${CC} --version | |
| mpirun --version | |
| cmake --version | |
| - name: Configure pFUnit | |
| run: cmake -B build | |
| - name: Build pfUnit | |
| run: cmake --build build --parallel | |
| - name: Build Tests | |
| run: | | |
| cmake --build build --parallel 4 --target build-tests | |
| cmake --build build --parallel 4 --target tests | |
| - name: Run Ctest | |
| run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 | |
| - name: Archive log files on failure | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: logfiles-Intel | |
| path: | | |
| build/**/*.log | |
| # NOTE: This is weird because the NVHPC image is so large (~8GB) that | |
| # we have to do some tricks to get it to run in GitHub Actions. | |
| Nvidia-Build-Only: | |
| runs-on: ubuntu-24.04 | |
| # Turned off for now because NVHPC image is too large for free | |
| # GitHub Actions runners, but leaving here for when we can run it again | |
| if: false | |
| env: | |
| FC: nvfortran | |
| NVHPC_IMAGE: nvcr.io/nvidia/nvhpc:26.1-devel-cuda13.1-ubuntu24.04 | |
| steps: | |
| # Reclaim lots of space | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: | |
| tool-cache: true | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| swap-storage: true | |
| # Move /var/lib/docker onto the larger ephemeral disk (do this before any docker pulls) | |
| - name: Maximize build space (move Docker storage) | |
| uses: easimon/maximize-build-space@v10 | |
| with: | |
| root-reserve-mb: 4096 | |
| remove-dotnet: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| build-mount-path: '/var/lib/docker' | |
| - name: Reset Docker daemon & prune | |
| run: | | |
| sudo systemctl restart docker | |
| docker system prune -af || true | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Pull NVHPC image (retry) | |
| env: | |
| DOCKER_CLIENT_TIMEOUT: 600 | |
| COMPOSE_HTTP_TIMEOUT: 600 | |
| run: | | |
| set -euo pipefail | |
| for i in 1 2 3 4 5; do | |
| echo "Attempt $i: docker pull $NVHPC_IMAGE" | |
| if docker pull "$NVHPC_IMAGE"; then | |
| exit 0 | |
| fi | |
| sleep $((i*20)) | |
| done | |
| echo "Docker pull failed after retries" | |
| exit 1 | |
| # Run everything inside the NVHPC container | |
| - name: Build (inside NVHPC) | |
| run: | | |
| docker run --rm \ | |
| -v "$GITHUB_WORKSPACE:/workspace" \ | |
| -w /workspace \ | |
| -e FC="$FC" \ | |
| "$NVHPC_IMAGE" \ | |
| bash -lc ' | |
| set -euo pipefail | |
| echo "== Versions ==" | |
| ${FC} --version || true | |
| # Base NVHPC images are minimal; install what you need | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| cmake git python-is-python3 ca-certificates pkg-config make | |
| cmake --version | |
| echo "== Git safe.directory ==" | |
| git config --global --add safe.directory "*" | |
| echo "== Build pFUnit ==" | |
| cmake -B build -DSKIP_ROBUST=ON | |
| cmake --build build --parallel 4 | |
| echo "== Build Tests (CURRENTLY TURNED OFF DUE TO PFUNIT ISSUES) ==" | |
| #cmake --build build --parallel 4 --target build-tests | |
| echo "== Run Tests (CURRENTLY TURNED OFF DUE TO PFUNIT ISSUES) ==" | |
| #ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 | |
| ' | |
| - name: Archive log files on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: logfiles-Nvidia | |
| path: | | |
| build/**/*.log | |
| Flang: | |
| runs-on: ubuntu-latest | |
| container: gmao/llvm-flang-openmpi:latest | |
| env: | |
| FC: flang-new | |
| LANGUAGE: en_US.UTF-8 | |
| LC_ALL: en_US.UTF-8 | |
| LANG: en_US.UTF-8 | |
| LC_TYPE: en_US.UTF-8 | |
| OMPI_ALLOW_RUN_AS_ROOT: 1 | |
| OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | |
| OMPI_MCA_btl_vader_single_copy_mechanism: none | |
| name: Flang | |
| steps: | |
| - name: Versions | |
| run: | | |
| ${FC} --version | |
| cmake --version | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set all directories as git safe | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - name: Add python-is-python3 package | |
| run: | | |
| apt-get update | |
| apt-get install -y python-is-python3 | |
| - name: Configure pFUnit | |
| run: cmake -B build | |
| - name: Build pfUnit | |
| run: cmake --build build --parallel | |
| - name: Build Tests | |
| run: | | |
| cmake --build build --parallel 4 --target build-tests | |
| cmake --build build --parallel 4 --target tests | |
| - name: Run Ctest | |
| run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 | |
| - name: Archive log files on failure | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: logfiles-Flang | |
| path: | | |
| build/**/*.log | |