enable caching for ci (#2799)
* enable cache * caching on mac * fix ci caching on mac * fix * add mac cache * added homebrew cache and pretty print yaml (+ structural ordering) * cleanup * fix ccache on mac * testing workaround https://github.com/travis-ci/travis-ci/issues/7456#issuecomment-296505058 * try xcode7.3 instead of workaround * cache timout value more time for cache to upload
This commit is contained in:
parent
b05ed0376a
commit
1565309146
3 changed files with 33 additions and 14 deletions
44
.travis.yml
44
.travis.yml
|
@ -1,5 +1,7 @@
|
||||||
|
sudo: required # forces legacy build infrastructure
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
sudo: required
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
|
@ -10,21 +12,28 @@ matrix:
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: BUILDTYPE=Release DIST=trusty
|
env: BUILDTYPE=Release DIST=trusty
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode6.4
|
osx_image: xcode7.3
|
||||||
env: BUILDTYPE=Debug
|
env: BUILDTYPE=Debug
|
||||||
|
cache:
|
||||||
|
ccache: true
|
||||||
|
timeout: 360 # 6min timeout for cache uploading instead default 3
|
||||||
|
directories:
|
||||||
|
- $HOME/Library/Caches/Homebrew # cache Homebrew ressources
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode6.4
|
osx_image: xcode7.3
|
||||||
env: BUILDTYPE=Release
|
env: BUILDTYPE=Release
|
||||||
script: "./travis-compile.sh"
|
cache:
|
||||||
|
ccache: true
|
||||||
|
timeout: 360 # 6min timeout for cache uploading instead default 3
|
||||||
|
directories:
|
||||||
|
- $HOME/Library/Caches/Homebrew # cache Homebrew ressources
|
||||||
|
|
||||||
|
cache: ccache
|
||||||
|
|
||||||
install: "./travis-dependencies.sh"
|
install: "./travis-dependencies.sh"
|
||||||
cache: apt
|
|
||||||
notifications:
|
script: "./travis-compile.sh"
|
||||||
webhooks:
|
|
||||||
urls:
|
|
||||||
- https://webhooks.gitter.im/e/d94969c3b01b22cbdcb7
|
|
||||||
on_success: change
|
|
||||||
on_failure: change
|
|
||||||
on_start: never
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
|
@ -37,4 +46,13 @@ deploy:
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
repo: Cockatrice/Cockatrice
|
repo: Cockatrice/Cockatrice
|
||||||
condition: $BUILDTYPE = Release
|
condition: $BUILDTYPE = Release
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
webhooks:
|
||||||
|
urls:
|
||||||
|
- https://webhooks.gitter.im/e/d94969c3b01b22cbdcb7
|
||||||
|
on_success: change
|
||||||
|
on_failure: change
|
||||||
|
on_start: never
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
prefix=""
|
prefix=""
|
||||||
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
||||||
|
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
prefix="-DCMAKE_PREFIX_PATH=$(echo /usr/local/opt/qt*/)"
|
prefix="-DCMAKE_PREFIX_PATH=$(echo /usr/local/opt/qt*/)"
|
||||||
fi
|
fi
|
||||||
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ $TRAVIS_OS_NAME == "osx" ]] ; then
|
if [[ $TRAVIS_OS_NAME == "osx" ]] ; then
|
||||||
brew update > /dev/null
|
brew install ccache # enable caching on mac (PATH only set in travis-compile.sh)
|
||||||
brew install --force qt@5.7
|
brew install --force qt@5.7
|
||||||
brew install protobuf
|
brew install protobuf
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue