Skip to content

Commit

Permalink
Updates for CI (#38)
Browse files Browse the repository at this point in the history
* Update Intel_Parallelworks_CI.yaml

* Update daily_cleanup_parallelworks.yaml

* Update Intel_Parallelworks_CI.yaml comments
  • Loading branch information
laurenchilutti authored Jan 11, 2024
1 parent 67346b0 commit e32c07e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/Intel_Parallelworks_CI.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Compile SHiELD SOLO and run tests

# This GitHub Action Workflow is running on the cloud devcimultiintel cluster
# This GitHub Action Workflow is running on the cloud shieldphysicsciintel cluster
# The tests are run inside of a container with the following software/libraries:
# -intel: 2023.2.0
# -hdf5: 1.14.0
Expand All @@ -13,21 +13,29 @@ on:
pull_request:
branches:
- main

#this should cancel in progress ci runs for the same PR
#(e.g. a second commit on the same PR comes in while CI is still running)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checkout:
runs-on: [self-hosted, devcimultiintel]
if: github.repository == 'NOAA-GFDL/SHiELD_physics'
runs-on: [shieldphysicsciintel]
name: Checkout Code
steps:
# It can take a long time (5-15 minutes) to spinup nodes
# so this salloc will prompt 46 nodes to startup and stay active for 20 min
# this is enough nodes for the first 17 tests to run in parallel, and we
# have 17 runners configured.
- run: salloc --partition=p2 -N 46 -J SP_$GITHUB_REF sleep 20m &
- run: /contrib/fv3/SHiELD_physics_CI/checkout.sh $GITHUB_REF
- run: salloc --partition=p2 -N 46 -J $GITHUB_SHA sleep 20m &
- run: /contrib/fv3/SHiELD_physics_CI/checkout.sh $GITHUB_REF $GITHUB_SHA

build:
runs-on: [self-hosted,devcimultiintel]
if: github.repository == 'NOAA-GFDL/SHiELD_physics'
runs-on: [shieldphysicsciintel]
name: SOLO SHiELD build
needs: [checkout]
strategy:
Expand All @@ -40,10 +48,11 @@ jobs:
- env:
RUNPATH: ${{ matrix.runpath }}
RUNSCRIPT: ${{ matrix.runscript }}
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF $GITHUB_SHA

test:
runs-on: [self-hosted, devcimultiintel]
if: github.repository == 'NOAA-GFDL/SHiELD_physics'
runs-on: [shieldphysicsciintel]
name: SOLO SHiELD test suite
needs: [checkout, build]
strategy:
Expand Down Expand Up @@ -94,15 +103,15 @@ jobs:
- d96_500m.solo.mtn_schar.sh
steps:
# This will end the slurm job started in the checkout job
- run: scancel -n SP_$GITHUB_REF
- run: scancel -n $GITHUB_SHA
- env:
RUNPATH: ${{ matrix.runpath }}
RUNSCRIPT: ${{ matrix.runscript }}
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF $GITHUB_SHA
shutdown:
runs-on: [self-hosted, devcimultiintel]
if: always() && github.repository == 'NOAA-GFDL/SHiELD_physics'
runs-on: [shieldphysicsciintel]
name: Shutdown Processes
if: always()
needs: [checkout, build, test]
strategy:
fail-fast: false
Expand Down Expand Up @@ -145,7 +154,7 @@ jobs:
- d96_2k.solo.bubble
- d96_500m.solo.mtn_schar
steps:
- run: scancel -n SP_$GITHUB_REF
- run: scancel -n $GITHUB_SHA
- env:
TEST: ${{ matrix.test }}
run: scancel -n SP_$GITHUB_REF_$TEST
JOB: ${{ github.sha }}_${{ matrix.test }}
run: scancel -n $JOB
5 changes: 3 additions & 2 deletions .github/workflows/daily_cleanup_parallelworks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:

jobs:
delete:
runs-on: [self-hosted, devcimultiintel]
if: github.repository == 'NOAA-GFDL/SHiELD_physics'
runs-on: [shieldphysicsciintel]
name: Delete Builds
steps:
- run: find /contrib/fv3/2023.2.0/SHiELD_physics/refs/pull -maxdepth 1 -mindepth 1 -mtime +30 -type d -print -delete
- run: find /contrib/fv3/2023.2.0/SHiELD_physics/refs/pull -maxdepth 1 -mindepth 1 -mtime +30 -type d -print -exec rm -rf "{}" \;

0 comments on commit e32c07e

Please sign in to comment.