Skip to content

Commit

Permalink
add workflow test for t-route integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
hellkite500 authored and mattw-nws committed Mar 23, 2022
1 parent 38ce6d1 commit ded3284
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/module_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,71 @@ jobs:

- name: Run surfacebmi plus cfebmi
run: ./cmake_build/ngen data/catchment_data.geojson "cat-27" data/nexus_data.geojson "nex-26" data/example_bmi_multi_realization_config.json

# Run t-route/pybind integration test
test_troute_integration:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Init Submodules
run: git submodule update --init --recursive

- name: Cache Boost Dependency
id: cache-boost-dep
uses: actions/cache@v1
with:
path: boost_1_72_0
key: unix-boost-dep

- name: Get Boost Dependency
if: steps.cache-boost-dep.outputs.cache-hit != 'true'
run: |
curl -L -O https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2
tar xjf boost_1_72_0.tar.bz2
- name: Get netcdff library
run: |
sudo apt-get install -y libnetcdf-dev libnetcdff-dev
- name: Cache troute dependency
id: cache-linux-troute-dep
uses: actions/cache@v1
with:
path: .venv
key: linux-troute-dep

- name: Build T-route Dependency
if: steps.cache-linux-troute-dep.outputs.cache-hit != 'true'
run: |
python -m venv .venv
. .venv/bin/activate
cd extern/t-route
pip install pip
pip install -r requirements.txt
cd src
pip install -e nwm_routing
pip install -e ngen_routing
cd python_routing_v02
FC=gfortran ./compiler.sh
deactivate
- name: cmake_init_build
run: |
export BOOST_ROOT="$(pwd)/boost_1_72_0"
[ ! -d "$BOOST_ROOT" ] && echo "Error: no Boost root found at $BOOST_ROOT" && exit 1
cmake -B cmake_build -DNGEN_ACTIVATE_ROUTING:BOOL=on -S .
- name: Build test
run: cmake --build cmake_build --target test_routing_pybind -- -j ${{ env.LINUX_NUM_PROC_CORES }}
timeout-minutes: 15

- name: Run test
run: |
. .venv/bin/activate
./cmake_build/test/test_routing_pybind
deactivate

0 comments on commit ded3284

Please sign in to comment.