Debian Codegraph @

kokoro/macos/presubmit.sh

raw symbols SCIP
1 #!/bin/bash
2
3 # Copyright 2020 Google LLC
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 # https://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 set -e # Fail on any error.
18 set -x # Display commands being run.
19
20 BUILD_ROOT=$PWD
21
22 cd github/cppdap
23
24 git submodule update --init
25
26 if [ "$BUILD_SYSTEM" == "cmake" ]; then
27 mkdir build
28 cd build
29
30 cmake .. -DCPPDAP_BUILD_EXAMPLES=1 -DCPPDAP_BUILD_TESTS=1 -DCPPDAP_WARNINGS_AS_ERRORS=1
31 make -j$(sysctl -n hw.logicalcpu)
32
33 ./cppdap-unittests
34 else
35 echo "Unknown build system: $BUILD_SYSTEM"
36 exit 1
37 fi