From 866b6ab9daa9933bcb9aa95f99f595c6bff6d9b6 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 6 Jan 2016 23:55:16 -0500 Subject: [PATCH] Add configuration for Travis CI. --- .travis.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 70 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..9e3bc5d7c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,68 @@ +# Linux Build Configuration for Travis + +sudo: false # Use Travis docker infrastructure + +language: cpp + +os: + - linux + +env: + matrix: + # 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 + +compiler: + - clang + - gcc + +cache: + apt: true + +branches: + only: + - master + +# Travis CI is powered with Ubuntu 12.04, whose toolchain is outdated. +addons: + apt: + # Travis white list of ppa. + # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json + sources: + - ubuntu-toolchain-r-test # For gcc 4.9 + - kubuntu-backports # For cmake 2.8.12 + - llvm-toolchain-precise-3.7 # For clang 3.7 + # Travis whitelist of packages. + # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise + packages: + - cmake + - g++-4.9 + - clang-3.7 + - ninja-build + +install: + - if [ "$CC" = "gcc" ]; then export CC=gcc-4.9 CXX=g++-4.9; fi # Make sure that gcc-4.9 is selected. + - if [ "$CC" = "clang" ]; then export CC=clang-3.7 CXX=clang++-3.7; fi # Make sure that clang-3.7 is selected. + +before_script: + - git clone https://github.com/google/googletest.git external/googletest + +script: + - mkdir build && cd build + - cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. + - ninja + - ./UnitSPIRV --gtest_break_on_failure + + +notifications: + email: + recipients: + - antiagainst@google.com + - awoloszyn@google.com + - deki@google.com + - dneto@google.com + - qining@google.com + on_success: change + on_failure: always diff --git a/README.md b/README.md index 11811fe3e..8a78e3d23 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # SPIR-V Tools +[![Build Status](https://travis-ci.org/KhronosGroup/SPIRV-Tools.svg?branch=master)](https://travis-ci.org/KhronosGroup/SPIRV-Tools) + ## Overview The SPIR-V Tools project provides an API and commands for processing SPIR-V