Skip to content

Commit cdde3e0

Browse files
committed
Workflows: skip eamxx v1/sa testing on draft PRs
1 parent cc4a3e5 commit cdde3e0

File tree

2 files changed

+10
-32
lines changed

2 files changed

+10
-32
lines changed

.github/workflows/eamxx-standalone-testing.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -93,42 +93,24 @@ jobs:
9393
fail-fast: false
9494
matrix:
9595
build_type: [sp, dbg, opt]
96-
# Run this workflow if:
97-
# - workflow_dispatch: user requested this job.
98-
# - schedule: always:
99-
# - pull_request: matching skip label is NOT found
100-
if: |
101-
${{
102-
github.event_name == 'schedule' ||
103-
( github.event_name == 'workflow_dispatch' && github.event.inputs.jobs_list == 'gcc-cuda' ) ||
104-
(
105-
github.event_name == 'pull_request' &&
106-
!(
107-
contains(github.event.pull_request.labels.*.name, 'AT: skip gcc') ||
108-
contains(github.event.pull_request.labels.*.name, 'AT: skip cuda') ||
109-
contains(github.event.pull_request.labels.*.name, 'AT: skip eamxx-sa') ||
110-
contains(github.event.pull_request.labels.*.name, 'AT: skip eamxx-all')
111-
)
112-
)
113-
}}
96+
if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.jobs_list != 'gcc-cuda') }}
11497
name: gcc-cuda / ${{ matrix.build_type }}
11598
steps:
116-
- name: Show action trigger
117-
uses: actions/github-script@v7
118-
with:
119-
script: |
120-
const eventName = context.eventName;
121-
const eventAction = context.payload.action || 'N/A';
122-
const actor = context.actor;
123-
console.log(`The job was triggered by a ${eventName} event.`);
124-
console.log(` - Event action: ${eventAction}`);
125-
console.log(` - Triggered by: ${actor}`);
12699
- name: Check out the repository
127100
uses: actions/checkout@v4
128101
with:
129102
persist-credentials: false
130103
show-progress: false
131104
submodules: recursive
105+
- name: Show action trigger
106+
uses: ./.github/actions/show-workflow-trigger
107+
- name: Check for skip labels
108+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_review' }}
109+
uses: ./.github/actions/check-skip-labels
110+
with:
111+
skip_labels: 'AT: skip gcc,AT: skip cuda,AT: skip eamxx-sa,AT: skip eamxx-all'
112+
token: ${{ secrets.GITHUB_TOKEN }}
113+
pr_number: ${{ github.event.pull_request.number }}
132114
- name: Set test-all inputs based on event specs
133115
run: |
134116
echo "submit=false" >> $GITHUB_ENV

.github/workflows/eamxx-v1-testing.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ jobs:
5454
short_name: SMS_D_Ln5.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.scream-mam4xx-all_mam4xx_procs
5555
fail-fast: false
5656
name: cpu-gcc / ${{ matrix.test.short_name }}
57-
# Run this workflow if:
58-
# - workflow_dispatch: user requested this job.
59-
# - schedule: always:
60-
# - pull_request/pull_request_review: matching skip label is NOT found
6157
if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.jobs_list != 'cpu-gcc') }}
6258
steps:
6359
- name: Check out the repository

0 commit comments

Comments
 (0)