diff --git a/.travis.yml b/.travis.yml index deafdfa..6027965 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,32 +12,42 @@ matrix: compiler: gcc env: TOOLCHAIN=NATIVE - TARGET=native + TARGET=x86_64-linux-gnu - os: linux compiler: clang env: TOOLCHAIN=NATIVE - TARGET=native + TARGET=x86_64-linux-gnu - os: osx compiler: gcc env: TOOLCHAIN=NATIVE - TARGET=native + TARGET=x86_64-osx - os: osx compiler: clang env: TOOLCHAIN=NATIVE - TARGET=native + TARGET=x86_64-osx + - os: windows + compiler: gcc + env: + TOOLCHAIN=NATIVE + TARGET=x86_64-windows + - os: windows + compiler: clang + env: + TOOLCHAIN=NATIVE + TARGET=x86_64-windows - os: linux-ppc64le compiler: gcc env: TOOLCHAIN=NATIVE - TARGET=native + TARGET=ppc64le-linux-gnu - os: linux-ppc64le compiler: clang env: TOOLCHAIN=NATIVE - TARGET=native + TARGET=ppc64le-linux-gnu # Toolchains for little-endian, 64-bit ARMv8 for GNU/Linux systems - os: linux env: diff --git a/scripts/run_integration.sh b/scripts/run_integration.sh index 8ae1200..322cf4c 100755 --- a/scripts/run_integration.sh +++ b/scripts/run_integration.sh @@ -75,24 +75,39 @@ function assert_defined(){ } function integrate() { - cd "${PROJECT_FOLDER}" || exit - cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS} - cmake --build "${BUILD_DIR}" --target all + cd "${PROJECT_FOLDER}" + case "${OS}" in + "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 - if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then - QEMU="true || " - else - installqemuifneeded - QEMU="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS}" - fi - else - QEMU="" + # Generating CMake configuration + cmake -H. -B"${BUILD_DIR}" ${DEFAULT_CMAKE_ARGS} ${CMAKE_ADDITIONAL_ARGS} + + # Building + cmake --build "${BUILD_DIR}" ${CMAKE_BUILD_ARGS} + + # Running tests if needed + if [[ "${QEMU_ARCH}" == "DISABLED" ]]; then + 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 - # 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() { diff --git a/scripts/test_integration.sh b/scripts/test_integration.sh index a167227..d180e48 100755 --- a/scripts/test_integration.sh +++ b/scripts/test_integration.sh @@ -76,6 +76,9 @@ ENVIRONMENTS=" set_mips " +set -v +set -e + for SET_ENVIRONMENT in ${ENVIRONMENTS}; do ${SET_ENVIRONMENT} expand_environment_and_integrate