Addition of License File #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "PySHiELD translate tests" | |
on: | |
workflow_call: | |
inputs: | |
component_trigger: | |
type: boolean | |
default: false | |
required: false | |
component_name: | |
type: string | |
default: '' | |
required: false | |
pull_request: | |
# cancel running jobs if theres a newer push | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pyshield_translate_tests: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/noaa-gfdl/miniforge:mpich | |
steps: | |
- name: external trigger Checkout pySHiELD | |
if: ${{inputs.component_trigger}} | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
repository: NOAA-GFDL/PySHiELD | |
path: pySHiELD | |
ref: develop | |
- name: Checkout hash that triggered CI | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
path: pySHiELD/${{inputs.component_name}} | |
- name: external trigger Install packages for FV3 component | |
if : ${{contains(inputs.component_name, 'FV3')}} | |
run : | | |
cd ${GITHUB_WORKSPACE}/pySHiELD | |
pip3 install --upgrade pip setuptools wheel | |
cd ${{inputs.component_name}} && pip3 install .[test] && cd .. | |
pip3 install .[ndsl,test] | |
- name: external trigger Install packages for NDSL component | |
if : ${{contains(inputs.component_name, 'NDSL')}} | |
run: | | |
cd ${GITHUB_WORKSPACE}/pySHiELD | |
pip3 install --upgrade pip setuptools wheel | |
cd ${{inputs.component_name}} && pip3 install .[test] && cd .. | |
pip3 install .[pyFV3,test] | |
- name: Install pySHiELD packages | |
if: ${{ !inputs.component_trigger}} | |
run: | | |
cd ${GITHUB_WORKSPACE}/pySHiELD | |
pip3 install --upgrade pip setuptools wheel | |
pip3 install .[ndsl,pyFV3,test] | |
- name: Download data | |
run: | | |
cd ${GITHUB_WORKSPACE}/pySHiELD | |
mkdir -p test_data | |
cd test_data | |
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_baroclinic.physics.tar.gz | |
tar -xzvf 8.1.3_c12_6ranks_baroclinic.physics.tar.gz | |
- name: Numpy Translate Test | |
run: | | |
cd ${GITHUB_WORKSPACE}/pySHiELD | |
pytest \ | |
-v -s --data_path=./test_data/8.1.3/c12_6ranks_baroclinic/physics \ | |
--backend=numpy \ | |
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \ | |
./tests/savepoint | |
- name: Orchestrated dace:cpu Translate Test | |
run: | | |
cd ${GITHUB_WORKSPACE}/pySHiELD | |
export FV3_DACEMODE=BuildAndRun | |
export PACE_FLOAT_PRECISION=64 | |
export PACE_TEST_N_THRESHOLD_SAMPLES=0 | |
export OMP_NUM_THREADS=10 | |
export PACE_LOGLEVEL=Debug | |
pytest \ | |
-vvv -x -s --data_path=./test_data/8.1.3/c12_6ranks_baroclinic/physics \ | |
--backend=dace:cpu \ | |
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \ | |
./tests/savepoint |