Add Malpasset control file (#115) #564
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: CI | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'LICENSE.md' | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'LICENSE.md' | |
- 'README.md' | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
env: | |
# Modify this variable to change the ifort compiler version - do NOT hardcode the version | |
# anywhere else! | |
INTEL_ONEAPI_VERSION: 2023.2.1 | |
jobs: | |
test: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: ${{ matrix.os_name }} - ${{ matrix.compiler }} - ${{ matrix.test_type }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Linux | |
- os: ubuntu-22.04 | |
os_name: linux | |
compiler: gfortran-9 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: ubuntu-22.04 | |
os_name: linux | |
compiler: gfortran-9 | |
shell: bash | |
test_type: valgrind | |
coverage: false | |
- os: ubuntu-latest | |
os_name: linux | |
compiler: gfortran-10 | |
shell: bash | |
test_type: regular | |
coverage: true | |
- os: ubuntu-latest | |
os_name: linux | |
compiler: gfortran-10 | |
shell: bash | |
test_type: valgrind | |
coverage: false | |
- os: ubuntu-22.04 | |
os_name: linux | |
compiler: gfortran-11 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: ubuntu-22.04 | |
os_name: linux | |
compiler: gfortran-11 | |
shell: bash | |
test_type: valgrind | |
coverage: false | |
- os: ubuntu-latest | |
os_name: linux | |
compiler: gfortran-12 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: ubuntu-latest | |
os_name: linux | |
compiler: gfortran-12 | |
shell: bash | |
test_type: valgrind | |
coverage: false | |
- os: ubuntu-24.04 | |
os_name: linux | |
compiler: gfortran-13 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: ubuntu-24.04 | |
os_name: linux | |
compiler: gfortran-13 | |
shell: bash | |
test_type: valgrind | |
coverage: false | |
- os: ubuntu-24.04 | |
os_name: linux | |
compiler: gfortran-14 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: ubuntu-24.04 | |
os_name: linux | |
compiler: gfortran-14 | |
shell: bash | |
test_type: valgrind | |
coverage: false | |
- os: ubuntu-latest | |
os_name: linux | |
compiler: ifort | |
shell: bash | |
test_type: regular | |
coverage: false | |
# macOS | |
- os: macos-latest | |
os_name: macos | |
compiler: gfortran-12 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: macos-latest | |
os_name: macos | |
compiler: gfortran-13 | |
shell: bash | |
test_type: regular | |
coverage: false | |
- os: macos-latest | |
os_name: macos | |
compiler: gfortran-14 | |
shell: bash | |
test_type: regular | |
coverage: false | |
# Windows | |
- os: windows-latest | |
os_name: windows | |
compiler: gfortran | |
shell: 'msys2 {0}' | |
test_type: regular | |
coverage: false | |
# Set default shell as suggested here: https://github.community/t/setting-default-shell-or-other-step-metadata-conditionally-in-workflows/154055 | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# - name: Add msbuild to PATH | |
# if: ${{ matrix.os_name == 'windows-latest' }} | |
# uses: microsoft/[email protected] | |
- uses: msys2/setup-msys2@v2 | |
if: ${{ matrix.os == 'windows-latest' }} | |
with: | |
update: true | |
install: git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc-fortran | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
path: /opt/intel/oneapi | |
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.INTEL_ONEAPI_VERSION }} | |
- name: Install Intel oneAPI Fortran compiler | |
if: matrix.compiler == 'ifort' && steps.cache.outputs.cache-hit != 'true' | |
run: | | |
# download the key to system keyring | |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | |
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null | |
# add signed entry to apt sources and configure the APT client to use Intel repository: | |
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
# update package index and install Fortran compiler | |
sudo apt update | |
sudo apt-get install intel-oneapi-compiler-fortran-$INTEL_ONEAPI_VERSION | |
# set environment variables and make them persistent across steps | |
. /opt/intel/oneapi/setvars.sh | |
env | grep oneapi >> $GITHUB_ENV | |
- name: Use existing Intel oneAPI Fortran compiler | |
if: matrix.compiler == 'ifort' && steps.cache.outputs.cache-hit == 'true' | |
run: | | |
# set environment variables and make them persistent across steps | |
. /opt/intel/oneapi/setvars.sh | |
env | grep oneapi >> $GITHUB_ENV | |
- name: Bootstrap | |
run: | | |
./Utilities/bootstrap | |
- name: Show version information | |
run: | | |
${{ matrix.compiler }} --version | |
- name: Build | |
run: | | |
make -j 2 FC=${{ matrix.compiler }} | |
- name: Run regular function tests | |
if: ${{ matrix.test_type == 'regular' }} | |
run: | | |
./HOHQMesh -test | |
- name: Run memory checks with Valgrind (only Linux) | |
if: ${{ matrix.os_name == 'linux' && matrix.test_type == 'valgrind' }} | |
run: | | |
sudo apt update | |
sudo apt-get install -y valgrind | |
valgrind --error-exitcode=1 -s ./HOHQMesh -test | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session for debugging | |
if: ${{ matrix.os == 'windows-latest' && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled && always() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 15 | |
- name: Run tests for coverage | |
if: ${{ matrix.coverage }} | |
run: | | |
sudo apt-get install -y lcov | |
FC=${{ matrix.compiler }} ./Utilities/createcoverage | |
- uses: codecov/codecov-action@v4 | |
if: ${{ matrix.coverage }} | |
with: | |
files: ./lcov.info | |
flags: unittests | |
name: codecov-umbrella | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # now required for public repos | |
- name: Coveralls | |
if: ${{ matrix.coverage }} | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./lcov.info |