Skip to content

Fix CI

Fix CI #150

Workflow file for this run

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.txt"
- "Copyright.txt"
jobs:
GNU:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-11, macos-12]
compiler: [gfortran-10, gfortran-11, gfortran-12, gfortran-13]
exclude:
- os: macos-11
compiler: gfortran-13
- os: macos-12
compiler: gfortran-10
# 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@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build gFTL
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)
- name: Build Tests
run: |
cd build
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) tests
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: logfiles
path: |
build/**/*.log
Intel:
runs-on: ubuntu-20.04
container: intel/hpckit:2024.0.0-devel-ubuntu22.04
env:
FC: ifort
CC: icx
name: Intel Fortran
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Install needed packages
run: |
apt-get update
apt-get install -y cmake python-is-python3 m4
- name: Versions
run: |
${FC} --version
${CC} --version
mpirun --version
cmake --version
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build gFTL
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE -DCMAKE_BUILD_TYPE=Debug
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)
- name: Build Tests
run: |
cd build
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) tests
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: logfiles
path: |
build/**/*.log
#########################################################################################################################################
# Nvidia: #
# runs-on: ubuntu-22.04 #
# container: nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04 #
# env: #
# FC: nvfortran #
# #
# name: Nvidia HPC #
# steps: #
# - name: Versions #
# run: | #
# ${FC} --version #
# cmake --version #
# - name: Install Python3 #
# run: | #
# apt-get update #
# apt-get install python3 python-is-python3 -y #
# - name: Checkout #
# uses: actions/checkout@v4 #
# with: #
# fetch-depth: 1 #
# - name: Set all directories as git safe #
# run: | #
# git config --global --add safe.directory '*' #
# - name: Build GFE Prereqs #
# run: | #
# bash ./tools/ci-install-gfe.bash #
# - name: Build gFTL #
# run: | #
# mkdir -p build #
# cd build #
# cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE #
# make -j$(nproc) #
# - name: Build Tests #
# run: | #
# cd build #
# make -j$(nproc) tests #
# - name: Run Tests #
# run: | #
# cd build #
# ctest -j1 --output-on-failure --repeat until-pass:4 #
# - name: Archive log files on failure #
# uses: actions/upload-artifact@v3 #
# if: failure() #
# with: #
# name: logfiles #
# path: | #
# build/**/*.log #
#########################################################################################################################################