From a5dbf030be332dab37d1cd57176d46b1a56fee9d Mon Sep 17 00:00:00 2001 From: k-dominik Date: Mon, 13 May 2019 14:10:06 +0200 Subject: [PATCH 1/2] travis linting --- .travis.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 435bb9bac..6f71bab75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,12 +15,19 @@ cache: install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh; fi + - | + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; + fi + - | + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh; + fi - echo $CONDA_ROOT - echo $TEST_ENV - echo $TEST_ENV_PREFIX - - if [[ ! -d ${CONDA_ROOT} ]]; then + - | + if [[ ! -d ${CONDA_ROOT} ]]; then echo "Installing Miniconda..."; wget $MINICONDA -O miniconda.sh && bash miniconda.sh -b -p ${CONDA_ROOT}; @@ -35,7 +42,8 @@ install: # Useful for debugging any issues with conda # - conda info -a - - if [[ ! -d $TEST_ENV_PREFIX ]]; then + - | + if [[ ! -d $TEST_ENV_PREFIX ]]; then conda create -q -n $TEST_ENV -c ilastik-forge -c conda-forge ilastik-dependencies-no-solvers flake8 pytest-cov coveralls black; else conda install -y -n ${TEST_ENV} -c ilastik-forge -c conda-forge ilastik-dependencies-no-solvers flake8 pytest-cov coveralls black; From f98520df252581809474abbe1999121696709c2f Mon Sep 17 00:00:00 2001 From: k-dominik Date: Thu, 9 May 2019 15:41:03 +0200 Subject: [PATCH 2/2] Deploy docs directly to gh-pages --- .travis.yml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f71bab75..a862fad7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,20 @@ language: generic -os: - - linux - - osx + env: global: - CONDA_ROOT=$HOME/miniconda - TEST_ENV=test-env - TEST_ENV_PREFIX=$CONDA_ROOT/envs/$TEST_ENV - + - secure: XfurIBq0z+fiU8cRDdJB/ittCMZAmsOQHjeEVHIvAaJHEYthvqxMQURzP/+UiZ6Xn0ToDfFRm7CW0MDaYZvN7qX/MxVY7MhFtgFSk3YYOGDKeY7ODQuKMPsfiQPL+16AQB4OVO9ITiIgJSMlvitN0lfgZb4TXvcmZW0mfBAoNHc= cache: directories: - CONDA_ROOT +# Default test stage, not in jobs, since multiple osses seem not to be supported there +os: + - linux + - osx + install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi @@ -56,6 +59,7 @@ install: - rm -rf ${TEST_ENV_PREFIX}/ilastik-meta/volumina - ln -s $TRAVIS_BUILD_DIR ${TEST_ENV_PREFIX}/ilastik-meta/volumina + script: - conda activate $TEST_ENV - echo `which python` @@ -64,3 +68,49 @@ script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then xvfb-run pytest --capture=no --cov=volumina; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pytest --capture=no --cov=volumina; fi - cd $TRAVIS_BUILD_DIR && git diff --name-only --diff-filter=AM master.. | grep ".*\.py" | xargs black --check + + +jobs: + include: + - stage: deploy + os: + - linux + on: + branch: master + condition: $TRAVIS_OS_NAME = "linux" + name: "Deploy github pages" + install: + - sudo apt-get update + - export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh + - echo $CONDA_ROOT + - | + if [[ ! -d ${CONDA_ROOT} ]]; then + echo "Installing Miniconda..."; + wget $MINICONDA -O miniconda.sh && + bash miniconda.sh -b -p ${CONDA_ROOT}; + else + echo "Using cached Miniconda install"; + fi + - echo ". $CONDA_ROOT/etc/profile.d/conda.sh" >> ~/.bashrc + - source ~/.bashrc + - conda config --set always_yes yes --set changeps1 no + - conda update -q conda + - | + if [[ ! -d deploy ]]; then + conda create -q -n deploy -c ilastik-forge -c conda-forge ilastik-dependencies-no-solvers sphinx; + else + conda install -y -n deploy -c ilastik-forge -c conda-forge ilastik-dependencies-no-solvers sphinx; + fi + script: + - conda activate deploy + - cd docs + - make html + - touch _build/html/.nojekyll + deploy: + provider: pages + on: + branch: master + local_dir: docs/_build/html + name: ilastik-bot + skip_cleanup: true + github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable