From 3359572e5de2a877924674f0de66177c8e58f454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 1 Nov 2018 13:33:45 +0100 Subject: [PATCH] Enable ninja and ccache on travis (#413) * Use ninja, the fast build system Make is known to be rather slow, but it's possible to generate other build system files with CMake, so use a faster one. * Use ccache on Travis * Dummy commit to test ccache --- .travis.yml | 5 +++++ .travis/build-x86_64-linux/build.sh | 4 ++-- .travis/sse3-only-on-x86_64-linux/build.sh | 4 ++-- .travis/test-a64-on-x86_64-linux/build.sh | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d896339..beaab3a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: cpp +cache: ccache + matrix: include: - env: NAME="Linux Build" @@ -12,6 +14,7 @@ matrix: packages: - gcc-7 - g++-7 + - ninja-build install: ./.travis/build-x86_64-linux/deps.sh script: ./.travis/build-x86_64-linux/build.sh - env: NAME="Test - Fuzz against Unicorn" @@ -25,6 +28,7 @@ matrix: - gcc-7 - g++-7 - llvm-dev + - ninja-build install: ./.travis/test-a64-on-x86_64-linux/deps.sh script: ./.travis/test-a64-on-x86_64-linux/build.sh - env: NAME="Test - SSE3 only" @@ -38,6 +42,7 @@ matrix: - gcc-7 - g++-7 - llvm-dev + - ninja-build install: ./.travis/sse3-only-on-x86_64-linux/deps.sh script: ./.travis/sse3-only-on-x86_64-linux/build.sh - env: NAME="macOS Build" diff --git a/.travis/build-x86_64-linux/build.sh b/.travis/build-x86_64-linux/build.sh index 88d8705f..e7c7c4e0 100755 --- a/.travis/build-x86_64-linux/build.sh +++ b/.travis/build-x86_64-linux/build.sh @@ -8,7 +8,7 @@ export CXX=g++-7 export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH mkdir build && cd build -cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -make -j4 +cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -G Ninja +ninja ./tests/dynarmic_tests --durations yes diff --git a/.travis/sse3-only-on-x86_64-linux/build.sh b/.travis/sse3-only-on-x86_64-linux/build.sh index 0546f497..7ca3fd2d 100755 --- a/.travis/sse3-only-on-x86_64-linux/build.sh +++ b/.travis/sse3-only-on-x86_64-linux/build.sh @@ -9,7 +9,7 @@ export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH export UNICORNDIR=$(pwd)/externals/unicorn mkdir build && cd build -cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_LLVM=1 -DDYNARMIC_TESTS_USE_UNICORN=1 -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=0 -make -j4 +cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_LLVM=1 -DDYNARMIC_TESTS_USE_UNICORN=1 -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=0 -G Ninja +ninja ./tests/dynarmic_tests --durations yes diff --git a/.travis/test-a64-on-x86_64-linux/build.sh b/.travis/test-a64-on-x86_64-linux/build.sh index e4b149cd..05ac2c68 100755 --- a/.travis/test-a64-on-x86_64-linux/build.sh +++ b/.travis/test-a64-on-x86_64-linux/build.sh @@ -9,7 +9,7 @@ export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH export UNICORNDIR=$(pwd)/externals/unicorn mkdir build && cd build -cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_LLVM=1 -DDYNARMIC_TESTS_USE_UNICORN=1 -make -j4 +cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_LLVM=1 -DDYNARMIC_TESTS_USE_UNICORN=1 -G Ninja +ninja ./tests/dynarmic_tests --durations yes