Commit 3f6024f3 authored by Stefan Behnel's avatar Stefan Behnel

(Re-)try really hard to install gcc-8 and g++-8 in travis, even if it fails a couple of times.

parent be45c2dc
...@@ -13,8 +13,8 @@ addons: ...@@ -13,8 +13,8 @@ addons:
- python-dbg - python-dbg
- python3-dbg - python3-dbg
- libzmq-dev # needed by IPython/Tornado - libzmq-dev # needed by IPython/Tornado
- gcc-8 #- gcc-8
- g++-8 #- g++-8
cache: cache:
pip: true pip: true
...@@ -37,7 +37,7 @@ env: ...@@ -37,7 +37,7 @@ env:
- CCACHE_SLOPPINESS=pch_defines,time_macros - CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1 - CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=150M - CCACHE_MAXSIZE=150M
- PATH="/usr/lib/ccache:$HOME/gcclinks:$HOME/miniconda/bin:$PATH" - PATH="/usr/lib/ccache:$HOME/miniconda/bin:$PATH"
matrix: matrix:
- BACKEND=c - BACKEND=c
- BACKEND=cpp - BACKEND=cpp
...@@ -116,9 +116,13 @@ branches: ...@@ -116,9 +116,13 @@ branches:
before_install: before_install:
- | - |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mkdir -p $HOME/gcclinks # adding apt repos in travis is really fragile => retry a couple of times.
ln -s /usr/bin/gcc-8 $HOME/gcclinks/gcc sudo apt-add-respository 'ppa:ubuntu-toolchain-r/test'
ln -s /usr/bin/g++-8 $HOME/gcclinks/g++ for i in {1..10}; do sudo apt-get update && break; done
for i in {1..10}; do sudo apt-get install gcc-8 $(if [ "$BACKEND" = cpp ]; then echo -n "g++-8"; fi ) && break ; done
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo update-alternatives --set gcc /usr/bin/gcc-8
sudo update-alternatives --set g++ /usr/bin/g++-8
export CC=gcc-8 CXX=g++-8 export CC=gcc-8 CXX=g++-8
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment