correct travis errors

This commit is contained in:
tangxifan 2019-04-10 15:29:39 +08:00
parent 5c46e4aabf
commit f1290ff7b9
2 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,6 @@
language: cpp language: cpp
# Currently sudo is not required, NO ENV is used # Currently sudo is not required, NO ENV is used
sudo: false
# Supported Operating systems # Supported Operating systems
#os: #os:
@ -15,6 +14,7 @@ matrix:
include: include:
- os: linux - os: linux
# Compiler is specified in ./travis/common.sh # Compiler is specified in ./travis/common.sh
sudo: false
compiler: g++-4.9 compiler: g++-4.9
addons: addons:
apt: apt:
@ -55,6 +55,7 @@ matrix:
- qt5-default - qt5-default
- os: osx - os: osx
osx_image: xcode10.2 # we target latest MacOS Mojave osx_image: xcode10.2 # we target latest MacOS Mojave
sudo: true
compiler: gcc-4.9 # Use clang instead of gcc in MacOS compiler: gcc-4.9 # Use clang instead of gcc in MacOS
addons: addons:
homebrew: homebrew:

View File

@ -27,17 +27,17 @@ function end_section() {
travis_fold end "$1" travis_fold end "$1"
} }
# For Mac OS, we use g++-8 and gcc-8 as default compilers # For Mac OS, we use g++ and gcc as default compilers
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
export CC=gcc-8 export CC=gcc
export CXX=g++-8 export CXX=g++
# export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH" # export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
# export PATH="/usr/local/opt/qt/bin:$PATH" # export PATH="/usr/local/opt/qt/bin:$PATH"
# Install header files in Mojave, if not gcc-4.9 cannot spot stdio.h # Install header files in Mojave, if not gcc-4.9 cannot spot stdio.h
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
else else
# For linux, we use g++-6 and gcc-6 as default compilers # For linux, we use g++-8 and gcc-8 as default compilers
#export CC=gcc export CC=gcc-8
#export CXX=g++ export CXX=g++-8
fi fi