From dc78f3248ae2a30fbf88d10ac41f7f7f433b8415 Mon Sep 17 00:00:00 2001 From: madratman Date: Mon, 20 Jul 2020 12:36:08 -0700 Subject: [PATCH] [az_pipeline_ci] fixes for ubuntu container --- setup.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/setup.sh b/setup.sh index 06d707e95..136883afa 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,5 @@ #! /bin/bash +set -e set -x SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -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 @@ -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