#!/bin/bash12# Copyright (C) 2020 Google Inc.3#4# Licensed under the Apache License, Version 2.0 (the "License");5# you may not use this file except in compliance with the License.6# You may obtain a copy of the License at7#8# http://www.apache.org/licenses/LICENSE-2.09#10# Unless required by applicable law or agreed to in writing, software11# distributed under the License is distributed on an "AS IS" BASIS,12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13# See the License for the specific language governing permissions and14# limitations under the License.15#16# Linux Build Script.1718set -e # Fail on any error.1920SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"21ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"2223CONFIG=$124COMPILER=$22526# --privileged is required for some sanitizer builds, as they seem to require27# PTRACE privileges28docker run --rm -i \29--privileged \30--volume "${ROOT_DIR}:${ROOT_DIR}" \31--volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \32--workdir "${ROOT_DIR}" \33--env ROOT_DIR="${ROOT_DIR}" \34--env SCRIPT_DIR="${SCRIPT_DIR}" \35--env CONFIG="${CONFIG}" \36--env COMPILER="${COMPILER}" \37--env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \38--entrypoint "${SCRIPT_DIR}/build-docker.sh" \39"gcr.io/shaderc-build/radial-build:latest"404142