Skip to content

[NDSL] GFDL 1M refactor and cleanup + update to NDSL 20251100 + Local #195

[NDSL] GFDL 1M refactor and cleanup + update to NDSL 20251100 + Local

[NDSL] GFDL 1M refactor and cleanup + update to NDSL 20251100 + Local #195

Workflow file for this run

name: NDSL Lint & Translate Tests
on:
pull_request:
branches: [ dsl/develop ]
workflow_dispatch:
# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
main:
env:
DATA_PATH: ./test_data/11.5.2/TBC_C24_L72/moist
DATA_URL: "https://portal.nccs.nasa.gov/datashare/astg/smt/geos-fp/translate/11.5.2/x86_GNU/Moist/TBC_C24L72.tar.gz"
runs-on: ubuntu-latest
steps:
- name: Checkout NDSL
uses: actions/checkout@master
with:
repository: NOAA-GFDL/NDSL
submodules: 'recursive'
path: '${{ github.workspace }}/ndsl'
- name: Checkout repository
uses: actions/checkout@master
with:
submodules: 'recursive'
path: '${{ github.workspace }}/GCMGridComp'
- name: Step Python 3.11.9
uses: actions/[email protected]
with:
python-version: '3.11.9'
- name: Install OpenMPI for gt4py
run: |
sudo apt-get install libopenmpi-dev
- name: Install Python packages
run: |
python -m pip install --upgrade pip setuptools wheel pre-commit
cd ${{ github.workspace }}/ndsl
pip install -e .[develop]
cd ${{ github.workspace }}/GCMGridComp
pip install -e ./GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
- name: Run lint via pre-commit
run: |
cd ${{ github.workspace }}/GCMGridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
pre-commit run --all-files
- name: Download test_data (if not cached)
run: |
cd ${{ github.workspace }}/GCMGridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
mkdir -p ${{ env.DATA_PATH }} && cd ${{ env.DATA_PATH }}
wget ${{ env.DATA_URL }}
tar -xzvf TBC_C24L72.tar.gz
- name: Run all tests
run: |
cd ${{ github.workspace }}/GCMGridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/tests/scripts/
./run_all.sh ../../${{ env.DATA_PATH }} dace:cpu_kfirst