diff --git a/appveyor.yml b/appveyor.yml index 3d26b156..8719e466 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -77,7 +77,6 @@ build_script: - set TERRA_SHARE_PATH=%TERRA_DIR%\install\share\terra - ps: | If($Env:LLVM_VERSION_SHORT -eq 60 -and $Env:USE_CMAKE -eq 1) { - git ls-tree HEAD -r tests --name-only | ForEach-Object { $dir = "$Env:TERRA_SHARE_PATH\$(Split-Path -Path $_)"; If(!(Test-Path "$dir")) { New-Item -Path "$dir" -ItemType Directory }; Copy-Item $_ "$dir" } $Env:RELEASE_NAME = "terra-Windows-x86_64-$(git rev-parse --short HEAD)" Rename-Item install "$Env:RELEASE_NAME" 7z a "$Env:RELEASE_NAME.zip" "$Env:RELEASE_NAME" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ab5fba51..4cbde5d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -376,6 +376,10 @@ file(GLOB TERRA_TESTS ${PROJECT_SOURCE_DIR}/tests/*.t ${PROJECT_SOURCE_DIR}/tests/fails/*.t ) +file(GLOB_RECURSE TERRA_TESTS_INSTALL + RELATIVE ${PROJECT_SOURCE_DIR}/tests + ${PROJECT_SOURCE_DIR}/tests/* +) foreach(TERRA_TEST ${TERRA_TESTS}) add_test(NAME ${TERRA_TEST} @@ -383,3 +387,19 @@ foreach(TERRA_TEST ${TERRA_TESTS}) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests ) endforeach() +foreach(TERRA_TEST ${TERRA_TESTS_INSTALL}) + get_filename_component(TERRA_TEST_DIR ${TERRA_TEST} DIRECTORY) + install( + FILES ${PROJECT_SOURCE_DIR}/tests/${TERRA_TEST} + DESTINATION ${CMAKE_INSTALL_DATADIR}/terra/tests/${TERRA_TEST_DIR} + ) +endforeach() + +install( + FILES ${PROJECT_SOURCE_DIR}/release/share/terra/LICENSE.txt + DESTINATION ${CMAKE_INSTALL_DATADIR}/terra +) +install( + FILES ${PROJECT_SOURCE_DIR}/release/share/terra/README.md + DESTINATION ${CMAKE_INSTALL_DATADIR}/terra +) diff --git a/travis.sh b/travis.sh index 90100fee..506d3b49 100755 --- a/travis.sh +++ b/travis.sh @@ -194,11 +194,14 @@ if [[ $USE_CMAKE -eq 1 ]]; then ../install/bin/terra ./run popd fi -else - make LLVM_CONFIG=$(which $LLVM_CONFIG) CLANG=$(which $CLANG) test - # Only deploy Makefile-based builds, and only with LLVM 6. - if [[ $LLVM_CONFIG = llvm-config-6.0 && $USE_CMAKE -eq 1 && $USE_CUDA -eq 1 && ( $CC = gcc || $(uname) = Darwin ) ]]; then - make LLVM_CONFIG=$(which $LLVM_CONFIG) CLANG=$(which $CLANG) release + # Only deploy CMake builds, and only with LLVM 6. + if [[ $LLVM_CONFIG = llvm-config-6.0 && $USE_CUDA -eq 1 && ( $CC = gcc || $(uname) = Darwin ) ]]; then + RELEASE_NAME=terra-`uname | sed -e s/Darwin/OSX/`-`uname -m`-`git rev-parse --short HEAD` + mv install $RELEASE_NAME + zip -q -r $RELEASE_NAME.zip $RELEASE_NAME + mv $RELEASE_NAME install fi +else + make LLVM_CONFIG=$(which $LLVM_CONFIG) CLANG=$(which $CLANG) test fi