Add readthedocs yaml configuration file #196
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: ODE-toolbox build | |
on: [push, pull_request] | |
jobs: | |
static_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ODE-toolbox code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install apt dependencies | |
run: | | |
sudo apt update | |
sudo apt install pkg-config python3-all-dev | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip pytest pycodestyle codecov pytest-cov wheel | |
python -m pip install -r requirements.txt | |
export PYTHON_VERSION=`python -c "import sys; print('.'.join(map(str, [sys.version_info.major, sys.version_info.minor])))"` | |
echo "Python version detected:" | |
echo $PYTHON_VERSION | |
- name: Install ODE-toolbox | |
run: | | |
echo PYTHONPATH=`pwd` >> $GITHUB_ENV | |
python setup.py install | |
- name: Static code style analysis | |
run: | | |
python3 -m pycodestyle $GITHUB_WORKSPACE -v --ignore=E241,E501,E303,E714,E713,E714,E252 --exclude=$GITHUB_WORKSPACE/doc,$GITHUB_WORKSPACE/.eggs,$GITHUB_WORKSPACE/build,$GITHUB_WORKSPACE/.git,$GITHUB_WORKSPACE/odetoolbox.egg-info,$GITHUB_WORKSPACE/dist | |
build: | |
needs: [static_checks] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
with_gsl: ["0", "1"] | |
sympy_version: ["==1.4", "!=1.5,!=1.5.*,!=1.6rc1,!=1.6rc2,!=1.6,!=1.6.*,!=1.10,!=1.10.*,!=1.13,!=1.13.*"] | |
steps: | |
- name: Checkout ODE-toolbox code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install apt dependencies | |
run: | | |
sudo apt update | |
sudo apt install pkg-config python3-all-dev | |
- name: Install GSL | |
run: | | |
cd .. | |
wget http://ftp.wrz.de/pub/gnu/gsl/gsl-2.5.tar.gz | |
tar -xzf gsl-2.5.tar.gz | |
cd gsl-2.5 | |
./configure && make && sudo make install | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip pytest pycodestyle codecov pytest-cov wheel | |
python -m pip install numpy | |
if [ "${{ matrix.with_gsl }}" == "1" ]; then python -m pip install pygsl ; fi | |
python -m pip install -r requirements.txt | |
export PYTHON_VERSION=`python -c "import sys; print('.'.join(map(str, [sys.version_info.major, sys.version_info.minor])))"` | |
echo "Python version detected:" | |
echo $PYTHON_VERSION | |
pip uninstall --yes sympy | |
pip install sympy${{ matrix.sympy_version }} | |
echo "Using sympy version:" | |
python -c "import sympy; print(sympy.__version__)" | |
- name: Install ODE-toolbox | |
run: | | |
echo PYTHONPATH=`pwd` >> $GITHUB_ENV | |
python setup.py install | |
- name: Run unit tests | |
run: | | |
echo "[run]" > .coveragerc | |
echo "omit = tests/*" >> .coveragerc | |
echo >> .coveragerc | |
python -m pytest -s -o log_cli=true -o log_cli_level="DEBUG" --cov=. --cov-config=.coveragerc tests | |
- name: Run codecov | |
run: | | |
codecov |