Travis restrict docker build test 01
parent
7d4903df11
commit
2b544e9fa7
152
.travis.yml
152
.travis.yml
|
@ -1,71 +1,88 @@
|
||||||
services:
|
services:
|
||||||
- mysql
|
- mysql
|
||||||
|
- docker
|
||||||
language: python # this works for Linux but is an error on macOS or Windows
|
sudo: required
|
||||||
|
language: python
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- name: "Python 3.7 on Xenial Linux"
|
- stage: Tests
|
||||||
os: linux
|
name: Python 3.7 on Xenial Linux
|
||||||
language: python
|
os: linux
|
||||||
python: 3.7
|
language: python
|
||||||
before_install:
|
python: 3.7
|
||||||
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
before_install:
|
||||||
- export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
|
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||||
- source ~/.bashrc
|
- export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
|
||||||
- sudo apt-get install linuxbrew-wrapper
|
- source ~/.bashrc
|
||||||
- brew tap --shallow linuxbrew/xorg
|
- sudo apt-get install linuxbrew-wrapper
|
||||||
- brew install r
|
- brew tap --shallow linuxbrew/xorg
|
||||||
- R --version
|
- brew install r
|
||||||
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
|
- R --version
|
||||||
- bash miniconda.sh -b -p $HOME/miniconda
|
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O
|
||||||
- source "$HOME/miniconda/etc/profile.d/conda.sh"
|
miniconda.sh;
|
||||||
- hash -r
|
- bash miniconda.sh -b -p $HOME/miniconda
|
||||||
- conda config --set always_yes yes --set changeps1 no
|
- source "$HOME/miniconda/etc/profile.d/conda.sh"
|
||||||
cache:
|
- hash -r
|
||||||
directories:
|
- conda config --set always_yes yes --set changeps1 no
|
||||||
- /home/travis/.linuxbrew
|
install:
|
||||||
- $HOME/.local/share/renv
|
- conda init bash
|
||||||
- $TRAVIS_BUILD_DIR/renv/library
|
- conda update -q --all --yes conda
|
||||||
|
- conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file
|
||||||
- name: "Python 3.7 on macOS"
|
environment.yml
|
||||||
os: osx
|
- conda activate test-environment
|
||||||
osx_image: xcode11.3 # Python 3.7 running on macOS 10.14.4
|
- snakemake -j1 renv_install
|
||||||
language: generic # 'language: python' is an error on Travis CI macOS
|
- R -e 'renv::settings$use.cache(FALSE)'
|
||||||
before_install:
|
- snakemake -j1 renv_restore
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc@9
|
cache:
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/Homebrew/homebrew-core/raw/218998d/Formula/r.rb # R 4.0.0
|
directories:
|
||||||
- R --version
|
- "/home/travis/.linuxbrew"
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql
|
- "$HOME/.local/share/renv"
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew services start mysql
|
- "$TRAVIS_BUILD_DIR/renv/library"
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew cask install miniconda
|
script:
|
||||||
- eval "$(/opt/miniconda3/condabin/conda shell.bash hook)"
|
- bash tests/scripts/run_tests.sh
|
||||||
- eval "$(conda shell.bash hook)" # properly initialise non-interactive shell with gcc and no update brew
|
- name: Python 3.7 on macOS
|
||||||
|
os: osx
|
||||||
env:
|
osx_image: xcode11.3
|
||||||
- RENV_PATHS_ROOT="$HOME/renv/cache"
|
language: generic
|
||||||
cache:
|
before_install:
|
||||||
directories:
|
- HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc@9
|
||||||
- /usr/local/lib/R
|
- HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/Homebrew/homebrew-core/raw/218998d/Formula/r.rb
|
||||||
- $RENV_PATHS_ROOT
|
- R --version
|
||||||
- $TRAVIS_BUILD_DIR/renv/library
|
- HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql
|
||||||
|
- HOMEBREW_NO_AUTO_UPDATE=1 brew services start mysql
|
||||||
install:
|
- HOMEBREW_NO_AUTO_UPDATE=1 brew cask install miniconda
|
||||||
- conda init bash
|
- eval "$(/opt/miniconda3/condabin/conda shell.bash hook)"
|
||||||
- conda update -q --all --yes conda
|
- eval "$(conda shell.bash hook)"
|
||||||
- conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file environment.yml
|
install:
|
||||||
- conda activate test-environment
|
- conda init bash
|
||||||
- snakemake -j1 renv_install
|
- conda update -q --all --yes conda
|
||||||
- R -e 'renv::settings$use.cache(FALSE)'
|
- conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file
|
||||||
- snakemake -j1 renv_restore
|
environment.yml
|
||||||
|
- conda activate test-environment
|
||||||
script:
|
- snakemake -j1 renv_install
|
||||||
- bash tests/scripts/run_tests.sh
|
- R -e 'renv::settings$use.cache(FALSE)'
|
||||||
|
- snakemake -j1 renv_restore
|
||||||
|
env:
|
||||||
|
- RENV_PATHS_ROOT="$HOME/renv/cache"
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- "/usr/local/lib/R"
|
||||||
|
- "$RENV_PATHS_ROOT"
|
||||||
|
- "$TRAVIS_BUILD_DIR/renv/library"
|
||||||
|
script:
|
||||||
|
- bash tests/scripts/run_tests.sh
|
||||||
|
- stage: deploy
|
||||||
|
name: Python 3.7 on Xenial Linux Docker
|
||||||
|
os: linux
|
||||||
|
language: python
|
||||||
|
script:
|
||||||
|
- docker build -t rapids .
|
||||||
|
- docker login -u "agamk" -p $DOCKERPWD
|
||||||
|
- docker tag rapids agamk/rapids:travislatest
|
||||||
|
- docker push agamk/rapids:travislatest
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- day_segments
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: deploy
|
- name: deploy
|
||||||
|
@ -75,10 +92,13 @@ stages:
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
slack:
|
slack:
|
||||||
# if: branch = travis_test
|
|
||||||
secure: cJIpmIjb3zA5AMDBo9axF1v6fYNIgMm6s6UdMNOlHiT511xHGsaLUFej3lACwQLig4Gr94ySI61YdrP+RX1lFcYxusH+kUU/c8LX0PmSKNeKnycM3w/pCM+yTp/6oQG6ZrJD7pNm6zhB0xPL61uSmYhcr+JJ1sh4iLiON+J8/C+IfnAHm1ORkxJ0IxASkiP/LvaiAQDw8lNyYIZNWjSDNZbx68o1VNakyk6Vik3x8omiE3w33rzI2/JAx//QTxOq2J0dtV1AqYYSOWS4iXblV09NLBqgGrhAhrQ6+TbPHSPIyL/4EdhvS+YXO+SBWS7ODD7j/MuL6XiA4SujW72od2rgXNmOjFnlQvIrULO5bzv39BKKDkldvz9+XCyXLcjoLIwA/rmUnwMndNoC7NoD/CkQEevUxswXXB9811BmIFx/7GOHouVxwB2gaMAzkCroZJVwgbrc6ESSOVE5SMcb3wPMbpd8cXOgVZXJcmk5wK206zxXPigCvFfknqOnwDqRgyIWSFoTd/2wHppA7ND3R5U42nQTbEQ7MiONsOo61GlJTTxJELz32sLKl388AuAgOY7+0sqPibxMaHJkF1V4nYVTH0/H5bO/edK4VHMloJ6s0kuyko7LT5EMQf3pBJij5TnYmD2E60t+bSBAxHuH7WA5dvL+igjGEwROnxDc9pc=
|
secure: cJIpmIjb3zA5AMDBo9axF1v6fYNIgMm6s6UdMNOlHiT511xHGsaLUFej3lACwQLig4Gr94ySI61YdrP+RX1lFcYxusH+kUU/c8LX0PmSKNeKnycM3w/pCM+yTp/6oQG6ZrJD7pNm6zhB0xPL61uSmYhcr+JJ1sh4iLiON+J8/C+IfnAHm1ORkxJ0IxASkiP/LvaiAQDw8lNyYIZNWjSDNZbx68o1VNakyk6Vik3x8omiE3w33rzI2/JAx//QTxOq2J0dtV1AqYYSOWS4iXblV09NLBqgGrhAhrQ6+TbPHSPIyL/4EdhvS+YXO+SBWS7ODD7j/MuL6XiA4SujW72od2rgXNmOjFnlQvIrULO5bzv39BKKDkldvz9+XCyXLcjoLIwA/rmUnwMndNoC7NoD/CkQEevUxswXXB9811BmIFx/7GOHouVxwB2gaMAzkCroZJVwgbrc6ESSOVE5SMcb3wPMbpd8cXOgVZXJcmk5wK206zxXPigCvFfknqOnwDqRgyIWSFoTd/2wHppA7ND3R5U42nQTbEQ7MiONsOo61GlJTTxJELz32sLKl388AuAgOY7+0sqPibxMaHJkF1V4nYVTH0/H5bO/edK4VHMloJ6s0kuyko7LT5EMQf3pBJij5TnYmD2E60t+bSBAxHuH7WA5dvL+igjGEwROnxDc9pc=
|
||||||
on_success: always
|
on_success: always
|
||||||
template:
|
template:
|
||||||
- "Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`."
|
- Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>)
|
||||||
- "Execution time: *%{duration}*"
|
for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`.
|
||||||
- "Message: %{message}"
|
- 'Execution time: *%{duration}*'
|
||||||
|
- 'Message: %{message}'
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
secure: FD2aOa8L3lWf1xClZ24uS59SOBjMH16sdSLPGkb6bQLwrKAQw6BVna5wOw3iRscZtx2iqEQw3LdLmNb6ftI4fgHhf7qoAZlKVlc2Q8wU4L623Ad8S//2Ny1AxXRyzwmRw4emmIUqRXiGaeZYkzcptf38+2d9PjHazVsL3A6T2vFK+VAQmZBq3Iblx0i3g25qevQxFUACH1FIpZsmn08cesblZp0MiQ7GOq4YhBAqmbraT4/w7yFe1rwm/yPSWeBQKu8tZeZnEW6/FPYidxxuBgl/BxTdVuIKHcVzL95Mu4q6Y7uVaYeGYgyxai8eyntpY2dPu0wN1ng4JxulwqKBdxkWFPdbBJSGnYQq5EmrqULjro7wk9GVLSN9Lx0QjcmZRbNbDH0rpgxcXS9mtvzmgFbmatdsMa3VrObqKL2yYMsPZ6e5N4ve3gTU5+sm6oz/zYNWK2CDN2f08BJuaoKv9hETTfvWaZitKT7lFZ2LpsDdHSPUtRiAviDcLZcCZsTQjyCi6JeKSF2aMQ0+4rCsZgFkqpmjEVJB5N6DMkdZaUn+4HrbGsivAHWQsDcvPTD4n2CUcboV407NFsckr3PlDy0+fNNHr2h45VjO7DxAwDIJAdiwlhbj9l9gn8i3aZOtMCT6p4xIC2CgqOcY4yOTHmyOswJwnkz3uoSOq3eNLR4=
|
||||||
|
|
Loading…
Reference in New Issue