Skip to content

Commit 4bee751

Browse files
dpsarmiegspetro-NOAAAlexanderRichert-NOAA
authored
Add noahmp and UFSATM hashes // Add Spack CI #2654 // PR Project Board Label Updates #2902 (#2913)
* UFSWM - Fix Atmos%iau_offset bug, remove goto statements from noahmp, add spack ci, and add changes to PR proj board * UFSATM - Set Atmos%iau_offset to iau_offset in module_fcst_grid_comp * NOAHMP - Remove goto statements and remove leftover debug write statement --------- Co-authored-by: gspetro-NOAA <gillian.petro@noaa.gov> Co-authored-by: Alexander Richert <alexander.richert@noaa.gov>
1 parent 437cf97 commit 4bee751

22 files changed

+2939
-2476
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- [ ] All subcomponent pull requests (if any) have been reviewed by their code managers.
1616
- [ ] Run the full Intel+GNU RT suite (compared to current baselines), preferably on Ursa (Derecho or Hercules are acceptable alternatives). **Exceptions:** documentation-only PRs, CI-only PRs, etc.
1717
- [ ] Commit log file w/full results from RT suite run (if applicable).
18-
- [ ] Commit 'test_changes.list' (unless file is empty).
18+
- [ ] Verify that `test_changes.list` indicates which tests, if any, are changed by this PR. Commit `test_changes.list`, even if it is empty.
1919
- [ ] Fill out all sections of this template.
2020

2121
---
@@ -68,7 +68,7 @@ Add the related UFS WM Github Issue here:
6868
<!--
6969
Provide a list of subcomponents involved with this PR and include links to subcomponent PRs.
7070
Example:
71-
* FV3: NOAA-EMC/fv3atm#734
71+
* UFSATM: NOAA-EMC/UFSATM#734
7272
* ccpp-physics: ufs-community/ccpp-physics#33
7373
* WW3: NOAA-EMC/WW3#321
7474
Delete sections that are not needed.
@@ -78,7 +78,7 @@ Delete sections that are not needed.
7878
* CICE:
7979
* CMEPS:
8080
* CMakeModules:
81-
* FV3:
81+
* UFSATM:
8282
* ccpp-physics:
8383
* atmos_cubed_sphere:
8484
* GOCART:

.github/workflows/Spack.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This is a CI workflow for the ufs-weather-model repository that builds the
2+
# modified UWM in a given PR with Spack.
3+
#
4+
# Alex Richert, Mar 2025
5+
6+
name: Spack
7+
on: [push,pull_request,workflow_dispatch]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
Spack:
15+
strategy:
16+
matrix:
17+
# See ci/package.py for variant definitions.
18+
config:
19+
- {
20+
os: "ubuntu-24.04",
21+
app: "S2SWA",
22+
ccpp_suites: "FV3_GFS_v17_coupled_p8,FV3_GFS_v17_coupled_p8_ugwpv1",
23+
other-variants: ' ^esmf@8.8.0',
24+
}
25+
- {
26+
os: "ubuntu-24.04",
27+
app: "ATM",
28+
ccpp_suites: "FV3_GFS_v16,FV3_GFS_v16_flake,FV3_GFS_v16_ras,FV3_GFS_v17_p8,FV3_GFS_v17_p8_ugwpv1",
29+
other-variants: ' ^esmf@8.8.0',
30+
}
31+
32+
runs-on: ${{ matrix.config.os }}
33+
permissions:
34+
# For repo-level build caching by NOAA-EMC/ci-test-spack-package action
35+
actions: write
36+
37+
steps:
38+
39+
- name: "Install dependencies with APT"
40+
shell: bash
41+
run: |
42+
sudo mv /usr/local /usr/local_mv # relocate so CMake doesn't pick up on bad libraries
43+
sudo apt install libopenmpi-dev openmpi-bin cmake
44+
45+
- name: "Build Spack package"
46+
uses: NOAA-EMC/ci-test-spack-package@develop
47+
with:
48+
package-name: ufs-weather-model
49+
# ufs-weather-model Spack recipe variants, plus additional package constraints:
50+
package-variants: app=${{ matrix.config.app }} ccpp_suites=${{ matrix.config.ccpp_suites }} ${{ matrix.config.other-variants }}
51+
custom-recipe: ci/package.py
52+
spack-compiler: gcc@13
53+
spack-test-flag: '' # disable 'make test' for Spack
54+
use-common-build-cache: true
55+
repo-cache-key-suffix: ${{ matrix.config.os }}-1 # Update to create and use a fresh cache
56+
save-repo-cache: ${{ matrix.config.app == 'S2SWA' }} # Only need to save cache from one job
57+
# Set to save to a different cache key than the restored one (in order to add new packages etc.).
58+
# Be sure to unset it after a new cache is generated or a new one will be created each time!
59+
repo-save-key-suffix: ''
60+
61+
# The recipe-check job validates the Spack recipe by making sure each CMake
62+
# build option is represented. If this check fails due to the addition of a
63+
# new CMake option, ci/package.py should be updated in order to make that
64+
# new build option configurable through Spack.
65+
recipe-check:
66+
67+
runs-on: ubuntu-24.04
68+
69+
steps:
70+
71+
- name: recipe-check
72+
uses: NOAA-EMC/ci-check-spack-recipe@develop
73+
with:
74+
recipe-file: package/spack/package.py
75+
cmakelists-txt: package/CMakeLists.txt
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: Project Board Updates
1+
name: Add PR to Project
22
on:
33
pull_request_target:
44
types:
55
- opened
66
- reopened
7-
- labeled
87

98
jobs:
109
add-to-project:

.github/workflows/superlinter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
LINTER_RULES_PATH: '.github/linters/'
2828
DEFAULT_BRANCH: origin/develop
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
FILTER_REGEX_EXCLUDE: .*(tests/fv3_conf/.*|tests/ci/.*|tests/auto/.*|tests/auto-jenkins/.*|tests/opnReqTests/.*|tests/opnReqTest|tests/atparse.bash).*
30+
FILTER_REGEX_EXCLUDE: .*(tests/fv3_conf/.*|tests/ci/.*|tests/auto/.*|tests/auto-jenkins/.*|tests/opnReqTests/.*|tests/opnReqTest|tests/atparse.bash|ci/package.py).*
3131
VALIDATE_BASH: true
3232
BASH_SEVERITY: style
3333
#VALIDATE_GITHUB_ACTIONS: true
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Update Project Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- reopened
7+
- labeled
8+
- unlabeled
9+
10+
jobs:
11+
baseline-labels:
12+
name: Baseline labels
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
issues: write
18+
steps:
19+
- name: Lack of baseline labels
20+
if: |
21+
!contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
22+
!contains(github.event.pull_request.labels.*.name, 'Baseline Updates') &&
23+
!contains(github.event.pull_request.labels.*.name, 'New Baselines')
24+
uses: nipe0324/update-project-v2-item-field@v2.0.2
25+
with:
26+
project-url: https://github.com/orgs/ufs-community/projects/70
27+
github-token: ${{ secrets.PR_PROJECT_TOKEN }}
28+
field-name: 'Baseline Changes'
29+
field-value: 'Unknown'
30+
- name: Contradictory labels
31+
if: |
32+
contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
33+
(contains(github.event.pull_request.labels.*.name, 'Baseline Updates') ||
34+
contains(github.event.pull_request.labels.*.name, 'New Baselines'))
35+
uses: nipe0324/update-project-v2-item-field@v2.0.2
36+
with:
37+
project-url: https://github.com/orgs/ufs-community/projects/70
38+
github-token: ${{ secrets.PR_PROJECT_TOKEN }}
39+
field-name: 'Baseline Changes'
40+
field-value: 'Unknown'
41+
- name: Baseline changes labels
42+
if: |
43+
!contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
44+
( contains(github.event.pull_request.labels.*.name, 'Baseline Updates') ||
45+
contains(github.event.pull_request.labels.*.name, 'New Baselines') )
46+
uses: nipe0324/update-project-v2-item-field@v2.0.2
47+
with:
48+
project-url: https://github.com/orgs/ufs-community/projects/70
49+
github-token: ${{ secrets.PR_PROJECT_TOKEN }}
50+
field-name: 'Baseline Changes'
51+
field-value: 'Yes'
52+
- name: No baseline changes label
53+
if: |
54+
contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
55+
!contains(github.event.pull_request.labels.*.name, 'Baseline Updates') &&
56+
!contains(github.event.pull_request.labels.*.name, 'New Baselines')
57+
uses: nipe0324/update-project-v2-item-field@v2.0.2
58+
with:
59+
project-url: https://github.com/orgs/ufs-community/projects/70
60+
github-token: ${{ secrets.PR_PROJECT_TOKEN }}
61+
field-name: 'Baseline Changes'
62+
field-value: 'No'
63+
data-labels:
64+
name: Input data
65+
runs-on: ubuntu-latest
66+
permissions:
67+
contents: read
68+
pull-requests: write
69+
issues: write
70+
steps:
71+
- name: Input data required
72+
if: contains(github.event.pull_request.labels.*.name, 'Input Data Changes')
73+
uses: nipe0324/update-project-v2-item-field@v2.0.2
74+
with:
75+
project-url: https://github.com/orgs/ufs-community/projects/70
76+
github-token: ${{ secrets.PR_PROJECT_TOKEN }}
77+
field-name: "Input Data Req'd"
78+
field-value: 'Yes'
79+
- name: No input data changes
80+
if: (!contains(github.event.pull_request.labels.*.name, 'Input Data Changes'))
81+
uses: nipe0324/update-project-v2-item-field@v2.0.2
82+
with:
83+
project-url: https://github.com/orgs/ufs-community/projects/70
84+
github-token: ${{ secrets.PR_PROJECT_TOKEN }}
85+
field-name: "Input Data Req'd"
86+
field-value: 'No'

UFSATM

ci/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This directory contains package.py, a local copy of the ufs-weather-model Spack recipe: https://github.com/spack/spack-packages/blob/develop/repos/spack_repo/builtin/packages/ufs_weather_model/package.py
2+
3+
It will not need frequent updates, but it is used by the GitHub Actions workflow under .github/workflows/Spack.yml. It only needs updates for changes to minimum version requirements, new dependencies, and new build options. In package.py, `depends_on("esmf@8.8.0:", when="@develop")` for example means that the minimum version that Spack will consider using for UFS Weather Model's ESMF dependency is 8.8.0. These minimum versions should generally track with what is in CMakeLists.txt, though in practice, Spack will typically attempt to use the most recent release of a package available in that package's recipe.

0 commit comments

Comments
 (0)