Skip to content

Commit

Permalink
Merge pull request #50 from mvertens/feature/update_to_esmci
Browse files Browse the repository at this point in the history
update NorESMhub CIME to and ESMCI cime6.0.173

The only difference between NorESMhub CIME in this PR and and ESMCI cime6.0.173 is the addition of blom in
CIME/data/config/cesm/config_files.xml

Test suite: Ran SMS_D_Ld1.T62_tn14.NOINYOC.betzy_intel and verified that it was bfb.
Test baseline:
Test namelist changes:
Test status: bfb

User interface changes?: None

Update gh-pages html (Y/N)?: No
  • Loading branch information
gold2718 authored Oct 24, 2023
2 parents 599b6e5 + 6b97472 commit 1364ee7
Show file tree
Hide file tree
Showing 131 changed files with 2,289 additions and 1,113 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: container build/publish

on:
push:
branches:
- master
paths:
- 'docker/**'

pull_request:
branches:
- master
paths:
- 'docker/**'

workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
# Only build container if there has been a change.
build-containers:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/ESMCI/cime
flavor: |
latest=auto
tags: |
type=sha
- name: Build and push
uses: docker/build-push-action@v3
with:
target: base
context: docker/
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
75 changes: 34 additions & 41 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,55 @@ on:
push:
branches:
- master
paths:
- 'doc/**'

pull_request:
branches:
- master
paths:
- 'doc/**'

workflow_dispatch:

permissions:
contents: read
jobs:
check-changes:
name: Check for changes to documentation
cleanup:
permissions:
contents: write # for git push
name: Cleanup branch previews
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-check.outputs.any_changed }}
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
with:
ref: 'gh-pages'
fetch-depth: 0
lfs: true
- uses: tj-actions/changed-files@v32
id: changed-check
with:
files: doc
path: gh-pages
- name: Remove branch previews
run: |
pushd $GITHUB_WORKSPACE/gh-pages
for name in `ls branch/`
do
if [[ -z "$(git show-ref --quiet ${name})" ]]
then
git rm -rf branch/${name}
fi
done
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git commit -m "Clean up branch previews"
git push
build-and-deploy:
permissions:
contents: write # for peaceiris/actions-gh-pages to push
pull-requests: write # to comment on pull requests
needs: check-changes
if: |
needs.check-changes.outputs.any_changed == 'true' &&
github.event.pull_request.head.repo.full_name == github.repository
needs: cleanup
if: ${{ always() }}
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -61,7 +80,9 @@ jobs:
run: |
make BUILDDIR=${PWD}/_build -C doc/ html
- name: Push PR preview
if: ${{ github.event_name == 'pull_request' }}
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
Expand Down Expand Up @@ -99,31 +120,3 @@ jobs:
destination_dir: './versions/master/html'
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
cleanup:
permissions:
contents: write # for git push
needs: build-and-deploy
name: Cleanup branch previews
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
with:
ref: 'gh-pages'
fetch-depth: 0
lfs: true
- name: Remove branch previews
run: |
for name in `ls branch/`
do
if [[ -z "$(git show-ref --quiet ${name})" ]]
then
git rm -rf branch/${name}
fi
done
- name: Commit and push local changes to gh-pages
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git commit -m "Clean up branch previews"
git push
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Close stale issues and PRs'
on:
schedule:
# Run every day at 1:30AM
- cron: '30 1 * * *'
jobs:
stale:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 90
days-before-close: 5
days-before-pr-close: -1
# Issues with this label are exempt from being checked if they are stale...
exempt-issue-labels: Low Priority
# Below are currently defaults, but given in case we decide to change
operations-per-run: 30
stale-issue-label: Stale
close-issue-reason: not_planned
83 changes: 26 additions & 57 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@ on:
push:
branches:
- master
paths:
- 'CIME/**'
- 'scripts/**'
- 'tools/**'
- 'utils/**'

pull_request:
branches:
- master
paths:
- 'CIME/**'
- 'scripts/**'
- 'tools/**'
- 'utils/**'

workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)
packages: read

jobs:
pre-commit:
Expand All @@ -39,67 +52,18 @@ jobs:
pre-commit run -a
# Check if there has been a change to any file under docker/
get-docker-changes:
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.get-changed-files.outputs.any_changed }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changed files
id: get-changed-files
uses: tj-actions/changed-files@v29
with:
files: docker

# Only build container if there has been a change.
build-containers:
runs-on: ubuntu-latest
needs: get-docker-changes
if: ${{ needs.get-docker-changes.outputs.any_changed == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: jasonb87/cime
tags: |
type=raw,value=latest
type=sha,prefix={{ date 'YYYYMMDD' }}_,format=short
- name: Build and push
uses: docker/build-push-action@v3
with:
target: base
context: docker/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=jasonb87/cime:buildcache
cache-to: type=registry,ref=jasonb87/cime:buildcache,mode=max

# Runs unit testing under different python versions.
unit-testing:
runs-on: ubuntu-latest
needs: build-containers
if: ${{ always() && ! cancelled() }}
container: jasonb87/cime:latest
container:
image: ghcr.io/esmci/cime:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -130,9 +94,12 @@ jobs:
# Run system tests
system-testing:
runs-on: ubuntu-latest
needs: build-containers
if: ${{ always() && ! cancelled() }}
container: jasonb87/cime:latest
container:
image: ghcr.io/esmci/cime:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
model: ["e3sm", "cesm"]
Expand Down Expand Up @@ -183,6 +150,8 @@ jobs:
if: ${{ failure() }}
shell: bash
run: tar -czvf /testing-logs-${GITHUB_RUN_NUMBER}.tar.gz /storage/cases/
# How to download artifacts:
# https://docs.github.com/en/actions/managing-workflow-runs/downloading-workflow-artifacts
- name: Upload testing logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion CIME/SystemTests/README
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ERP pes counts hybrid (open-MP/MPI) restart bfb test from startup, default 6
do an 11 day initial test - write a restart at day 6 (suffix base)
half the number of tasks and threads for each component
do a 5 day restart test starting from restart at day 6 (suffix rest)
this is just like an ERS test but the pe-counts/threading count are modified on retart
this is just like an ERS test but the pe-counts/threading count are modified on restart

ERI hybrid/branch/exact restart test, default (by default STOP_N is 22 days)
(1) ref1case
Expand Down
3 changes: 2 additions & 1 deletion CIME/SystemTests/dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DAE(SystemTestsCompareTwo):
"""

###########################################################################
def __init__(self, case):
def __init__(self, case, **kwargs):
###########################################################################
SystemTestsCompareTwo.__init__(
self,
Expand All @@ -36,6 +36,7 @@ def __init__(self, case):
run_two_suffix="da",
run_one_description="no data assimilation",
run_two_description="data assimilation",
**kwargs,
)

###########################################################################
Expand Down
4 changes: 2 additions & 2 deletions CIME/SystemTests/eri.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def _helper(dout_sr, refdate, refsec, rundir):


class ERI(SystemTestsCommon):
def __init__(self, case):
def __init__(self, case, **kwargs):
"""
initialize an object interface to the ERI system test
"""
SystemTestsCommon.__init__(self, case)
SystemTestsCommon.__init__(self, case, **kwargs)
self._testname = "ERI"

def run_phase(self):
Expand Down
4 changes: 2 additions & 2 deletions CIME/SystemTests/erio.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@


class ERIO(SystemTestsCommon):
def __init__(self, case):
def __init__(self, case, **kwargs):
"""
initialize an object interface to file env_test.xml in the case directory
"""
SystemTestsCommon.__init__(self, case, expected=["TEST"])
SystemTestsCommon.__init__(self, case, expected=["TEST"], **kwargs)

self._pio_types = self._case.get_env("run").get_valid_values("PIO_TYPENAME")
self._stop_n = self._case.get_value("STOP_N")
Expand Down
3 changes: 2 additions & 1 deletion CIME/SystemTests/erp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


class ERP(RestartTest):
def __init__(self, case):
def __init__(self, case, **kwargs):
"""
initialize a test object
"""
Expand All @@ -26,6 +26,7 @@ def __init__(self, case):
run_two_suffix="rest",
run_one_description="initial",
run_two_description="restart",
**kwargs
)

def _case_two_setup(self):
Expand Down
Loading

0 comments on commit 1364ee7

Please sign in to comment.