[Feature] Translate test on CI #4
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: "Translate test (subset)" | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
jobs: | |
all: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: [3.11.7] | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
submodules: 'recursive' | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install OpenMPI & Boost for gt4py | |
run: | | |
sudo apt-get install libopenmpi-dev libboost1.74-dev | |
- name: Install Python packages | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install .[test] | |
- name: Download data | |
run: | | |
mkdir -p test_data | |
cd test_data | |
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6_ranks_standard.FvTp2d.tar.gz | |
tar -xzvf 8.1.3_c12_6_ranks_standard.FvTp2d.tar.gz | |
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6_ranks_standard.D_SW.tar.gz | |
tar -xzvf 8.1.3_c12_6_ranks_standard.D_SW.tar.gz | |
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6_ranks_standard.Remapping.tar.gz | |
tar -xzvf 8.1.3_c12_6_ranks_standard.Remapping.tar.gz | |
cd - | |
- name: Numpy FvTp2d | |
run: | | |
pytest \ | |
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \ | |
--backend=FvTp2d \ | |
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \ | |
./tests/savepoint | |
- name: Numpy D_SW | |
run: | | |
pytest \ | |
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \ | |
--backend=D_SW \ | |
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \ | |
./tests/savepoint | |
- name: Numpy Remapping | |
run: | | |
pytest \ | |
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \ | |
--backend=Remapping \ | |
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \ | |
./tests/savepoint |