Skip to content

NASA/NOAA pyFV3 repository build test #3002

NASA/NOAA pyFV3 repository build test

NASA/NOAA pyFV3 repository build test #3002

Workflow file for this run

name: NASA/NOAA pyFV3 repository build test
on:
push:
branches: [ main, ci-fix, romanc/stree-v2 ]
pull_request:
branches: [ main, ci-fix, romanc/stree-v2 ]
merge_group:
branches: [ main, ci-fix, romanc/stree-v2 ]
defaults:
run:
shell: bash
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
env:
UV_FROZEN: 1 # sync without updating uv.lock
UV_NO_DEV: 1 # don't install dev dependency group by default
UV_NO_EDITABLE: 1 # don't install dace in editable mode
jobs:
configure:
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'no-ci')"
name: "Read test configuration"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout to repository
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
pyproject-file: pyproject.toml
cache-dependency-glob: pyproject.toml
- name: Set matrix data
id: set-matrix
run: echo "matrix={\"include\":$(jq -c . < .github/workflows/pyFV3-regression-matrix.json)}" >> $GITHUB_OUTPUT
build_and_validate_pyFV3:
runs-on: ubuntu-latest
needs: configure
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
name: "${{ matrix.module }} regression test"
steps:
- name: Checkout pyFV3
uses: actions/checkout@v7
with:
repository: 'NOAA-GFDL/pyFV3'
path: 'pyFV3'
- name: Checkout dace
uses: actions/checkout@v7
with:
path: 'dace'
submodules: 'recursive'
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: 3.12
enable-cache: true
pyproject-file: dace/pyproject.toml
cache-dependency-glob: dace/pyproject.toml
- name: Install OpenMPI
run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev openmpi-bin
# We install `dace` after `pyFV3` to build pyFV3 with the current version of DaCe
- name: Install pyFV3 and dace
run: |
uv venv
uv pip install ./pyFV3[ndsl,test]
uv pip install ./dace
- name: Download data
# Skip "Riemann Solver on D-grid" (currently failing)
if: ${{ !startsWith(matrix.module, 'Riem_Solver3') }}
run: |
mkdir -p pyFV3/test_data
cd pyFV3/test_data
wget --retry-connrefused https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/${{ matrix.archive }}
tar -xzvf ${{ matrix.archive }}
cd ../..
- name: "Regression test: ${{ matrix.name }}"
# Skip "Riemann Solver on D-grid" (currently failing)
if: ${{ !startsWith(matrix.module, 'Riem_Solver3') }}
env:
FV3_DACEMODE: BuildAndRun
NDSL_LOGLEVEL: Debug
run: |
source .venv/bin/activate
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=orch:dace:cpu:KIJ --which_modules=${{ matrix.module }} \
${{ matrix.extra_args }} \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/tests/savepoint