Skip to content

Commit

Permalink
SAIL: Remove installed SAIL after testing in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
HappySeaFox committed Oct 9, 2023
1 parent 4fd1eba commit db100a3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ script:
local project_path="$1"
local sail_cmake_path="$2"
local build_type="$3"
local old_dir="$PWD"
echo
echo "External Windows Test '$project_path' '$build_type'"
Expand All @@ -94,13 +95,16 @@ script:
fail_on_error cmake -A x64 -DSAIL_DEV=ON -DCMAKE_PREFIX_PATH="$sail_cmake_path" ..
fail_on_error cmake --build . --config $build_type
cd "$old_dir"
}
test_external_unix()
{
local project_path="$1"
local build_type="$2"
local exe="$3"
local old_dir="$PWD"
echo
echo "External Unix Test '$project_path' '$build_type'"
Expand All @@ -115,6 +119,8 @@ script:
fail_on_error cmake -DSAIL_DEV=ON -DCMAKE_BUILD_TYPE="$build_type" ..
fail_on_error cmake --build . --verbose
fail_on_error "$exe"
cd "$old_dir"
}
build()
Expand Down Expand Up @@ -146,6 +152,8 @@ script:
test_external_windows "tests/external/link/c" "$CMAKE_INSTALL_PREFIX/lib/cmake" "$CMAKE_BUILD_TYPE"
test_external_windows "tests/external/link/c++" "$CMAKE_INSTALL_PREFIX/lib/cmake" "$CMAKE_BUILD_TYPE"
rm -rf "$CMAKE_INSTALL_PREFIX"
;;
osx | linux)
CMAKE_INSTALL_PREFIX="/usr/local"
Expand All @@ -161,11 +169,14 @@ script:
cd tests
fail_on_error ctest --verbose
cd -
fail_on_error "$CMAKE_INSTALL_PREFIX/bin/sail" --version
test_external_unix "tests/external/link/c" "$CMAKE_BUILD_TYPE" "./external-c-api-link"
test_external_unix "tests/external/link/c++" "$CMAKE_BUILD_TYPE" "./external-c++-api-link"
xargs rm -v < install_manifest.txt
;;
esac
}
Expand Down

0 comments on commit db100a3

Please sign in to comment.