Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/shaderc
Path: blob/main/kokoro/android-release/build-docker.sh
1560 views
1
#!/bin/bash
2
3
# Copyright (C) 2017-2022 Google Inc.
4
#
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
# you may not use this file except in compliance with the License.
7
# You may obtain a copy of the License at
8
#
9
# http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
16
#
17
# Android Build Script.
18
19
20
# Fail on any error.
21
set -e
22
23
. /bin/using.sh # Declare the bash `using` function for configuring toolchains.
24
25
# Display commands being run.
26
set -x
27
28
using cmake-3.17.2
29
using ninja-1.10.0
30
using ndk-r25c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir
31
32
cd $ROOT_DIR
33
./utils/git-sync-deps
34
35
mkdir build
36
cd $ROOT_DIR/build
37
38
# Invoke the build.
39
BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
40
echo $(date): Starting build...
41
cmake \
42
-GNinja \
43
-DCMAKE_MAKE_PROGRAM=ninja \
44
-DCMAKE_BUILD_TYPE=Release \
45
-DANDROID_ABI="$TARGET_ARCH" \
46
-DSHADERC_SKIP_TESTS=ON \
47
-DSPIRV_SKIP_TESTS=ON \
48
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
49
-DANDROID_NDK=$ANDROID_NDK_HOME ..
50
51
echo $(date): Build glslang library...
52
ninja glslang
53
54
echo $(date): Build everything...
55
ninja
56
57
echo $(date): Check Shaderc for copyright notices...
58
ninja check-copyright
59
60
echo $(date): Build completed.
61
62