-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'E3SM-Project:master' into stephenprice/glc/update-glc-b…
…udgets-new
- Loading branch information
Showing
837 changed files
with
35,151 additions
and
23,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.