1
0

CI: Add arm build to travis (#4422)

* Add arm to travis build matrix
* Pin clang-3.5 build to ubuntu trusty
* Add ccache to build
This explicitly excludes macOS since the images don't come with ccache
installed and the install time is not justified by the time saved.
This commit is contained in:
peterbell10 2019-11-10 16:55:24 +00:00 committed by GitHub
parent 61904af626
commit 7996571a6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 5 deletions

View File

@ -6,6 +6,15 @@ os: linux
matrix: matrix:
include: include:
# gcc on arm64
- compiler: gcc
arch: arm64
addons:
apt:
packages:
- ccache
env: &Debug
- TRAVIS_CUBERITE_BUILD_TYPE=DEBUG CUBERITE_PATH=./Cuberite_debug
# AppleClang # AppleClang
# OSX workers are slower to start up. Having these first in the build matrix makes travis faster overall. # OSX workers are slower to start up. Having these first in the build matrix makes travis faster overall.
- os: osx - os: osx
@ -14,8 +23,7 @@ matrix:
- TRAVIS_CUBERITE_BUILD_TYPE=RELEASE CUBERITE_PATH=./Cuberite - TRAVIS_CUBERITE_BUILD_TYPE=RELEASE CUBERITE_PATH=./Cuberite
- os: osx - os: osx
compiler: clang compiler: clang
env: &Debug env: *Debug
- TRAVIS_CUBERITE_BUILD_TYPE=DEBUG CUBERITE_PATH=./Cuberite_debug
# Default clang # Default clang
- compiler: clang - compiler: clang
env: *Release env: *Release
@ -23,10 +31,9 @@ matrix:
env: *Debug env: *Debug
# clang 3.5 # clang 3.5
- compiler: clang - compiler: clang
dist: trusty
addons: &clang35 addons: &clang35
apt: apt:
sources:
- llvm-toolchain-precise-3.5
packages: packages:
- clang++-3.5 - clang++-3.5
- clang-3.5 - clang-3.5
@ -34,6 +41,7 @@ matrix:
- CC=clang-3.5;CXX=clang++-3.5 - CC=clang-3.5;CXX=clang++-3.5
env: *Release env: *Release
- compiler: clang - compiler: clang
dist: trusty
addons: *clang35 addons: *clang35
before_install: before_install:
- CC=clang-3.5;CXX=clang++-3.5 - CC=clang-3.5;CXX=clang++-3.5
@ -56,7 +64,11 @@ matrix:
- CC=gcc-4.8;CXX=g++-4.8 - CC=gcc-4.8;CXX=g++-4.8
env: *Debug env: *Debug
before_script:
- export PATH=$(echo "$PATH" | sed -e 's/:\/usr\/lib\/ccache//')
script: ./CIbuild.sh script: ./CIbuild.sh
cache: ccache
notifications: notifications:
email: email:

View File

@ -6,7 +6,14 @@ export CUBERITE_BUILD_SERIES_NAME="Travis $CC $TRAVIS_CUBERITE_BUILD_TYPE"
export CUBERITE_BUILD_ID=$TRAVIS_JOB_NUMBER export CUBERITE_BUILD_ID=$TRAVIS_JOB_NUMBER
export CUBERITE_BUILD_DATETIME=`date` export CUBERITE_BUILD_DATETIME=`date`
cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1; # Use ccache if available
if [ `which ccache` ]; then
export CCACHE_CPP2=true
CACHE_ARGS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
echo "Using ccache installed at $(which ccache)"
fi
cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1 ${CACHE_ARGS};
echo "Building..." echo "Building..."
cmake --build . -- -j 2; cmake --build . -- -j 2;