Skip to content

Commit

Permalink
Merge pull request #2536 from GEOS-ESM/feature/mathomp4/refactor-ci
Browse files Browse the repository at this point in the history
Refactor CircleCI workflows
  • Loading branch information
mathomp4 authored Jan 18, 2024
2 parents acc7369 + 3c2611a commit 0d20fe3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 46 deletions.
95 changes: 49 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ orbs:
ci: geos-esm/circleci-tools@2

workflows:
build-and-test:
build-and-test-MAPL:
jobs:

# Builds MAPL in a "default" way - Intel
- ci/build:
name: build-and-test-MAPL-on-<< matrix.compiler >>-using-<< matrix.cmake_generator >>
Expand Down Expand Up @@ -86,65 +85,58 @@ workflows:
run_unit_tests: true
ctest_options: "-LE 'PERFORMANCE|EXTDATA1G_BIG_TESTS|EXTDATA2G_BIG_TESTS' --output-on-failure"

# Build GEOSgcm -- ifort
- ci/build:
name: build-GEOSgcm-on-<< matrix.compiler >>
# Run MAPL Tutorials
- ci/run_mapl_tutorial:
name: run-<< matrix.tutorial_name >>-Tutorial-with-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
#compiler: [gfortran, ifort]
compiler: [ifort]
tutorial_name:
- hello_world
- parent_no_children
- parent_one_child_import_via_extdata
- parent_one_child_no_imports
- parent_two_siblings_connect_import_export
# We will only run the tutorials with GNU make. No need to double up
# as Ninja is a build test only
requires:
- build-and-test-MAPL-on-<< matrix.compiler >>-using-Unix Makefiles
baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
checkout_mapl_branch: true
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day

# Build GEOSgcm -- GCC
build-and-run-GEOSgcm:
jobs:
# Build GEOSgcm -- ifort
- ci/build:
name: build-GEOSgcm-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran]
compiler: [ifort]
baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
checkout_mapl_branch: true
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day

# Build GEOSldas on ifort
- ci/build:
name: build-GEOSldas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [ifort]
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
checkout_fixture: true
fixture_branch: develop
checkout_mapl_branch: true

# Build GEOSldas on gfortran
# Build GEOSgcm -- GCC
- ci/build:
name: build-GEOSldas-on-<< matrix.compiler >>
name: build-GEOSgcm-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran]
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
repo: GEOSgcm
checkout_fixture: true
fixture_branch: develop
mepodevelop: true
checkout_mapl_branch: true
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day

# Run GCM (1 hour, no ExtData)
- ci/run_gcm:
Expand Down Expand Up @@ -176,26 +168,37 @@ workflows:
gcm_ocean_type: MOM6
change_layout: false

# Run MAPL Tutorials
- ci/run_mapl_tutorial:
name: run-<< matrix.tutorial_name >>-Tutorial-with-<< matrix.compiler >>
build-GEOSldas:
jobs:
# Build GEOSldas on ifort
- ci/build:
name: build-GEOSldas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
#compiler: [gfortran, ifort]
compiler: [ifort]
tutorial_name:
- hello_world
- parent_no_children
- parent_one_child_import_via_extdata
- parent_one_child_no_imports
- parent_two_siblings_connect_import_export
# We will only run the tutorials with GNU make. No need to double up
# as Ninja is a build test only
requires:
- build-and-test-MAPL-on-<< matrix.compiler >>-using-Unix Makefiles
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
checkout_fixture: true
fixture_branch: develop
checkout_mapl_branch: true

# Build GEOSldas on gfortran
- ci/build:
name: build-GEOSldas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran]
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
checkout_fixture: true
fixture_branch: develop
checkout_mapl_branch: true

build-GEOSadas:
jobs:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Enable Ninja for CI builds of MAPL
- Removed use of `ESMF_HAS_ACHAR_BUG` CMake option and code use in `MAPL_Config.F90`. Testing has shown that with ESMF 8.6 (which is
now required), NAG no longer needs this workaround.
- Refactor the CircleCI workflows for more flexibility

### Fixed

Expand Down

0 comments on commit 0d20fe3

Please sign in to comment.