Skip to content

Commit

Permalink
Merge branch 'mahf708/ig/upgrade-gh-workflows' (PR E3SM-Project#6686)
Browse files Browse the repository at this point in the history
Adds concurrency checks so that only one version of each workflow is running from the same type of event. Ensures 
these workflows only run in E3SM-Project/E3SM for now. Also upgrades container for f and w cases to add new lnd files
that were made default recently.

Fixes E3SM-Project#6652
  • Loading branch information
rljacob authored Oct 24, 2024
2 parents accee4c + aef19a4 commit 2696ad0
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 13 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/e3sm-gh-ci-cime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ on:

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:

ci:
if: ${{ github.event.repository.name == 'e3sm' }}
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -36,7 +40,7 @@ jobs:
- SMS_D_Ln5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu
- ERS_Ld5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu.eamxx-prod
container:
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.2.0

steps:
-
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/e3sm-gh-ci-w-cime-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: gh
name: gh-w

on:
pull_request:
Expand All @@ -11,10 +11,14 @@ on:

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:

ci-w:
if: ${{ github.event.repository.name == 'e3sm' }}
ci:
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -23,7 +27,7 @@ jobs:
- SMS_D_Ld1_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu
- ERS_Ld3_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu.allactive-wcprod_1850
container:
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.2.0

steps:
-
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/e3sm-gh-md-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ on:
# for now let's not lint files in eamxx
- '!components/eamxx/**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
linter:
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e3sm-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
Build-and-Deploy-docs:
if: ${{ github.event.repository.name == 'e3sm' }}
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/e3sm-gh-tools-mkatmsrffile-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ on:
- cron: '00 15 * * 2'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
mkatmsrffile-test:
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -31,18 +36,15 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: "envmkatmsrffile"
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
mamba-version: "*"
channel-priority: strict
auto-update-conda: true
python-version: 3.11
-
name: Install dependencies
run: |
echo $CONDA_PREFIX
mamba install -y nco xarray numba numpy netcdf4
conda install -y nco xarray numba numpy netcdf4 -c conda-forge
-
name: Run tests
working-directory: components/eam/tools/mkatmsrffile
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/eamxx-gh-ci-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ on:

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:

ci:
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eamxx-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ concurrency:
jobs:

eamxx-docs:
if: ${{ github.event.repository.name == 'scream' }}
if: ${{ github.repository == 'E3SM-Project/scream' }}
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/eamxx_default_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ on:
- cron: '00 00 * * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
scream-defaults:
if: ${{ github.event.repository.name == 'e3sm' }}
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
runs-on: ubuntu-latest
outputs:
event_name: ${{ github.event_name }}
Expand Down

0 comments on commit 2696ad0

Please sign in to comment.