Try to change GH check name #42
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
name: eamxx-v1 | ||
on: | ||
# Runs on PRs against master | ||
pull_request: | ||
branches: [ master ] | ||
types: [opened, synchronize, ready_for_review, reopened] | ||
# Manual run is used to bless | ||
workflow_dispatch: | ||
inputs: | ||
jobs_list: | ||
description: 'Job to run' | ||
required: true | ||
type: choice | ||
options: | ||
- cpu-gcc | ||
bless: | ||
description: 'Generate baselines' | ||
required: true | ||
type: boolean | ||
concurrency: | ||
# Two runs are in the same group if: | ||
# - they have the same trigger | ||
# - if trigger=pull_request, the PR number must match | ||
# - if trigger=workflow_dispatch, the inputs are the same | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ | ||
github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id | ||
}} | ||
cancel-in-progress: true | ||
jobs: | ||
cpu-gcc: | ||
runs-on: [self-hosted, gcc, ghci-snl-cpu] | ||
strategy: | ||
matrix: | ||
test: | ||
- full_name: ERS_Ln9.ne4_ne4.F2000-SCREAMv1-AQP1.ghci-snl-cpu_gnu.scream-output-preset-2 | ||
short_name: ERS-ne4-SCREAMv1-AQP1 | ||
- ERS_P16_Ln22.ne30pg2_ne30pg2.FIOP-SCREAMv1-DP.ghci-snl-cpu_gnu.scream-dpxx-arm97 | ||
short_name: ERS-ne30pg2-SCREAMv1-DP | ||
- ERS_Ln22.ne4pg2_ne4pg2.F2010-SCREAMv1.ghci-snl-cpu_gnu.scream-small_kernels--scream-output-preset-5 | ||
short_name: ERS-ne4pg2-SCRAMv1-small-kernels | ||
fail-fast: false | ||
name: cpu-gcc-${{ matrix.test.short_name }} | ||
# Run this workflow if: | ||
# - workflow_dispatch: user requested this job. | ||
# - schedule: always: | ||
# - pull_request: matching skip label is NOT found | ||
if: | | ||
${{ | ||
github.event_name == 'schedule' || | ||
( github.event_name == 'workflow_dispatch' && contains(github.event.inputs.jobs_list, 'gcc-openmp') ) || | ||
( | ||
github.event_name == 'pull_request' && | ||
!( | ||
contains(github.event.pull_request.labels.*.name, 'AT: skip gcc') || | ||
contains(github.event.pull_request.labels.*.name, 'AT: skip v1') | ||
) | ||
) | ||
}} | ||
steps: | ||
- name: Show action trigger | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const eventName = context.eventName; | ||
const eventAction = context.payload.action || 'N/A'; | ||
const actor = context.actor; | ||
console.log(`The job was triggered by a ${eventName} event.`); | ||
console.log(` - Event action: ${eventAction}`); | ||
console.log(` - Triggered by: ${actor}`); | ||
- 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 | ||
- name: Establish cmp/gen flag | ||
run: | | ||
dir_suffix=".C" | ||
cmp_gen_flag="-c" | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ ${{ inputs.bless }} ]; then | ||
cmp_gen_flag="-o -g" | ||
dir_suffix=".G" | ||
fi | ||
fi | ||
echo "flags=$cmp_gen_flag -b master" >> $GITHUB_ENV | ||
echo "folder_suffix=$dir_suffix" >> $GITHUB_ENV | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
show-progress: false | ||
submodules: recursive | ||
- name: Run test | ||
run: | | ||
./cime/scripts/create_test ${{ matrix.test.full_name }} ${{ env.flags }} --wait | ||
- name: Upload case files | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.test.full_name }} | ||
path: | | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/TestStatus.log | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/bld/*.bldlog.* | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/bld/case2bld/*.bldlog.* | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/run/*.log.* | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/run/case2run/*.log.* | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/run/*.cprnc.out | ||
/projects/e3sm/scratch/${{ matrix.test.full_name }}${{ env.folder_suffix }}*/run/case2run/*.cprnc.out | ||
env: | ||
NODE_EXTRA_CA_CERTS: ${{ env.NODE_EXTRA_CA_CERTS }} | ||
- name: Clean up | ||
if: ${{ always() }} | ||
run: | | ||
rm -rf /projects/e3sm/scratch/${{ matrix.test.full_name }}* |