Skip to content

Commit

Permalink
Merge branch 'E3SM-Project:master' into stephenprice/glc/update-glc-b…
Browse files Browse the repository at this point in the history
…udgets-new
  • Loading branch information
stephenprice authored Dec 5, 2024
2 parents 7b42c2e + f0aef17 commit 84862b6
Show file tree
Hide file tree
Showing 837 changed files with 35,151 additions and 23,011 deletions.
3 changes: 3 additions & 0 deletions .github/actions/show-workflow-trigger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Composite action to show the trigger of a workflow

If possible, prints also the user that triggered it
27 changes: 27 additions & 0 deletions .github/actions/show-workflow-trigger/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Show workflow trigger'
description: 'Prints what triggered this workflow'

runs:
using: "composite"
steps:
- name: Print trigger info
uses: actions/github-script@v7
with:
script: |
const eventName = context.eventName;
const actor = context.actor || 'unknown'; // Default to 'unknown' if actor is not defined
let eventAction = 'N/A';
// Determine the event action based on the event type
if (eventName === 'pull_request') {
eventAction = context.payload.action || 'N/A';
} else if (eventName === 'pull_request_review') {
eventAction = context.payload.review.state || 'N/A';
} else if (eventName === 'workflow_dispatch') {
eventAction = 'manual trigger';
} else if (eventName === 'schedule') {
eventAction = 'scheduled trigger';
}
console.log(`The job was triggered by a ${eventName} event.`);
console.log(` - Event action: ${eventAction}`);
console.log(` - Triggered by: ${actor}`);
33 changes: 33 additions & 0 deletions .github/actions/test-all-scream/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Composite action to call test-all-scream inside a workflow

This action is meant to be used inside a workflow. E.g.,

```yaml
jobs:
my-testing:
steps:
...
- name: run-test-all-scream
uses: ./.github/actions/eamxx-test-all-scream
with:
build_type: <build-type>
machine: <machine>
run_type: <run-type>
```
The input run_type is the only input that this action has to explicitly handle.
As such, this action checks that its value is one of the following.
- nightly: runs tests and then submit to cdash
- at-run: runs tests without submitting to cdash
- bless: runs tests and copy output files to baselines folder
As for build_type and machine, we do not prescribe a list of
valid values, as that will be handled by components/eamxx/scripts/test-all-scream.
If their values are not supported, it is up to test-all-scram to handle the error.
As a guideline, however, you may have to ensure that the following exist:
- the file components/eamxx/cmake/machine-files/${machine}.cmake
- the entry ${machine} in the MACHINE_METADATA dict in components/eamxx/scripts/machine_specs.py
Questions? Contact Luca Bertagna [[email protected]](mailto:[email protected])
104 changes: 104 additions & 0 deletions .github/actions/test-all-scream/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: EAMxx standalone testing
description: |
Run EAMxx standalone testing with required configuration inputs.
More precisely, it launches test-all-scream with the proper flags.
See components/eamxx/scripts/test-all-scream for more details.
The configuration inputs are:
- build_type: the type of build to pass to test-all-scream.
- machine: the name of the machine to pass to test-all-scream
- generate: whether to generate baselines
- submit: whether to submit to cdash (unused if generate is 'true')
inputs:
build_type:
description: 'Build type to run'
required: true
machine:
description: 'Machine name for test-all-scream'
required: true
generate:
description: 'Generate baselines instead of running tests'
required: true
default: 'false'
valid_values:
- 'true'
- 'false'
submit:
description: 'Submit results to cdash (unused if generate=true)'
required: true
default: 'false'
valid_values:
- 'true'
- 'false'
cmake-configs:
description: 'Semicolon-separated list of key=value pairs for CMake to pass to test-all-scream'
required: false
default: ''

runs:
using: "composite"
steps:
- name: Set CA certificates env var
run: |
# Ensure the operating system is Linux
if [ "$(uname)" != "Linux" ]; then
echo "This action only supports Linux."
exit 1
fi
# Set env var to be used in upload-artifacts phase
if [ -f /etc/debian_version ]; then
echo "NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt" >> $GITHUB_ENV
elif [ -f /etc/redhat-release ] || [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then
echo "NODE_EXTRA_CA_CERTS=/etc/pki/tls/certs/ca-bundle.crt" >> $GITHUB_ENV
else
echo "Unsupported Linux distribution"
exit 1
fi
shell: sh
- name: Check repo presence
run: |
if [ ! -d ".git" ]; then
echo "Repository is not checked out. Please ensure the repository is checked out before running this action."
exit 1
fi
shell: sh
- name: Print build specs
run: |
echo "Testing EAMxx standalone, for the following configuration:"
echo " build type : ${{ inputs.build_type }}"
echo " machine : ${{ inputs.machine }}"
echo " generate : ${{ inputs.generate }}"
echo " submit : ${{ inputs.submit }}"
echo " cmake-configs: ${{ inputs.cmake-configs }}"
shell: sh
- name: Run test-all-scream
working-directory: components/eamxx
run: |
cmd="./scripts/test-all-scream -m ${{ inputs.machine }} -t ${{inputs.build_type}} --baseline-dir AUTO -c EKAT_DISABLE_TPL_WARNINGS=ON"
if [ "${{ inputs.generate }}" = "true" ]; then
cmd+=" -g"
elif [ "${{ inputs.submit }}" = "true" ]; then
cmd+=" -s"
fi
# If cmake-configs is non-empty, add tokens to test-all-scream via "-c key=val"
IFS=';' read -ra configs <<< "${{ inputs.cmake-configs }}"
for config in "${configs[@]}"; do
cmd+=" -c $config"
done
# Print the full command, then run it
echo "test-all-scream call: $cmd"
$cmd
shell: sh
- name: Upload ctest logs
if: always()
uses: actions/upload-artifact@v4
with:
name: log-files-${{ inputs.build_type }}-${{ inputs.machine }}
path: |
components/eamxx/ctest-build/*/Testing/Temporary/Last*.log
components/eamxx/ctest-build/*/ctest_resource_file.json
components/eamxx/ctest-build/*/CMakeCache.txt
env:
NODE_EXTRA_CA_CERTS: ${{ env.NODE_EXTRA_CA_CERTS }}
5 changes: 1 addition & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ updates:
schedule:
interval: "weekly"
assignees:
- "rljacob"
- "bartgol"
reviewers:
- "mahf708"
- "bartgol"
labels:
- "AT: Integrate Without Testing"
12 changes: 9 additions & 3 deletions .github/workflows/e3sm-gh-ci-cime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: gh

on:
pull_request:
branches: [ master ]
branches:
- master
- maint-3.0
paths:
# first, yes to these
- '.github/workflows/e3sm-gh-ci-cime-tests.yml'
Expand All @@ -22,10 +24,14 @@ on:

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:

ci:
if: ${{ github.event.repository.name == 'e3sm' }}
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -36,7 +42,7 @@ jobs:
- SMS_D_Ln5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu
- ERS_Ld5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu.eamxx-prod
container:
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.2.1

steps:
-
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/e3sm-gh-ci-w-cime-tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: gh
name: gh-w

on:
pull_request:
branches: [ master ]
branches:
- master
- maint-3.0
paths-ignore:
- 'mkdocs.yaml'
- 'docs/**'
Expand All @@ -11,10 +13,14 @@ on:

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:

ci-w:
if: ${{ github.event.repository.name == 'e3sm' }}
ci:
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -23,7 +29,7 @@ jobs:
- SMS_D_Ld1_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu
- ERS_Ld3_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu.allactive-wcprod_1850
container:
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.2.1

steps:
-
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/e3sm-gh-md-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ on:
branches: ["master"]
paths:
- '**/*.md'
# for now let's not lint files in eamxx
- '!components/eamxx/**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
linter:
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -22,7 +25,7 @@ jobs:
with:
files: '**/*.md'
separator: ","
- uses: DavidAnson/markdownlint-cli2-action@v17
- uses: DavidAnson/markdownlint-cli2-action@v18
if: steps.changed-files.outputs.any_changed == 'true'
with:
config: 'docs/.markdownlint.json'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e3sm-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
Build-and-Deploy-docs:
if: ${{ github.event.repository.name == 'e3sm' }}
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/e3sm-gh-tools-mkatmsrffile-test.yml

This file was deleted.

Loading

0 comments on commit 84862b6

Please sign in to comment.