Path: blob/main/kokoro/android-release/build.sh
1560 views
#!/bin/bash12# Copyright (C) 2020-2022 Google LLC3#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 )"2223TARGET_ARCH="$1"2425# --privileged is required for some sanitizer builds, as they seem to require26# PTRACE privileges27docker run --rm -i \28--privileged \29--volume "${ROOT_DIR}:${ROOT_DIR}" \30--volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \31--workdir "${ROOT_DIR}" \32--env ROOT_DIR="${ROOT_DIR}" \33--env SCRIPT_DIR="${SCRIPT_DIR}" \34--env TARGET_ARCH="${TARGET_ARCH}" \35--env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \36--entrypoint "${SCRIPT_DIR}/build-docker.sh" \37"gcr.io/shaderc-build/radial-build:latest"383940