Skip to content

Commit

Permalink
Merge remote-tracking branch 'MAINREPO/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
oksanaguba committed Jun 16, 2024
2 parents 9ec25eb + 669eb85 commit df0291b
Show file tree
Hide file tree
Showing 1,950 changed files with 164,030 additions and 114,910 deletions.
1 change: 0 additions & 1 deletion .circleci/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

# Replace all ssh URLs to submodules with HTTP URLs
sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
sed -i 's/git@github.com:/https:\/\/github.com\//' cime/.gitmodules
git submodule update --init --recursive
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
jobs:
build:
machine:
image: ubuntu-2004:202010-01
image: ubuntu-2004:2024.01.1
steps:
- checkout
- run: bash .circleci/setup.sh
Expand Down
5 changes: 3 additions & 2 deletions .circleci/container.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

wget -t 3 -O e3sm.sif http://portal.nersc.gov/project/e3sm/lukasz/e3sm.sif || \
wget -t 3 -O e3sm.sif https://dabdceba-6d04-11e5-ba46-22000b92c6ec.e.globus.org/containers/public/e3sm.sif
singularity pull e3sm.sif \
docker://ghcr.io/mahf708/e3sm-imgs@sha256:d1030a6f4e3a53f682859436a26b30a9477d69423829ae1d9c1b5ab4e255430d

if [ $? -ne 0 ]; then
exit -1
fi
2 changes: 1 addition & 1 deletion .circleci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ rc=$?
if [ $rc -ne 0 ]; then
print_bldlog "e3sm"
print_bldlog "csm_share"
print_bldlog "pio"
print_bldlog "spio"
print_bldlog "mct"
print_bldlog "gptl"
exit $rc
Expand Down
4 changes: 4 additions & 0 deletions .circleci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ function download
return $?
}

# Install Singularity deps:

sudo apt-get update && sudo apt-get -y install uuid-dev

# Install Singularity
download && \
tar -xzf singularity-${VERSION}.tar.gz && \
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
assignees:
- "rljacob"
reviewers:
- "mahf708"
- "bartgol"
labels:
- "AT: Integrate Without Testing"
67 changes: 67 additions & 0 deletions .github/workflows/e3sm-gh-ci-cime-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: gh

on:
pull_request:
branches: [ master ]
paths:
# first, yes to these
- 'cime_config/**'
- 'components/eam/**'
- 'components/elm/**'
- 'driver-moab/**'
- 'driver-mct/**'
# second, no to these
- '!components/eam/docs/**'
- '!components/eam/mkdocs.yml'
- '!components/elm/docs/**'
- '!components/elm/mkdocs.yml'

workflow_dispatch:

jobs:

ci:
if: ${{ github.event.repository.name == 'e3sm' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test:
- SMS_D_P4.ne4pg2_oQU480.F2010.singularity_gnu
- SMS_P4.ne4pg2_oQU480.F2010.singularity_gnu
- REP_P4.ne4pg2_oQU480.F2010.singularity_gnu
- ERS_P4.ne4pg2_oQU480.F2010.singularity_gnu
- ERS_P4.ne4pg2_oQU480.F2010.singularity_gnu.eam-wcprod_F2010
- ERP_P4.ne4pg2_oQU480.F2010.singularity_gnu
- PET_P4.ne4pg2_oQU480.F2010.singularity_gnu
- PEM_P4.ne4pg2_oQU480.F2010.singularity_gnu
container:
image: ghcr.io/mahf708/e3sm-imgs:v0.0.6

steps:
-
name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
submodules: recursive
-
name: CIME
working-directory: cime/scripts
run: |
mkdir -p $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/physprops/p3_lookup_table_1.dat-v4.1.2
mv p3_lookup_table_1.dat-v4.1.2 $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
export USER=test
./create_test ${{ matrix.test }} --wait --debug
-
name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ${{ matrix.test }}
path: |
~/projects/e3sm/scratch/${{ matrix.test }}*/TestStatus.log
~/projects/e3sm/scratch/${{ matrix.test }}*/bld/*.bldlog.*
~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.log.*
~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.cprnc.out
59 changes: 59 additions & 0 deletions .github/workflows/e3sm-gh-ci-w-cime-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: gh

on:
pull_request:
branches: [ master ]
paths-ignore:
- 'mkdocs.yaml'
- 'docs/**'
- 'components/*/docs/**'
- 'components/*/mkdocs.yml'

workflow_dispatch:

jobs:

ci-w:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test:
- SMS_D_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
- SMS_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
- REP_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
- ERS_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
- ERS_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu.allactive-wcprod_1850
- ERP_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
- PET_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
- PEM_P8.ne4pg2_oQU480.WCYCL2010NS.singularity_gnu
container:
image: ghcr.io/mahf708/e3sm-imgs:v0.0.6

steps:
-
name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
submodules: recursive
-
name: CIME
working-directory: cime/scripts
run: |
mkdir -p $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/physprops/p3_lookup_table_1.dat-v4.1.2
mv p3_lookup_table_1.dat-v4.1.2 $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
export USER=test
./create_test ${{ matrix.test }} --wait --debug
-
name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ${{ matrix.test }}
path: |
~/projects/e3sm/scratch/${{ matrix.test }}*/TestStatus.log
~/projects/e3sm/scratch/${{ matrix.test }}*/bld/*.bldlog.*
~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.log.*
~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.cprnc.out
28 changes: 28 additions & 0 deletions .github/workflows/e3sm-gh-md-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: markdown

# if .md files are touched in a PR, lint them!

on:
pull_request:
branches: ["master"]
paths:
- '**/*.md'

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tj-actions/changed-files@v44
id: changed-files
with:
files: '**/*.md'
separator: ","
- uses: DavidAnson/markdownlint-cli2-action@v16
if: steps.changed-files.outputs.any_changed == 'true'
with:
config: 'docs/.markdownlint.json'
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","
60 changes: 60 additions & 0 deletions .github/workflows/e3sm-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and deploy gh-pages branch with Mkdocs

on:
# Runs every time master branch is updated
push:
branches: ["master"]
# Runs every time a PR is open against master
pull_request:
branches: ["master"]
workflow_dispatch:

concurrency:
# Prevent 2+ copies of this workflow from running concurrently
group: e3sm-docs-action

jobs:
Build-and-Deploy-docs:
if: ${{ github.event.repository.name == 'e3sm' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
fetch-depth: 0 # Needed, or else gh-pages won't be fetched, and push rejected
# TODO: git rid of dependency on CIME
# TODO: another option to investigate is a sparse checkout.
# In the scream repo, all other components do not need to be checked out.
# And even in the upstream, we mainly need only components/xyz/docs (and a few more places).
submodules: true
- name: Show action trigger
run: echo "= The job was automatically triggered by a ${{github.event_name}} event on repo ${{github.event.repository.name}}."
- name: Set up Python 3.10
uses: actions/setup-python@v5.1.0
with:
python-version: "3.10"
- name: Install python deps
run: python3 -m pip install mkdocs-material pymdown-extensions mkdocs-monorepo-plugin mdutils mkdocs-bibtex
# build every time (PR or push to master)
- name: Generate EAMxx params docs
working-directory: components/eamxx/scripts
run: |
./eamxx-params-docs-autogen
- name: Build
run: mkdocs build --strict --verbose
# Only deploy to the main github page when there is a push to master
- if: ${{ github.event_name == 'push' }}
name: GitHub Pages action
uses: JamesIves/github-pages-deploy-action@v4
with:
# Do not remove existing pr-preview pages
clean-exclude: pr-preview
folder: ./site/
# If it's a PR from within the same repo, deploy to a preview page
# For security reasons, PRs from forks cannot write into gh-pages for now
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
name: Preview docs
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./site/
89 changes: 89 additions & 0 deletions .github/workflows/eamxx-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# This workflow aims to automatically rebuild eamxx documentation
# every time the master branch is updated on github and within every PR

name: EAMxx Docs

on:
# Runs every time master branch is updated
push:
branches: [ master ]
# Only if docs-related files are touched
paths:
- components/eamxx/mkdocs.yml
- components/eamxx/docs/**
- components/eamxx/cime_config/namelist_defaults_scream.xml
# Runs every time a PR is open against master
pull_request:
branches: [ master ]
# Only if docs-related files are touched
paths:
- components/eamxx/mkdocs.yml
- components/eamxx/docs/**
- components/eamxx/cime_config/namelist_defaults_scream.xml

label:
types:
- created

workflow_dispatch:

concurrency:
# Prevent 2+ copies of this workflow from running concurrently
group: eamxx-docs-action

jobs:

eamxx-docs:
if: ${{ github.event.repository.name == 'scream' }}
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
# TODO: git rid of dependency on CIME
# TODO: another option to investigate is a sparse checkout.
# In the scream repo, all other components do not need to be checked out.
# And even in the upstream, we mainly need only components/xyz/docs (and a few more places).
submodules: true

- name: Show action trigger
run: |
echo "= The job was automatically triggered by a ${{github.event_name}} event."
- name: Set up Python 3.10
uses: actions/setup-python@v5.1.0
with:
python-version: "3.10"

- name: Install Python deps
run: |
pip install mkdocs pymdown-extensions mkdocs-material mdutils
- name: Generate EAMxx params docs
working-directory: components/eamxx/scripts
run: |
./eamxx-params-docs-autogen
- name: Build docs
working-directory: components/eamxx
run: |
mkdocs build --strict --verbose
# only deploy to the main github page when there is a push to master
- if: ${{ github.event_name == 'push' }}
name: GitHub Pages action
uses: JamesIves/github-pages-deploy-action@v4
with:
# Do not remove existing pr-preview pages
clean-exclude: pr-preview
folder: ./components/eamxx/site

# If it's a PR from within the same repo, deploy to a preview page
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
name: Preview docs
uses: rossjrw/pr-preview-action@v1
with:
source-dir: components/eamxx/site/
Loading

0 comments on commit df0291b

Please sign in to comment.