forked from pik-copan/pyunicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/pik-copan/pyunicorn
- Loading branch information
Showing
17 changed files
with
446 additions
and
909 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,113 @@ | ||
# This file is part of pyunicorn. | ||
# Copyright (C) 2008--2024 Jonathan F. Donges and pyunicorn authors | ||
# URL: <http://www.pik-potsdam.de/members/donges/software> | ||
# License: BSD (3-clause) | ||
|
||
|
||
# documentation & validation ================================================== | ||
|
||
# - https://docs.travis-ci.com/user/reference/overview | ||
# - https://docs.travis-ci.com/user/build-matrix/ | ||
# - https://docs.travis-ci.com/user/multi-os/ | ||
|
||
# - https://docs.travis-ci.com/user/build-config-validation/ | ||
# - https://config.travis-ci.com/explore | ||
|
||
|
||
# meta ======================================================================== | ||
|
||
# enable build config validation | ||
version: ~> 1.0 | ||
|
||
# require the branch name to be master | ||
# save Travis budget | ||
if: branch = master | ||
|
||
language: python | ||
python: | ||
# https://docs.travis-ci.com/user/languages/python/#python-versions | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12-dev" | ||
matrix: | ||
fast_finish: true | ||
# report outcomes | ||
notifications: | ||
email: | ||
on_success: change | ||
on_failure: always | ||
|
||
|
||
# default jobs: Linux, all Python versions ==================================== | ||
|
||
arch: arm64 | ||
virt: lxd | ||
os: linux | ||
dist: focal | ||
sudo: false | ||
|
||
before_install: | ||
# Python package manager | ||
- travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH"; hash -r | ||
- conda config --set quiet yes --set always_yes yes --set changeps1 no | ||
- travis_retry conda update -n base -c defaults conda | ||
- travis_retry conda update --all | ||
- conda config --set solver libmamba | ||
|
||
# debugging info | ||
- conda info -a | ||
- conda list | ||
arch: arm64 | ||
virt: lxd | ||
language: generic | ||
env: | ||
jobs: | ||
- PYTHON=3.12 | ||
- PYTHON=3.11 | ||
- PYTHON=3.10 | ||
- PYTHON=3.9 | ||
- PYTHON=3.8 | ||
|
||
before_install: export ARCH=Linux-aarch64 SED=sed | ||
|
||
install: | ||
# runtime dependencies | ||
- travis_retry conda create -n test-env | ||
- eval "$(conda shell.bash hook)" | ||
- conda activate test-env | ||
- travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev} | ||
- travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm | ||
- travis_retry conda update -c conda-forge --all | ||
|
||
# testing dependencies | ||
- travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov | ||
- travis_retry conda install -c conda-forge networkx matplotlib cartopy | ||
- travis_retry conda install -c conda-forge sphinx ipython nbsphinx nbsphinx-link | ||
|
||
# debugging info | ||
- conda info -a | ||
- conda list | ||
|
||
before_script: | ||
# limit parallel processes to available cores (error if pattern not found) | ||
- sed -i '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py | ||
- sed -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg | ||
- sed -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml | ||
- sed -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml | ||
- | # install Python via Miniconda | ||
travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-${ARCH}.sh -O miniconda.sh | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
export PATH="$HOME/miniconda/bin:$PATH"; hash -r | ||
conda config --set quiet yes --set always_yes yes --set changeps1 no | ||
- | | ||
travis_retry conda update -n base -c defaults conda | ||
travis_retry conda update --all | ||
conda config --set solver libmamba | ||
conda info -a | ||
conda list | ||
travis_retry conda create -n test-env | ||
eval "$(conda shell.bash hook)" | ||
conda activate test-env | ||
travis_retry conda install -c conda-forge python=${PYTHON} | ||
- | # install dependencies | ||
travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm | ||
travis_retry conda update -c conda-forge --all | ||
travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov | ||
travis_retry conda install -c conda-forge networkx matplotlib cartopy sphinx | ||
conda info -a | ||
conda list | ||
script: | ||
# package | ||
- travis_retry pip install -v -e ".[testing,docs]" | ||
- | # limit procs to available cores (use GNU `sed`, fail if pattern not found) | ||
${SED} -i '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py | ||
${SED} -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg | ||
${SED} -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml | ||
${SED} -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml | ||
# test suite | ||
- tox -v | ||
# install self (and dependencies, if on Windows) | ||
- travis_retry pip install -v -e ".[tests,docs]" | ||
|
||
after_success: | ||
- codecov | ||
# run test suite | ||
- tox -v | ||
|
||
notifications: | ||
email: | ||
on_success: change | ||
on_failure: always | ||
# report statistics | ||
after_success: codecov | ||
|
||
|
||
# modified jobs: OSX + Windows, newest Python version ========================= | ||
# (inherit only 1st `env.jobs` entry) | ||
|
||
jobs: | ||
fast_finish: true | ||
include: | ||
- os: osx | ||
osx_image: xcode14 | ||
language: shell | ||
before_install: | ||
- export ARCH=MacOSX-x86_64 SED=gsed | ||
- export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 | ||
- travis_retry brew install gnu-sed | ||
|
||
- os: windows | ||
language: shell | ||
before_install: | ||
- export ARCH=Windows-x86_64 SED=sed | ||
- export PATH=/c/Python${PYTHON/.}:/c/Python${PYTHON/.}/Scripts:${PATH} | ||
install: | ||
- | # install Python via Chocolatey | ||
travis_retry choco install python --version ${PYTHON} | ||
travis_retry python -m pip install --upgrade pip |
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
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
Oops, something went wrong.