Skip to content

Commit

Permalink
New CI cloud cluster and support multiple commits on same PR (#304)
Browse files Browse the repository at this point in the history
* Update SHiELD_parallelworks_intel.yml

* Update and rename daily_cleanup_parallelworks.yaml to daily_cleanup_parallelworks.yml

* Update to cancel in process ci

* Update to only run on main repo and not forks
  • Loading branch information
laurenchilutti authored Nov 7, 2023
1 parent efcb02f commit 9a4a538
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/SHiELD_parallelworks_intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,29 @@ on:
# run weekly on Sunday
schedule:
- cron: '0 0 * * 0'

#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/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
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 $GITHUB_REF sleep 20m &
- run: /contrib/fv3/GFDL_atmos_cubed_sphere_CI/checkout.sh $GITHUB_REF
- run: salloc --partition=p2 -N 46 -J $GITHUB_SHA sleep 20m &
- run: /contrib/fv3/GFDL_atmos_cubed_sphere_CI/checkout.sh $GITHUB_REF $GITHUB_SHA

build:
runs-on: [self-hosted,devcimultiintel]
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: SOLO SHiELD build
needs: [checkout]
strategy:
Expand All @@ -43,10 +51,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/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: SOLO SHiELD test suite
needs: [checkout, build]
strategy:
Expand Down Expand Up @@ -97,15 +106,15 @@ jobs:
- d96_500m.solo.mtn_schar.sh
steps:
# This will end the slurm job started in the checkout job
- run: scancel -n $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/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: Shutdown Processes
if: always()
needs: [checkout, build, test]
strategy:
fail-fast: false
Expand Down Expand Up @@ -148,7 +157,7 @@ jobs:
- d96_2k.solo.bubble
- d96_500m.solo.mtn_schar
steps:
- run: scancel -n $GITHUB_REF
- run: scancel -n $GITHUB_SHA
- env:
TEST: ${{ matrix.test }}
run: scancel -n $TEST
JOB: ${{ github.sha }}_${{ matrix.test }}
run: scancel -n $JOB
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Old Build Cleanup

# This GitHub Action Workflow is runing on the devcimultiintel cluster
# This GitHub Action Workflow is runing on the GFDL_ACS_CIINTEL cluster
# This will delete all build directories older than 30 days
# Build directories are on the cloud at /contrib/fv3/2023.2.0

Expand All @@ -11,7 +11,8 @@ on:

jobs:
delete:
runs-on: [self-hosted, devcimultiintel]
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: Delete Builds
steps:
- run: find /contrib/fv3/2023.2.0/GFDL_atmos_cubed_sphere/refs/pull -maxdepth 1 -mindepth 1 -mtime +30 -type d -print -delete

0 comments on commit 9a4a538

Please sign in to comment.