Skip to content

Commit

Permalink
[az_pipeline_ci] fixes for ubuntu container
Browse files Browse the repository at this point in the history
  • Loading branch information
madratman committed Jul 20, 2020
1 parent 5bdebac commit dc78f32
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /bin/bash
set -e
set -x

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down Expand Up @@ -27,6 +28,15 @@ if [ "$(uname)" == "Darwin" ]; then # osx
brew tap llvm-hs/homebrew-llvm
brew install llvm@8
else #linux
sudo apt-get update
sudo apt-get -y install --no-install-recommends \
lsb-release \
rsync \
software-properties-common \
wget \
libvulkan1 \
vulkan-utils

#install clang and build tools
VERSION=$(lsb_release -rs | cut -d. -f1)
# Since Ubuntu 17 clang is part of the core repository
Expand Down Expand Up @@ -60,6 +70,22 @@ else #linux
sudo apt-get install -y unzip
fi

# in ubuntu 18 docker CI, avoid building cmake from scratch to save time
# ref: https://apt.kitware.com/
if [ "$(uname)" == "Linux" ]; then
if [[ $(lsb_release -rs) == "18.04" ]]; then
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
gnupg
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get -y install --no-install-recommends \
make \
cmake
fi
fi

if ! which cmake; then
# CMake not installed
cmake_ver=0
Expand Down

0 comments on commit dc78f32

Please sign in to comment.