Skip to content

Commit

Permalink
Use prebuilt Clang binaries for OSX in Travis
Browse files Browse the repository at this point in the history
Fix copying of directory
  • Loading branch information
rajat2004 committed Mar 27, 2020
1 parent 826114d commit 1e0786e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
11 changes: 8 additions & 3 deletions Unity/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ fi


cd linux-build;
export CC="clang-5.0"
export CXX="clang++-5.0"
if [[ -n $CIINSTALL ]]; then # use downloaded binaries on Travis
export CC=${LLVM_DIR}/bin/clang
export CXX=${LLVM_DIR}/bin/clang++
else
export CC="clang-5.0"
export CXX="clang++-5.0"
fi

if [ "$(uname)" == "Darwin" ]; then
CMAKE="$(greadlink -f ../../cmake_build/bin/cmake)"
Expand All @@ -25,7 +30,7 @@ if [ ! -d "../UnityDemo/Assets/Plugins" ]; then
fi

if [ "$(uname)" == "Darwin" ]; then
cp AirsimWrapper.bundle ../UnityDemo/Assets/Plugins;
cp -r AirsimWrapper.bundle ../UnityDemo/Assets/Plugins;
else
cp libAirsimWrapper.so ../UnityDemo/Assets/Plugins;
fi
Expand Down
11 changes: 9 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ else
# variable for build output
build_dir=build_debug
if [ "$(uname)" == "Darwin" ]; then
export CC=/usr/local/opt/llvm-5.0/bin/clang-5.0
export CXX=/usr/local/opt/llvm-5.0/bin/clang++-5.0

if [[ -n $CIINSTALL ]]; then # use downloaded binaries on Travis
export CC=${LLVM_DIR}/bin/clang
export CXX=${LLVM_DIR}/bin/clang++
else
export CC=/usr/local/opt/llvm-5.0/bin/clang-5.0
export CXX=/usr/local/opt/llvm-5.0/bin/clang++-5.0
fi

else
export CC="clang-5.0"
export CXX="clang++-5.0"
Expand Down
18 changes: 12 additions & 6 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,19 @@ if $gccBuild; then
else
# llvm tools
if [ "$(uname)" == "Darwin" ]; then # osx
brew update

# brew install [email protected]
brew tap llvm-hs/homebrew-llvm
brew install llvm-5.0
export C_COMPILER=/usr/local/opt/llvm-5.0/bin/clang-5.0
export COMPILER=/usr/local/opt/llvm-5.0/bin/clang++-5.0
if [[ -n $CIINSTALL ]]; then # use downloaded binaries on Travis
export C_COMPILER=${LLVM_DIR}/bin/clang
export COMPILER=${LLVM_DIR}/bin/clang++
else
brew update

# brew install [email protected]
brew tap llvm-hs/homebrew-llvm
brew install llvm-5.0
export C_COMPILER=/usr/local/opt/llvm-5.0/bin/clang-5.0
export COMPILER=/usr/local/opt/llvm-5.0/bin/clang++-5.0
fi

else #linux
#install clang and build tools
Expand Down

0 comments on commit 1e0786e

Please sign in to comment.