Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/fesom2_build_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: FESOM2 Build Tests
# Controls when the action will run. Triggers the workflow on push or pull request.
on:
workflow_dispatch: {}
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_tests:
# Use matrix strategy to build all configurations in parallel
strategy:
matrix:
preset: [default, coupled, recom, ifs_interface]
include:
- preset: default
display_name: "Default Configuration"
- preset: coupled
display_name: "Coupled Configuration"
- preset: recom
display_name: "REcoM3 Configuration"
- preset: ifs_interface
display_name: "IFS Interface Configuration"

# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: ghcr.io/suvarchal/fesom2-ci:latest

# Service containers to run with `gfortran_ubuntu`
steps:
# Modern checkout action with v5
- uses: actions/checkout@v5
with:
# Don't Fetch all history for all tags and branches to ensure we have the latest presets
fetch-depth: 1

- name: Git safe directory
run: |
git config --global --add safe.directory ${PWD}

- name: Copy OASIS directory
run: |
cp -rf /oasis ../

- name: List available CMake presets
run: |
echo "Available CMake presets:"
cmake --list-presets
echo ""
echo "Available test presets:"
ctest --list-presets

- name: Configure and build ${{ matrix.display_name }}
run: |
echo "Building ${{ matrix.display_name }} (preset: ${{ matrix.preset }})"
cmake --preset ${{ matrix.preset }}
cmake --build --preset ${{ matrix.preset }} --parallel $(nproc)

- name: Run integration tests for ${{ matrix.display_name }}
run: |
echo "Running integration tests for ${{ matrix.display_name }}..."
ctest --preset ${{ matrix.preset }} --output-on-failure
continue-on-error: ${{ matrix.preset == 'recom' }} # REcoM3 tests may fail as noted in documentation

- name: Verify build artifacts for ${{ matrix.display_name }}
run: |
echo "Checking build artifacts for ${{ matrix.display_name }}:"
ls -la build/${{ matrix.preset }}/
echo ""
echo "Build completed successfully for ${{ matrix.display_name }}!"
183 changes: 183 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"version": 3,
"configurePresets": [
{
"name": "default",
"displayName": "Default FESOM2 Build",
"description": "Standard FESOM2 build with default options",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_TESTING": "ON",
"FESOM_COUPLED": "OFF",
"OIFS_COUPLED": "OFF",
"RECOM_COUPLED": "OFF",
"USE_ICEPACK": "OFF",
"ENABLE_IFS_INTERFACE": "OFF",
"ENABLE_OPENMP": "OFF",
"ENABLE_MULTIO": "OFF",
"ASYNC_ICEBERGS": "ON",
"VERBOSE": "OFF",
"FESOM_PROFILING": "OFF",
"BUILD_MESHPARTITIONER": "OFF",
"BUILD_MESHDIAG": "OFF"
},
"environment": {
"FESOM_PLATFORM_STRATEGY": "ubuntu"
}
},
{
"name": "coupled",
"displayName": "Coupled FESOM2 Build",
"description": "FESOM2 build with OASIS coupling and OpenIFS support",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/coupled",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_TESTING": "ON",
"FESOM_COUPLED": "ON",
"OIFS_COUPLED": "ON",
"RECOM_COUPLED": "OFF",
"USE_ICEPACK": "OFF",
"ENABLE_IFS_INTERFACE": "OFF",
"ENABLE_OPENMP": "OFF",
"ENABLE_MULTIO": "OFF",
"ASYNC_ICEBERGS": "ON",
"VERBOSE": "OFF",
"FESOM_PROFILING": "OFF",
"BUILD_MESHPARTITIONER": "OFF",
"BUILD_MESHDIAG": "OFF",
"OASIS_WITH_YAC": "OFF"
},
"environment": {
"FESOM_PLATFORM_STRATEGY": "ubuntu"
}
},
{
"name": "recom",
"displayName": "REcoM3 Coupled FESOM2 Build",
"description": "FESOM2 build with REcoM3 biogeochemistry coupling",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/recom",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_TESTING": "ON",
"FESOM_COUPLED": "OFF",
"OIFS_COUPLED": "OFF",
"RECOM_COUPLED": "ON",
"CISO_COUPLED": "OFF",
"USE_ICEPACK": "OFF",
"ENABLE_IFS_INTERFACE": "OFF",
"ENABLE_OPENMP": "OFF",
"ENABLE_MULTIO": "OFF",
"ASYNC_ICEBERGS": "ON",
"VERBOSE": "OFF",
"FESOM_PROFILING": "OFF",
"BUILD_MESHPARTITIONER": "OFF",
"BUILD_MESHDIAG": "OFF"
},
"environment": {
"FESOM_PLATFORM_STRATEGY": "ubuntu"
}
},
{
"name": "ifs_interface",
"displayName": "IFS Interface FESOM2 Build",
"description": "FESOM2 build with IFS interface support for ECMWF coupling",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/ifs_interface",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_TESTING": "ON",
"FESOM_COUPLED": "OFF",
"OIFS_COUPLED": "OFF",
"RECOM_COUPLED": "OFF",
"USE_ICEPACK": "OFF",
"ENABLE_IFS_INTERFACE": "ON",
"ENABLE_OPENMP": "OFF",
"ENABLE_MULTIO": "OFF",
"ASYNC_ICEBERGS": "ON",
"VERBOSE": "OFF",
"FESOM_PROFILING": "OFF",
"BUILD_MESHPARTITIONER": "OFF",
"BUILD_MESHDIAG": "OFF"
},
"environment": {
"FESOM_PLATFORM_STRATEGY": "ubuntu"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"displayName": "Build Default Configuration",
"description": "Build the default FESOM2 configuration"
},
{
"name": "coupled",
"configurePreset": "coupled",
"displayName": "Build Coupled Configuration",
"description": "Build the coupled FESOM2 configuration"
},
{
"name": "recom",
"configurePreset": "recom",
"displayName": "Build REcoM3 Configuration",
"description": "Build the REcoM3 coupled FESOM2 configuration"
},
{
"name": "ifs_interface",
"configurePreset": "ifs_interface",
"displayName": "Build IFS Interface Configuration",
"description": "Build the IFS interface FESOM2 configuration"
}
],
"testPresets": [
{
"name": "default",
"configurePreset": "default",
"displayName": "Test Default Configuration",
"description": "Run integration tests for the default FESOM2 configuration",
"filter": {
"include": {
"name": "integration_.*"
}
}
},
{
"name": "coupled",
"configurePreset": "coupled",
"displayName": "Test Coupled Configuration",
"description": "Run integration tests for the coupled FESOM2 configuration",
"filter": {
"include": {
"name": "integration_.*"
}
}
},
{
"name": "recom",
"configurePreset": "recom",
"displayName": "Test REcoM3 Configuration",
"description": "Run integration tests for the REcoM3 coupled FESOM2 configuration",
"filter": {
"include": {
"name": "integration_.*"
}
}
},
{
"name": "ifs_interface",
"configurePreset": "ifs_interface",
"displayName": "Test IFS Interface Configuration",
"description": "Run integration tests for the IFS interface FESOM2 configuration",
"filter": {
"include": {
"name": "integration_.*"
}
}
}
]
}
Loading
Loading