1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-28 07:23:37 +02:00

Merge pull request #52 from google/update_macros

Improve travis ci
This commit is contained in:
Guillaume Chatelet 2019-01-17 15:23:53 +01:00 committed by GitHub
commit 50f782f8ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 16 deletions

View File

@ -6,41 +6,47 @@ cache:
directories: directories:
- $HOME/cpu_features_archives - $HOME/cpu_features_archives
addons:
apt:
packages:
- ninja-build
env:
global:
TOOLCHAIN=NATIVE
CMAKE_GENERATOR=Ninja
matrix: matrix:
include: include:
- os: linux - os: linux
compiler: gcc compiler: gcc
env: env:
TOOLCHAIN=NATIVE
TARGET=x86_64-linux-gnu TARGET=x86_64-linux-gnu
- os: linux - os: linux
compiler: clang compiler: clang
env: env:
TOOLCHAIN=NATIVE
TARGET=x86_64-linux-gnu TARGET=x86_64-linux-gnu
- os: osx - os: osx
compiler: gcc compiler: gcc
env: env:
TOOLCHAIN=NATIVE
TARGET=x86_64-osx TARGET=x86_64-osx
CMAKE_GENERATOR="Unix Makefiles"
- os: osx - os: osx
compiler: clang compiler: clang
env: env:
TOOLCHAIN=NATIVE
TARGET=x86_64-osx TARGET=x86_64-osx
CMAKE_GENERATOR="Unix Makefiles"
- os: windows - os: windows
env: env:
TOOLCHAIN=NATIVE
TARGET=x86_64-windows TARGET=x86_64-windows
CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
- os: linux-ppc64le - os: linux-ppc64le
compiler: gcc compiler: gcc
env: env:
TOOLCHAIN=NATIVE
TARGET=ppc64le-linux-gnu TARGET=ppc64le-linux-gnu
- os: linux-ppc64le - os: linux-ppc64le
compiler: clang compiler: clang
env: env:
TOOLCHAIN=NATIVE
TARGET=ppc64le-linux-gnu TARGET=ppc64le-linux-gnu
# Toolchains for little-endian, 64-bit ARMv8 for GNU/Linux systems # Toolchains for little-endian, 64-bit ARMv8 for GNU/Linux systems
- os: linux - os: linux

View File

@ -88,7 +88,7 @@ function integrate() {
esac esac
# Generating CMake configuration # Generating CMake configuration
cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS} cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS} -G"${CMAKE_GENERATOR:-Unix Makefiles}"
# Building # Building
cmake --build "${BUILD_DIR}" ${CMAKE_BUILD_ARGS} cmake --build "${BUILD_DIR}" ${CMAKE_BUILD_ARGS}
@ -97,17 +97,15 @@ function integrate() {
if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then
return return
fi fi
RUN_CMD=""
if [[ -n "${QEMU_ARCH}" ]]; then if [[ -n "${QEMU_ARCH}" ]]; then
installqemuifneeded installqemuifneeded
QEMU="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS}" RUN_CMD="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS}"
for test_binary in ${BUILD_DIR}/test/*_test; do
${QEMU} ${test_binary}
done
${QEMU} ${DEMO}
else
cmake --build "${BUILD_DIR}" ${CMAKE_TEST_ARGS}
${DEMO}
fi fi
for test_binary in ${BUILD_DIR}/test/*_test; do
${RUN_CMD} ${test_binary} &
done
${RUN_CMD} ${DEMO}
} }
function expand_linaro_config() { function expand_linaro_config() {