Add Kokoro presubmit scripts

This commit is contained in:
Ben Clayton
2019-11-08 22:35:41 +00:00
parent 2dfd15462f
commit a4b9640ffc
9 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Format: //devtools/kokoro/config/proto/build.proto
# Location of the continuous bash script in Git.
build_file: "cppdap/kokoro/macos/presubmit.sh"
env_vars {
key: "BUILD_SYSTEM"
value: "cmake"
}
env_vars {
key: "BUILD_TARGET_ARCH"
value: "x64"
}

23
kokoro/macos/presubmit.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e # Fail on any error.
set -x # Display commands being run.
BUILD_ROOT=$PWD
cd github/cppdap
git submodule update --init
if [ "$BUILD_SYSTEM" == "cmake" ]; then
mkdir build
cd build
cmake .. -DCPPDAP_BUILD_EXAMPLES=1 -DCPPDAP_BUILD_TESTS=1 -DCPPDAP_WARNINGS_AS_ERRORS=1
make -j$(sysctl -n hw.logicalcpu)
./cppdap-unittests
else
echo "Unknown build system: $BUILD_SYSTEM"
exit 1
fi