Install bmi-example-pynetlogo before other dependencies #5
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: Test | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
# We want to run on external PRs, but not on our own internal PRs as they'll be run | |
# by the push to the branch. Without this if check, checks are duplicated since | |
# internal PRs match both the push and pull_request events. | |
if: | |
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | |
github.repository | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.11] | |
steps: | |
- name: Install NetLogo | |
run: | | |
curl https://ccl.northwestern.edu/netlogo/6.1.1/NetLogo-6.1.1-64.tgz --output NetLogo-6.1.1-64.tgz | |
tar xf NetLogo-6.1.1-64.tgz | |
mv NetLogo\ 6.1.1 /opt/netlogo-6.1.1 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
channel-priority: true | |
- name: Install bmi-example-pynetlogo dependency | |
run: | | |
pushd ./external/bmi-example-pynetlogo | |
make install | |
popd | |
- name: Install requirements | |
run: | | |
pip install --file=requirements-build.txt --file=requirements-library.txt | |
- name: Build and install package | |
run: | | |
pip install -e . | |
- name: Install pymt | |
run: | | |
conda install -c conda-forge pymt | |
- name: Test | |
run: | | |
python -c 'import pymt_pynetlogo' | |
python -c 'from pymt.models import HeatDiffusion' | |
- name: Run examples | |
working-directory: ${{ github.workspace }}/examples | |
run: | | |
python heatc_ex.py | |
python pymt_heatc_ex.py | |