Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for CI #38

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
bensonr marked this conversation as resolved.
Show resolved Hide resolved

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
bensonr marked this conversation as resolved.
Show resolved Hide resolved
- 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 "{}" \;