Skip to content

Commit

Permalink
try a reusable step
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 15, 2024
1 parent 5d96dbe commit 6708013
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/derecho.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,25 @@ on:
types: [ labeled ]

jobs:
build:
setup:
if: ${{ github.event.label.name == 'run-pr-tests' }}
runs-on: hpc-runner

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run git-fleximod
run: |
pwd
module list
./bin/git-fleximod update
reusable:
needs: [setup]
strategy:
matrix:
compiler: [intel, intel-oneapi, gnu, nvhpc]
# compiler: [intel, intel-oneapi, gnu, nvhpc]
compiler: [intel, intel-oneapi]
env:
CC: mpicc
FC: mpifort
Expand All @@ -21,18 +34,8 @@ jobs:
CIME_DRIVER: nuopc
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run git-fleximod
run: |
pwd
module list
./bin/git-fleximod update
- name: Run ${{ matrix.compiler }} tests
continue-on-error: true
run: |
pwd
cd cime/scripts
module load cmake
qcmd -v PROJECT=P93300606 -A P93300606 -l walltime=02:00:00 -- ./create_test --xml-machine derecho --xml-category github --no-run --compiler ${{ matrix.compiler }}
uses ESCOMP/CESM/.github/workflows/reusable.yaml@mail
with:
stage: ${{ matrix.compiler }}


21 changes: 21 additions & 0 deletions .github/workflows/reusable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
workflow_call:
inputs:
compiler:
required: true
type: string
jobs:
test:
runs-on: hpc-runner
steps:
- name: Run ${{ inputs.compiler }} tests
continue-on-error: true
run: |
pwd
cd cime/scripts
module load cmake
qcmd -v PROJECT=P93300606 -A P93300606 -l walltime=02:00:00 -- ./create_test --xml-machine derecho --xml-category github --no-run --compiler ${{ matrix.compiler }} --test-id ghtest.${{ inputs.compiler }}
- name: check status
run: |
cd $SCRATCH
./cs.status.ghtest.${{ inputs.compiler }} --expected-fails-file ghtest.expected_fails.${{ inputs.compiler }}
4 changes: 2 additions & 2 deletions cime_config/testlist_allactive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<option name="wallclock"> 00:30:00 </option>
</options>
</test>

<!-- These are not defined in config_compsets.xml
<test name="SMS_Ld2" grid="ne30pg3_t232" compset="B1850C_HTs1" testmods="allactive/defaultio">
<machines>
<machine name="derecho" compiler="intel" category="github"/>
Expand All @@ -121,7 +121,7 @@
<option name="wallclock"> 00:30:00 </option>
</options>
</test>

-->
<test name="SMS_Ld2" grid="ne30pg3_t232" compset="B1850C_LTso" testmods="allactive/defaultio">
<machines>
<machine name="derecho" compiler="intel" category="github"/>
Expand Down

0 comments on commit 6708013

Please sign in to comment.