Remove Linux stuff from Travis CI

This commit is contained in:
Sebastian Messmer 2018-09-27 02:25:56 -07:00
parent 6de350c931
commit dc9cdc0143
4 changed files with 11 additions and 61 deletions

View File

@ -1,22 +1,9 @@
language: cpp language: cpp
sudo: required sudo: required
dist: trusty
compiler: compiler:
# - gcc # - gcc
- clang - clang
os: os: osx
#- linux
- osx
addons:
apt:
sources:
# Both needed for clang 3.7
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages:
- clang-3.7
- libcrypto++-dev
- libfuse-dev
install: install:
- .travisci/install.sh - .travisci/install.sh
script: script:

View File

@ -2,21 +2,13 @@
set -ev set -ev
# Use new clang on linux
if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ "$CXX" == "clang++" ]; then
echo Switch to Clang 3.7
export CXX="clang++-3.7" CC="clang-3.7"
else
echo Do not switch to Clang 3.7 because we are either not Linux or not Clang.
fi
# If using gcc on mac, actually use it ("gcc" just links to clang, but "gcc-4.8" is gcc, https://github.com/travis-ci/travis-ci/issues/2423) # If using gcc on mac, actually use it ("gcc" just links to clang, but "gcc-4.8" is gcc, https://github.com/travis-ci/travis-ci/issues/2423)
# Note: This must be here and not in install.sh, because environment variables can't be passed between scripts. # Note: This must be here and not in install.sh, because environment variables can't be passed between scripts.
if [ "${TRAVIS_OS_NAME}" == "osx" ] && [ "${CXX}" == "g++" ]; then if [ "${CXX}" == "g++" ]; then
echo Switch to actual g++ and not just the AppleClang symlink echo Switch to actual g++ and not just the AppleClang symlink
export CXX="g++-7" CC="gcc-7" export CXX="g++-7" CC="gcc-7"
else else
echo Do not switch to actual g++ because we are either not osx or not g++ echo Do not switch to actual g++ because we are not g++
fi fi
# Setup ccache # Setup ccache
@ -28,10 +20,7 @@ ccache --max-size=512M
ccache --show-stats ccache --show-stats
# Detect number of CPU cores # Detect number of CPU cores
export NUMCORES=`grep -c ^processor /proc/cpuinfo` export NUMCORES=`sysctl -n hw.ncpu`
if [ ! -n "$NUMCORES" ]; then
export NUMCORES=`sysctl -n hw.ncpu`
fi
echo Using $NUMCORES cores echo Using $NUMCORES cores
echo Using CXX compiler $CXX and C compiler $CC echo Using CXX compiler $CXX and C compiler $CC
@ -55,8 +44,6 @@ ccache --show-stats
./test/blobstore/blobstore-test ./test/blobstore/blobstore-test
./test/cryfs/cryfs-test ./test/cryfs/cryfs-test
# TODO Also run on osx once fixed # TODO Also run once fixed
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then # ./test/fspp/fspp-test
./test/fspp/fspp-test # ./test/cryfs-cli/cryfs-cli-test
./test/cryfs-cli/cryfs-cli-test
fi

View File

@ -2,31 +2,19 @@
set -e set -e
# Install dependencies # Install newer GCC if we're running on GCC
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then if [ "${CXX}" == "g++" ]; then
./.travisci/install_boost.sh
fi
# Install newer GCC if we're running on GCC osx
if [ "${TRAVIS_OS_NAME}" == "osx" ] && [ "${CXX}" == "g++" ]; then
# We need to uninstall oclint because it creates a /usr/local/include/c++ symlink that clashes with the gcc5 package # We need to uninstall oclint because it creates a /usr/local/include/c++ symlink that clashes with the gcc5 package
# see https://github.com/Homebrew/homebrew-core/issues/21172 # see https://github.com/Homebrew/homebrew-core/issues/21172
brew cask uninstall oclint brew cask uninstall oclint
brew install gcc@7 brew install gcc@7
fi fi
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew cask install osxfuse
brew cask install osxfuse brew install libomp
brew install libomp
fi
# By default, travis only fetches the newest 50 commits. We need more in case we're further from the last version tag, so the build doesn't fail because it can't generate the version number. # By default, travis only fetches the newest 50 commits. We need more in case we're further from the last version tag, so the build doesn't fail because it can't generate the version number.
git fetch --unshallow git fetch --unshallow
# Use /dev/urandom when /dev/random is accessed, because travis doesn't have enough entropy
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo cp -a /dev/urandom /dev/random
fi
# Setup ccache # Setup ccache
brew install ccache brew install ccache

View File

@ -1,12 +0,0 @@
#!/bin/bash
set -e
wget -O boost.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.bz2/download
tar -xf boost.tar.bz2
cd boost_1_56_0
# TODO We should use clang as toolchain for building boost when clang is used for building our code
./bootstrap.sh --with-libraries=filesystem,thread,chrono,program_options
sudo ./b2 -d0 -j$NUMCORES install
cd ..
sudo rm -rf boost.tar.bz2 boost_1_56_0