Skip to content

Commit

Permalink
Merge tag 'tags/v11.4.0' into feature/adarmenov/#208-wmma
Browse files Browse the repository at this point in the history
Resolved conflicts in:
  components.yaml
  • Loading branch information
adarmenov committed Dec 19, 2023
2 parents 38a2cd0 + c789869 commit 8301754
Show file tree
Hide file tree
Showing 19 changed files with 1,119 additions and 207 deletions.
182 changes: 97 additions & 85 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,111 @@
version: 2.1

parameters:
GHA_Actor:
type: string
default: ""
GHA_Action:
type: string
default: ""
GHA_Event:
type: string
default: ""
GHA_Meta:
type: string
default: ""

# Anchors to prevent forgetting to update a version
os_version: &os_version ubuntu20
baselibs_version: &baselibs_version v7.14.0
bcs_version: &bcs_version v11.3.0
tag_build_arg_name: &tag_build_arg_name gcmversion

orbs:
circleci-tools: geos-esm/circleci-tools@0.6.0
ci: geos-esm/circleci-tools@1

workflows:
build-test:
jobs:
- build-GEOSgcm:
- ci/build:
name: build-GEOSgcm-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort]
compiler: [ifort, gfortran]
baselibs_version: *baselibs_version
repo: GEOSgcm
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra

# Run AMIP GCM (1 hour, no ExtData)
- ci/run_gcm:
name: run-GCM-on-<< matrix.compiler >>
context:
- docker-hub-creds
##################################################
# - run-gcm-exp: #
# name: run-gcm-exp-on-<< matrix.compiler >> #
# matrix: #
# parameters: #
# compiler: [gfortran, ifort] #
# context: #
# - docker-hub-creds #
# requires: #
# - build-GEOSgcm-on-<< matrix.compiler >> #
##################################################

jobs:
build-GEOSgcm:
parameters:
compiler:
type: string
executor:
name: circleci-tools/<< parameters.compiler >>
resource_class: large
working_directory: /root/project
steps:
- checkout:
path: GEOSgcm
- circleci-tools/versions:
compiler: << parameters.compiler >>
- circleci-tools/mepoclone
- circleci-tools/checkout_if_exists
- circleci-tools/cmake:
compiler: << parameters.compiler >>
- circleci-tools/buildinstall
- circleci-tools/compress_artifacts
- store_artifacts:
path: /logfiles
# We need to persist the install for the next step
# but only if we are running gcm tests
###########################
# - persist_to_workspace: #
# root: workspace #
# paths: #
# - install-GEOSgcm #
###########################

run-gcm-exp:
parameters:
compiler:
type: string
executor: << parameters.compiler >>-xlarge
working_directory: /root/project
steps:
- attach_workspace:
at: workspace
- run:
name: "Run gcm_setup"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/install-GEOSgcm/bin
/TinyBCs-GitV10/scripts/create_expt.py test-gcm-c12 --expdir ${CIRCLE_WORKING_DIRECTORY}/workspace
- run:
name: "Run makeoneday"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/test-gcm-c12
/TinyBCs-GitV10/scripts/makeoneday.bash 6hr nxy 1 6
- run:
name: "Run gcm_run.j"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/test-gcm-c12
mkdir -p /logfiles
./gcm_run.j |& tee /logfiles/gcm_run.log
- run:
name: "Check for EGRESS"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/test-gcm-c12
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
bcs_version: *bcs_version
requires:
- build-GEOSgcm-on-<< matrix.compiler >>
repo: GEOSgcm

SCRDIR=$(find . -type d -name 'scratch*')
# Run Coupled GCM (1 hour, no ExtData)
- ci/run_gcm:
name: run-coupled-GCM-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
bcs_version: *bcs_version
requires:
- build-GEOSgcm-on-<< matrix.compiler >>
repo: GEOSgcm
gcm_ocean_type: MOM6
change_layout: false

if [[ -f $SCRDIR/EGRESS ]]
then
echo "EGRESS found!"
else
echo "EGRESS not found!"
exit 1
fi
- store_artifacts:
path: /logfiles
build-and-publish-docker:
when:
equal: [ "release", << pipeline.parameters.GHA_Event >> ]
jobs:
- ci/publish-docker:
filters:
tags:
only: /^v.*$/
name: publish-intel-docker-image
context:
- docker-hub-creds
- ghcr-creds
os_version: *os_version
baselibs_version: *baselibs_version
bcs_version: *bcs_version
container_name: geosgcm
mpi_name: intelmpi
mpi_version: 2021.6.0
compiler_name: intel
compiler_version: 2022.1.0
image_name: geos-env-bcs
tag_build_arg_name: *tag_build_arg_name
resource_class: xlarge
- ci/publish-docker:
filters:
tags:
only: /^v.*$/
name: publish-gcc-docker-image
context:
- docker-hub-creds
- ghcr-creds
os_version: *os_version
baselibs_version: *baselibs_version
bcs_version: *bcs_version
container_name: geosgcm
mpi_name: openmpi
mpi_version: 4.1.4
compiler_name: gcc
compiler_version: 12.1.0
image_name: geos-env-bcs
tag_build_arg_name: *tag_build_arg_name
resource_class: xlarge
34 changes: 0 additions & 34 deletions .codebuild/buildspec.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# GEOSgcm Dockerfile

ARG osversion
ARG imagename
ARG baselibversion
ARG bcsversion
ARG mpiname
ARG mpiversion
ARG compilername
ARG compilerversion

ARG BASE_IMAGE=gmao/${osversion}-${imagename}:${baselibversion}-${mpiname}_${mpiversion}-${compilername}_${compilerversion}-bcs_${bcsversion}
FROM ${BASE_IMAGE}

ARG gcmversion

RUN git clone -b ${gcmversion} https://github.com/GEOS-ESM/GEOSgcm.git /GEOSgcm-src && \
cd /GEOSgcm-src && \
mepo clone && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/GEOSgcm/install -DBASEDIR=$BASEDIR/Linux -DUSE_F2PY=OFF -DCMAKE_Fortran_COMPILER=$FC -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX && \
make -j $(nproc) install/strip && \
cd / && \
rm -rf /GEOSgcm-src
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/auto_pr_to_mapl3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## :memo: Automatic PR: `main``release/MAPL-v3`

### Description

<!-- Write your description here -->

## :file_folder: Modified files
<!-- Diff files - START -->
<!-- Diff files - END -->

24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Enable daily updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/" # Dependabot knows to look in .github/workflows for GitHub Actions
schedule:
interval: "daily"
labels:
- "dependencies"
- "github_actions"

# Enable daily updates for Docker
- package-ecosystem: "docker"
directory: "/.docker" # Location of Dockerfile
schedule:
interval: "daily"
labels:
- "dependencies"
- "docker"
33 changes: 33 additions & 0 deletions .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Enforce PR Labels

on:
pull_request:
types: [opened, labeled, unlabeled, edited, synchronize]

jobs:
require-label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: minimum
count: 1
labels: "0 diff,0 diff trivial,Non 0-diff,0 diff structural,0-diff trivial,Not 0-diff,0-diff,automatic,0-diff uncoupled,github_actions"
add_comment: true
message: "This PR is being prevented from merging because you have not added one of our required labels: {{ provided }}. Please add one so that the PR can be merged."

blocking-label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: exactly
count: 0
labels: "Contingent - DNA,Needs Lead Approval,Contingent -- Do Not Approve"
add_comment: true
message: "This PR is being prevented from merging because you have added one of our blocking labels: {{ provided }}. You'll need to remove it before this PR can be merged."

30 changes: 30 additions & 0 deletions .github/workflows/push-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Push to Main

on:
push:
branches:
- main

jobs:
pull_request:
name: Create Pull Request
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run the action
uses: devops-infra/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: main
target_branch: release/MAPL-v3
label: automatic,MAPL3,Skip Changelog
template: .github/PULL_REQUEST_TEMPLATE/auto_pr_to_mapl3.md
get_diff: true
assignee: ${{ github.actor }}
old_string: "<!-- Write your description here -->"
new_string: ${{ github.event.commits[0].message }}
title: Auto PR - main → MAPL-v3 - ${{ github.event.commits[0].message }}

4 changes: 2 additions & 2 deletions .github/workflows/release-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}

- name: Checkout mepo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: GEOS-ESM/mepo
path: mepo
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/trigger-circleci-pipeline-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
release:
types: [published]
jobs:
trigger-circleci:
runs-on: ubuntu-latest
steps:
- name: CircleCI Trigger on Release
id: docker-build
uses: CircleCI-Public/[email protected]
env:
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
Loading

0 comments on commit 8301754

Please sign in to comment.