Skip to content

Commit

Permalink
Update OSX compiler to clang 8, remove prebuilt binaries on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat2004 authored and madratman committed Apr 1, 2020
1 parent 1106a4e commit 4dba8c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 38 deletions.
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:

- name: MacOS
os: osx
env:
- TOOL="cmake"
- DESCRIPTION="OS X build/test via CMake"
- LLVM_PACKAGE="clang+llvm-5.0.2-x86_64-apple-darwin"
- CIINSTALL=yes


before_install:
Expand All @@ -34,9 +29,7 @@ before_install:
sudo apt-get -y install git wget unzip;
sudo apt-get -y install build-essential software-properties-common cmake rsync libboost-all-dev;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOOL" == "cmake" ]]; then
wget http://releases.llvm.org/5.0.2/${LLVM_PACKAGE}.tar.xz;
tar -xf ${LLVM_PACKAGE}.tar.xz;
export LLVM_DIR=${TRAVIS_BUILD_DIR}/${LLVM_PACKAGE};
echo "No before_install actions for OSX";
fi

script:
Expand Down
13 changes: 3 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,8 @@ else
# variable for build output
build_dir=build_debug
if [ "$(uname)" == "Darwin" ]; then

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

export CC=/usr/local/opt/llvm@8/bin/clang
export CXX=/usr/local/opt/llvm@8/bin/clang++
else
export CC="clang-8"
export CXX="clang++-8"
Expand Down Expand Up @@ -145,4 +138,4 @@ echo "For help see:"
echo "https://github.com/Microsoft/AirSim/blob/master/docs/build_linux.md"
echo "=================================================================="

popd >/dev/null
popd >/dev/null
25 changes: 5 additions & 20 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,9 @@ if $gccBuild; then
else
# llvm tools
if [ "$(uname)" == "Darwin" ]; then # osx
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 llvm@3.9
brew tap llvm-hs/homebrew-llvm
brew install llvm-8.0
fi

brew update
brew tap llvm-hs/homebrew-llvm
brew install llvm@8
else #linux
#install clang and build tools
VERSION=$(lsb_release -rs | cut -d. -f1)
Expand All @@ -71,7 +63,7 @@ else
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
fi
sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev
sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev
fi
fi

Expand Down Expand Up @@ -119,15 +111,8 @@ if version_less_than_equal_to $cmake_ver $MIN_CMAKE_VERSION; then
make
popd
fi

if [ "$(uname)" == "Darwin" ]; then
CMAKE="$(greadlink -f cmake_build/bin/cmake)"
else
CMAKE="$(readlink -f cmake_build/bin/cmake)"
fi
else
echo "Already have good version of cmake: $cmake_ver"
CMAKE=$(which cmake)
fi

# Download rpclib
Expand Down Expand Up @@ -191,4 +176,4 @@ set +x
echo ""
echo "************************************"
echo "AirSim setup completed successfully!"
echo "************************************"
echo "************************************"

0 comments on commit 4dba8c1

Please sign in to comment.