From 61fcd39545797ece9d092d46bc5ceb31cf8870d3 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Wed, 6 Sep 2017 09:30:57 -0700 Subject: [PATCH 01/10] Add basic Travis-CI support. - Installs gcc/g++ 6, cmake, and ccache. - Builds and runs draco_tests. --- .travis.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5fd724d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +dist: trusty +sudo: require +language: cpp +compiler: gcc + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-6 + - g++-6 + - ccache + - cmake + +script: + # Link gcc-6 and g++-6 to their standard commands + - ln -s /usr/bin/gcc-6 /usr/local/bin/gcc + - ln -s /usr/bin/g++-6 /usr/local/bin/g++ + # Export CC and CXX to tell cmake which compiler to use + - export CC=/usr/bin/gcc-6 + - export CXX=/usr/bin/g++-6 + # Check versions of gcc, g++ and cmake + - gcc -v && g++ -v && cmake --version + # Configure and build + - mkdir _travis_build && cd _travis_build + - cmake -G "Unix Makefiles" -DENABLE_TESTING=ON -DENABLE_CCACHE=ON .. + - make -j + - ./draco_tests From 4c013da41847c006e52ae716a8047d5203009deb Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Wed, 6 Sep 2017 10:24:39 -0700 Subject: [PATCH 02/10] Enable ccache --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5fd724d..5bd5930 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ dist: trusty sudo: require language: cpp compiler: gcc +cache: ccache addons: apt: From 7c0bdaaa73226ae074a2c392242ab40bf5723243 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Wed, 6 Sep 2017 11:36:17 -0700 Subject: [PATCH 03/10] Set os to linux. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5bd5930..897e7f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +os: linux dist: trusty sudo: require language: cpp From 379934430a7b6ce5ce1bad022d62086a54e98918 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Wed, 6 Sep 2017 12:42:50 -0700 Subject: [PATCH 04/10] Remove sudo and hopefully allow container based testing. --- .travis.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 897e7f1..021a5de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ os: linux dist: trusty -sudo: require language: cpp -compiler: gcc +compiler: + - clang + - gcc cache: ccache addons: @@ -10,20 +11,16 @@ addons: sources: - ubuntu-toolchain-r-test packages: - - gcc-6 - - g++-6 - ccache - cmake script: - # Link gcc-6 and g++-6 to their standard commands - - ln -s /usr/bin/gcc-6 /usr/local/bin/gcc - - ln -s /usr/bin/g++-6 /usr/local/bin/g++ - # Export CC and CXX to tell cmake which compiler to use - - export CC=/usr/bin/gcc-6 - - export CXX=/usr/bin/g++-6 - # Check versions of gcc, g++ and cmake - - gcc -v && g++ -v && cmake --version + # Output versions of gcc, g++ and cmake + - clang -v + - clang++ -v + - gcc -v + - g++ -v + - make --version # Configure and build - mkdir _travis_build && cd _travis_build - cmake -G "Unix Makefiles" -DENABLE_TESTING=ON -DENABLE_CCACHE=ON .. From f8059008b3d7bfc0b54057e73c928ec94b3090b6 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 7 Sep 2017 07:22:28 -0700 Subject: [PATCH 05/10] Reduce CMake minimum version to 3.2. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0460c53..7c61774 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.2) project(draco C CXX) set(draco_root "${CMAKE_CURRENT_SOURCE_DIR}") From 4a44eec6f16736874ae835b336b5195205f239a6 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 7 Sep 2017 11:54:27 -0700 Subject: [PATCH 06/10] Fix test flag name. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 021a5de..c909bf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,6 @@ script: - make --version # Configure and build - mkdir _travis_build && cd _travis_build - - cmake -G "Unix Makefiles" -DENABLE_TESTING=ON -DENABLE_CCACHE=ON .. + - cmake -G "Unix Makefiles" -DENABLE_TESTS=ON -DENABLE_CCACHE=ON .. - make -j - ./draco_tests From 577c7aa8c5f3c3859fed97464f565c7a5322ba7f Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 7 Sep 2017 12:11:38 -0700 Subject: [PATCH 07/10] Output versions only for the active compiler. --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c909bf9..7122892 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,11 +15,10 @@ addons: - cmake script: - # Output versions of gcc, g++ and cmake - - clang -v - - clang++ -v - - gcc -v - - g++ -v + # Output version info for compilers, cmake, and make + - ${CC} -v + - ${CXX} -v + - cmake --version - make --version # Configure and build - mkdir _travis_build && cd _travis_build From 2f449dea0baa905ee1c871d4bef013d97b6a3370 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 7 Sep 2017 12:14:33 -0700 Subject: [PATCH 08/10] Add mac support to travis config. --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7122892..b07e219 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ -os: linux +os: + - linux + - osx dist: trusty +osx_image: xcode8.3 language: cpp compiler: - clang @@ -14,6 +17,9 @@ addons: - ccache - cmake +before_install: + - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then brew install ccache; fi + script: # Output version info for compilers, cmake, and make - ${CC} -v From 4b4dfa518d79a927e2490358fdb3c2a5ea8c78f3 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 7 Sep 2017 17:35:42 -0700 Subject: [PATCH 09/10] Clone googletest alongside draco. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index b07e219..351a10c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ script: - ${CXX} -v - cmake --version - make --version + # Clone googletest + - pushd .. && git clone https://github.com/google/googletest.git && popd # Configure and build - mkdir _travis_build && cd _travis_build - cmake -G "Unix Makefiles" -DENABLE_TESTS=ON -DENABLE_CCACHE=ON .. From 10f0ba91f5c4b56f2bdfbc11062189eb1b14aa5e Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 7 Sep 2017 19:23:12 -0700 Subject: [PATCH 10/10] Avoid unnecessary osx builds. --- .travis.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 351a10c..26f14e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,16 @@ -os: - - linux - - osx -dist: trusty -osx_image: xcode8.3 -language: cpp -compiler: - - clang - - gcc cache: ccache +language: cpp +matrix: + include: + - os: linux + dist: trusty + compiler: clang + - os: linux + dist: trusty + compiler: gcc + - os: osx + osx_image: xcode8.3 + compiler: clang addons: apt: