mirror of
https://github.com/google/cpu_features.git
synced 2025-04-28 15:33:37 +02:00
Merge pull request #50 from google/try_travisci_windows_build
Try travisci windows build
This commit is contained in:
commit
543e043c2a
16
.travis.yml
16
.travis.yml
@ -12,32 +12,36 @@ matrix:
|
|||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
TOOLCHAIN=NATIVE
|
TOOLCHAIN=NATIVE
|
||||||
TARGET=native
|
TARGET=x86_64-linux-gnu
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env:
|
env:
|
||||||
TOOLCHAIN=NATIVE
|
TOOLCHAIN=NATIVE
|
||||||
TARGET=native
|
TARGET=x86_64-linux-gnu
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
TOOLCHAIN=NATIVE
|
TOOLCHAIN=NATIVE
|
||||||
TARGET=native
|
TARGET=x86_64-osx
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env:
|
env:
|
||||||
TOOLCHAIN=NATIVE
|
TOOLCHAIN=NATIVE
|
||||||
TARGET=native
|
TARGET=x86_64-osx
|
||||||
|
- os: windows
|
||||||
|
env:
|
||||||
|
TOOLCHAIN=NATIVE
|
||||||
|
TARGET=x86_64-windows
|
||||||
- os: linux-ppc64le
|
- os: linux-ppc64le
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
TOOLCHAIN=NATIVE
|
TOOLCHAIN=NATIVE
|
||||||
TARGET=native
|
TARGET=ppc64le-linux-gnu
|
||||||
- os: linux-ppc64le
|
- os: linux-ppc64le
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env:
|
env:
|
||||||
TOOLCHAIN=NATIVE
|
TOOLCHAIN=NATIVE
|
||||||
TARGET=native
|
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
|
||||||
env:
|
env:
|
||||||
|
@ -75,24 +75,39 @@ function assert_defined(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function integrate() {
|
function integrate() {
|
||||||
cd "${PROJECT_FOLDER}" || exit
|
cd "${PROJECT_FOLDER}"
|
||||||
cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS}
|
case "${OS}" in
|
||||||
cmake --build "${BUILD_DIR}" --target all
|
"Windows_NT") CMAKE_BUILD_ARGS="--config Debug --target ALL_BUILD"
|
||||||
|
CMAKE_TEST_ARGS="--config Debug --target RUN_TESTS"
|
||||||
|
DEMO=${BUILD_DIR}/Debug/list_cpu_features.exe
|
||||||
|
;;
|
||||||
|
*) CMAKE_BUILD_ARGS="--target all"
|
||||||
|
CMAKE_TEST_ARGS="--target test"
|
||||||
|
DEMO=${BUILD_DIR}/list_cpu_features
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ -n "${QEMU_ARCH}" ]]; then
|
# Generating CMake configuration
|
||||||
if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then
|
cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS}
|
||||||
QEMU="true || "
|
|
||||||
else
|
# Building
|
||||||
installqemuifneeded
|
cmake --build "${BUILD_DIR}" ${CMAKE_BUILD_ARGS}
|
||||||
QEMU="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS}"
|
|
||||||
fi
|
# Running tests if needed
|
||||||
else
|
if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then
|
||||||
QEMU=""
|
return
|
||||||
|
fi
|
||||||
|
if [[ -n "${QEMU_ARCH}" ]]; then
|
||||||
|
installqemuifneeded
|
||||||
|
QEMU="${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
|
||||||
# Run tests
|
|
||||||
for test_binary in ${BUILD_DIR}/test/*_test; do ${QEMU} ${test_binary}; done
|
|
||||||
# Run demo program
|
|
||||||
${QEMU} "${BUILD_DIR}/list_cpu_features"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function expand_linaro_config() {
|
function expand_linaro_config() {
|
||||||
|
@ -76,6 +76,9 @@ ENVIRONMENTS="
|
|||||||
set_mips
|
set_mips
|
||||||
"
|
"
|
||||||
|
|
||||||
|
set -v
|
||||||
|
set -e
|
||||||
|
|
||||||
for SET_ENVIRONMENT in ${ENVIRONMENTS}; do
|
for SET_ENVIRONMENT in ${ENVIRONMENTS}; do
|
||||||
${SET_ENVIRONMENT}
|
${SET_ENVIRONMENT}
|
||||||
expand_environment_and_integrate
|
expand_environment_and_integrate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user