Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for external projects #327

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ env:
- LLVM_CONFIG=llvm-config-7 CLANG=clang-7 USE_CMAKE=1 STATIC_LLVM=0 STATIC_LUAJIT=0
- LLVM_CONFIG=llvm-config-7 CLANG=clang-7 USE_CMAKE=1 SLIB_INCLUDE_LLVM=0 SLIB_INCLUDE_LUAJIT=0 USE_CUDA=1

# test external projects
- LLVM_CONFIG=llvm-config-6.0 CLANG=clang-6.0 EXTERNAL_TEST=regent
- LLVM_CONFIG=llvm-config-6.0 CLANG=clang-6.0 EXTERNAL_TEST=rigel

matrix:
exclude:
- os: osx
Expand Down
25 changes: 24 additions & 1 deletion travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,43 @@ if [[ $USE_CMAKE -eq 1 ]]; then
)
fi

export TERRA_INSTALL_PREFIX=$PWD/install
pushd build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../install "${CMAKE_FLAGS[@]}"
cmake .. -DCMAKE_INSTALL_PREFIX=$TERRA_INSTALL_PREFIX "${CMAKE_FLAGS[@]}"
make install -j2
ctest -j2 || (test "$(uname)" = "Darwin" && test "$LLVM_CONFIG" = "llvm-config-3.8")
popd

pushd tests
../install/bin/terra ./run
popd

else
export TERRA_INSTALL_PREFIX=$PWD/release
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_CUDA -eq 1 && ( $CC = gcc || $(uname) = Darwin ) ]]; then
make LLVM_CONFIG=$(which $LLVM_CONFIG) CLANG=$(which $CLANG) release
fi
fi

if [[ $EXTERNAL_TEST = regent ]]; then
if [[ $(uname) = Linux ]]; then
sudo apt-get install -qq libblas-dev liblapack-dev
fi
git clone -b master https://github.com/StanfordLegion/legion.git
cd legion
export REALM_SYNTHETIC_CORE_MAP=
export SHORT=1 # skip expensive tests
export THREADS=2
export TERRA_DIR=$TERRA_INSTALL_PREFIX
./test.py --test=regent
elif [[ $EXTERNAL_TEST = rigel ]]; then
git clone https://github.com/jameshegarty/rigel.git
cd rigel/examples
mkdir bin
ln -s "$TERRA_INSTALL_PREFIX/../build/bin/luajit" bin/luajit
export PATH="$PATH:$TERRA_INSTALL_PREFIX/bin:$PWD/bin"
make terra
fi