Path: blob/main/kokoro/android-release/build-docker.sh
1560 views
#!/bin/bash12# Copyright (C) 2017-2022 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# Android Build Script.171819# Fail on any error.20set -e2122. /bin/using.sh # Declare the bash `using` function for configuring toolchains.2324# Display commands being run.25set -x2627using cmake-3.17.228using ninja-1.10.029using ndk-r25c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir3031cd $ROOT_DIR32./utils/git-sync-deps3334mkdir build35cd $ROOT_DIR/build3637# Invoke the build.38BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}39echo $(date): Starting build...40cmake \41-GNinja \42-DCMAKE_MAKE_PROGRAM=ninja \43-DCMAKE_BUILD_TYPE=Release \44-DANDROID_ABI="$TARGET_ARCH" \45-DSHADERC_SKIP_TESTS=ON \46-DSPIRV_SKIP_TESTS=ON \47-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \48-DANDROID_NDK=$ANDROID_NDK_HOME ..4950echo $(date): Build glslang library...51ninja glslang5253echo $(date): Build everything...54ninja5556echo $(date): Check Shaderc for copyright notices...57ninja check-copyright5859echo $(date): Build completed.606162