bugfix: bring in .travis.yml from develop

This commit is contained in:
Todd Gamblin 2019-01-13 15:28:07 -08:00
parent 4a7e3dcedd
commit d62dc366ef

View File

@ -12,11 +12,7 @@ branches:
# Build matrix # Build matrix
#============================================================================= #=============================================================================
# Adding the keyword dist to permit an `allow_failures` section dist: xenial
# under `matrix.include`. More information here:
#
# https://docs.travis-ci.com/user/customizing-the-build/#Rows-that-are-Allowed-to-Fail
dist: trusty
jobs: jobs:
fast_finish: true fast_finish: true
@ -29,6 +25,7 @@ jobs:
env: TEST_SUITE=flake8 env: TEST_SUITE=flake8
- stage: 'unit tests + documentation' - stage: 'unit tests + documentation'
python: '2.6' python: '2.6'
dist: trusty
sudo: required sudo: required
os: linux os: linux
language: python language: python
@ -56,7 +53,6 @@ jobs:
- python: '3.7' - python: '3.7'
sudo: required sudo: required
os: linux os: linux
dist: xenial
language: python language: python
env: TEST_SUITE=unit env: TEST_SUITE=unit
- python: '3.6' - python: '3.6'
@ -108,13 +104,7 @@ jobs:
os: linux os: linux
language: python language: python
env: [ TEST_SUITE=build, 'SPEC=mpich' ] env: [ TEST_SUITE=build, 'SPEC=mpich' ]
- stage: 'docker build'
sudo: required
os: linux
language: generic
env: TEST_SUITE=docker
allow_failures: allow_failures:
- dist: xenial
- env: TEST_SUITE=docker - env: TEST_SUITE=docker
# temporary Python 2.6 exception while we figure out why Travis is hanging # temporary Python 2.6 exception while we figure out why Travis is hanging
- python: '2.6' - python: '2.6'
@ -123,9 +113,6 @@ stages:
- 'style checks' - 'style checks'
- 'unit tests + documentation' - 'unit tests + documentation'
- 'build tests' - 'build tests'
- name: 'docker build'
if: type = push AND branch IN (develop, master)
#============================================================================= #=============================================================================
# Environment # Environment
@ -135,39 +122,49 @@ sudo: false
# Docs need graphviz to build # Docs need graphviz to build
addons: addons:
# for Linux builds, we use APT
apt: apt:
packages: packages:
- ccache
- cmake
- gfortran - gfortran
- mercurial
- graphviz - graphviz
- gnupg2 - gnupg2
- cmake - kcov
- mercurial
- ninja-build - ninja-build
- perl
- perl-base
- realpath
- r-base - r-base
- r-base-core - r-base-core
- r-base-dev - r-base-dev
- perl # for Mac builds, we use Homebrew
- perl-base homebrew:
packages:
- python@2
- gcc
- gnupg2
- ccache
# ~/.ccache needs to be cached directly as Travis is not taking care of it
# (possibly because we use 'language: python' and not 'language: c')
cache: cache:
pip: true pip: true
ccache: true
directories: directories:
- ~/.mirror - ~/.mirror
- ~/.ccache
# Work around Travis's lack of support for Python on OSX # Work around Travis's lack of support for Python on OSX
before_install: before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
export HOMEBREW_NO_AUTO_UPDATE=1;
rm /usr/local/include/c++ ;
brew ls --versions python@2 > /dev/null || brew install python@2;
brew ls --versions gcc > /dev/null || brew install gcc;
brew ls --versions gnupg2 > /dev/null || brew install gnupg2;
pip2 install --upgrade pip; pip2 install --upgrade pip;
pip2 install virtualenv; pip2 install virtualenv;
virtualenv venv; virtualenv venv;
source venv/bin/activate; source venv/bin/activate;
fi fi
- ccache -M 2G && ccache -z
# Install various dependencies # Install various dependencies
install: install:
@ -190,8 +187,8 @@ before_script:
- git fetch origin develop:develop - git fetch origin develop:develop
# Set up external deps for build tests, b/c they take too long to compile # Set up external deps for build tests, b/c they take too long to compile
- if [[ "$TEST_SUITE" == "build" ]]; then cp - if [[ "$TEST_SUITE" == "build" ]]; then
share/spack/qa/configuration/packages.yaml etc/spack/packages.yaml; cp share/spack/qa/configuration/*.yaml etc/spack/;
fi fi
#============================================================================= #=============================================================================
@ -202,27 +199,13 @@ services:
script: script:
- share/spack/qa/run-$TEST_SUITE-tests - share/spack/qa/run-$TEST_SUITE-tests
- if [[ "$TEST_SUITE" == "docker build" ]]; then
login_attempted=0; login_success=0; after_success:
for config in share/spack/docker/config/* ; do - ccache -s
source "$config" ;
./share/spack/docker/build-image.sh;
if [ "$TRAVIS_EVENT_TYPE" != "pull_request" ]; then
if [ "$login_attempted" '=' '0' ]; then
if echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; then
login_success=1;
fi;
login_attempted=1;
fi;
if [ "$login_success" '=' '1' ]; then
./share/spack/docker/push-image.sh;
fi
fi
done;
fi
- if [[ "$TEST_SUITE" == "unit" || "$TEST_SUITE" == "build" ]]; then - if [[ "$TEST_SUITE" == "unit" || "$TEST_SUITE" == "build" ]]; then
codecov --env PYTHON_VERSION codecov --env PYTHON_VERSION
--required --flags "${TEST_SUITE}${TRAVIS_OS_NAME}"; --required
--flags "${TEST_SUITE}${TRAVIS_OS_NAME}";
fi fi
#============================================================================= #=============================================================================