Skip to content

Commit

Permalink
travis: make it build again
Browse files Browse the repository at this point in the history
v2: add -j2 to make
  • Loading branch information
karolherbst authored and AlexeySotkin committed Apr 16, 2018
1 parent 7b8cc99 commit 4d2a651
Showing 1 changed file with 62 additions and 13 deletions.
75 changes: 62 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,78 @@
# Linux Build Configuration for Travis

language: cpp

os:
- linux

# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
sudo: required
dist: trusty
sudo: false

env:
# Each line is a set of environment variables set before a build.
# Thus each line represents a different build configuration.
- BUILD_TYPE=Release
- BUILD_TYPE=Debug
git:
depth: 1

addons:
apt:
sources:
# adds deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main
- llvm-toolchain-trusty
- ubuntu-toolchain-r-test
packages:
- llvm-7-tools
- llvm-7-dev

compiler:
- gcc
- clang

# To avoid Go bindings related issues in LIT tests, hide Go binaries from CMake
install:
- rm -f `which go`
env:
global:
- MAKEFLAGS="-j2"
matrix:
- BUILD_TYPE=Release BUILD_EXTERNAL=1 MAKE_TARGETS="" MAKE_TEST_TARGET="test"
- BUILD_TYPE=Debug BUILD_EXTERNAL=1 MAKE_TARGETS="" MAKE_TEST_TARGET="test"
- BUILD_TYPE=Release BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
- BUILD_TYPE=Debug BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
# some bug inside clang-5.0.0, works with 5.0.1

matrix:
include:
- os: osx
env: BUILD_TYPE=Release BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
osx_image: xcode9.3

- os: osx
env: BUILD_TYPE=Debug BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
osx_image: xcode9.3
allow_failures:
- compiler: clang
- os: osx
fast_finish: true

script:
- |
if [ $BUILD_EXTERNAL == "0" ]; then
mkdir llvm-spirv
mv * llvm-spirv
git clone https://git.llvm.org/git/llvm.git/ --depth 1
mv llvm-spirv llvm/tools/llvm-spirv
fi
- mkdir build && cd build
- cmake -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF -D CMAKE_COLOR_MAKEFILE:BOOL=ON -D LLVM_INCLUDE_EXAMPLES:BOOL=OFF -D LLVM_INCLUDE_TESTS:BOOL=ON -D LLVM_BUILD_TESTS:BOOL=ON -D LLVM_TARGETS_TO_BUILD="X86" -D LLVM_LIT_ARGS:STRING="-sv --no-progress-bar" -G "Unix Makefiles" -D CMAKE_BUILD_TYPE:STRING=${BUILD_TYPE} ..
- make check-llvm -j 2
- |
if [ $BUILD_EXTERNAL == "1" ]; then
cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DLLVM_BUILD_TOOLS=ON \
-DLLVM_EXTERNAL_LIT="/usr/lib/llvm-7/build/utils/lit/lit.py" \
-DLLVM_INCLUDE_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=../install/ \
-G "Unix Makefiles"
else
cmake ../llvm/ \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DLLVM_BUILD_TOOLS=ON \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_INCLUDE_TESTS=ON \
-DLLVM_LIT_ARGS="-sv --no-progress-bar" \
-G "Unix Makefiles"
fi
- make $MAKE_TARGETS && make $MAKE_TEST_TARGET && if [ $BUILD_EXTERNAL == "1" ]; then make install; fi

0 comments on commit 4d2a651

Please sign in to comment.