Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/shaderc
Path: blob/main/kokoro/macos/build.sh
1560 views
1
#!/bin/bash
2
3
# Copyright (C) 2017 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
# MacOS Build Script.
18
19
# Fail on any error.
20
set -e
21
# Display commands being run.
22
set -x
23
24
BUILD_ROOT=$PWD
25
SRC=$PWD/github/shaderc
26
BUILD_TYPE=$1
27
28
# Get NINJA.
29
wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip
30
unzip -q ninja-mac.zip
31
chmod +x ninja
32
export PATH="$PWD:$PATH"
33
34
cd $SRC
35
./utils/git-sync-deps
36
37
mkdir build
38
cd $SRC/build
39
40
# Invoke the build.
41
BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
42
echo $(date): Starting build...
43
cmake -GNinja -DCMAKE_INSTALL_PREFIX=$KOKORO_ARTIFACTS_DIR/install -DRE2_BUILD_TESTING=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
44
45
echo $(date): Build glslang...
46
ninja glslang-standalone
47
48
echo $(date): Build everything...
49
ninja
50
51
echo $(date): Check Shaderc for copyright notices...
52
ninja check-copyright
53
54
echo $(date): Build completed.
55
56
echo $(date): Starting ctest...
57
ctest --output-on-failure -j4
58
echo $(date): ctest completed.
59
60
# Package the build.
61
ninja install
62
cd $KOKORO_ARTIFACTS_DIR
63
tar czf install.tgz install
64
65