Add Kokoro presubmit scripts
This commit is contained in:
19
kokoro/ubuntu/gcc-x64/cmake/asan/presubmit.cfg
Normal file
19
kokoro/ubuntu/gcc-x64/cmake/asan/presubmit.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Location of the continuous bash script in Git.
|
||||
build_file: "cppdap/kokoro/ubuntu/presubmit.sh"
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SYSTEM"
|
||||
value: "cmake"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_TARGET_ARCH"
|
||||
value: "x64"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SANITIZER"
|
||||
value: "asan"
|
||||
}
|
||||
14
kokoro/ubuntu/gcc-x64/cmake/presubmit.cfg
Normal file
14
kokoro/ubuntu/gcc-x64/cmake/presubmit.cfg
Normal file
@@ -0,0 +1,14 @@
|
||||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Location of the continuous bash script in Git.
|
||||
build_file: "cppdap/kokoro/ubuntu/presubmit.sh"
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SYSTEM"
|
||||
value: "cmake"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_TARGET_ARCH"
|
||||
value: "x64"
|
||||
}
|
||||
19
kokoro/ubuntu/gcc-x64/cmake/tsan/presubmit.cfg
Normal file
19
kokoro/ubuntu/gcc-x64/cmake/tsan/presubmit.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Location of the continuous bash script in Git.
|
||||
build_file: "cppdap/kokoro/ubuntu/presubmit.sh"
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SYSTEM"
|
||||
value: "cmake"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_TARGET_ARCH"
|
||||
value: "x64"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SANITIZER"
|
||||
value: "tsan"
|
||||
}
|
||||
35
kokoro/ubuntu/presubmit.sh
Executable file
35
kokoro/ubuntu/presubmit.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/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
|
||||
|
||||
build_and_run() {
|
||||
cmake .. -DCPPDAP_BUILD_EXAMPLES=1 -DCPPDAP_BUILD_TESTS=1 -DCPPDAP_WARNINGS_AS_ERRORS=1 $1
|
||||
make --jobs=$(nproc)
|
||||
|
||||
./cppdap-unittests
|
||||
}
|
||||
|
||||
if [ "$BUILD_SANITIZER" == "asan" ]; then
|
||||
build_and_run "-DCPPDAP_ASAN=1"
|
||||
elif [ "$BUILD_SANITIZER" == "msan" ]; then
|
||||
build_and_run "-DCPPDAP_MSAN=1"
|
||||
elif [ "$BUILD_SANITIZER" == "tsan" ]; then
|
||||
build_and_run "-DCPPDAP_TSAN=1"
|
||||
else
|
||||
build_and_run
|
||||
fi
|
||||
else
|
||||
echo "Unknown build system: $BUILD_SYSTEM"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user