From 520c601c99012101c816b6ccc89e8d6fc28fdbb8 Mon Sep 17 00:00:00 2001 From: "David L. Jones" Date: Tue, 29 Mar 2022 14:32:10 -0700 Subject: [PATCH] Temporary Kokoro build for macos-next. (#9693) This build will be used to troubleshoot building on a newer macOS image. Once it is stable, this config will replace the "macos" build. --- kokoro/macos-next/README.md | 4 ++++ kokoro/macos-next/cpp/build.sh | 36 ++++++++++++++++++++++++++++ kokoro/macos-next/cpp/continuous.cfg | 13 ++++++++++ kokoro/macos-next/cpp/presubmit.cfg | 13 ++++++++++ 4 files changed, 66 insertions(+) create mode 100644 kokoro/macos-next/README.md create mode 100755 kokoro/macos-next/cpp/build.sh create mode 100644 kokoro/macos-next/cpp/continuous.cfg create mode 100644 kokoro/macos-next/cpp/presubmit.cfg diff --git a/kokoro/macos-next/README.md b/kokoro/macos-next/README.md new file mode 100644 index 0000000000..46578556f5 --- /dev/null +++ b/kokoro/macos-next/README.md @@ -0,0 +1,4 @@ +# macOS-next + +This builder is temporary for developing and testing builds using the "next" +macOS version without affecting the ordinary builds. diff --git a/kokoro/macos-next/cpp/build.sh b/kokoro/macos-next/cpp/build.sh new file mode 100755 index 0000000000..67466ccca1 --- /dev/null +++ b/kokoro/macos-next/cpp/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash -ex +# +# Build file to set up and run tests + +# NOTE: in order to avoid blocking anyone, this job always succeeds for now. +exit 0 + +# Set up artifact output location +: ${KOKORO_ARTIFACTS_DIR:=/tmp/kokoro_artifacts} +: ${BUILD_LOGDIR:=$KOKORO_ARTIFACTS_DIR/logs} +mkdir -p ${BUILD_LOGDIR} + +# Change to repo root +cd $(dirname $0)/../../.. + +# Update submodules +git submodule update --init --recursive + +# Build in a separate directory +mkdir -p cmake/build +cd cmake/build + +# Print some basic info +xcode-select --print-path +xcodebuild -version +xcrun --show-sdk-path + +# Build everything first +cmake -G Xcode ../.. \ + 2>&1 | tee ${BUILD_LOGDIR}/00_configure_sponge_log.log +cmake --build . --config Debug \ + 2>&1 | tee ${BUILD_LOGDIR}/01_build_sponge_log.log + +# Run tests +ctest -C Debug --verbose --quiet \ + --output-log ${BUILD_LOGDIR}/02_test_sponge_log.log diff --git a/kokoro/macos-next/cpp/continuous.cfg b/kokoro/macos-next/cpp/continuous.cfg new file mode 100644 index 0000000000..32f1b1da5a --- /dev/null +++ b/kokoro/macos-next/cpp/continuous.cfg @@ -0,0 +1,13 @@ +# Config file for running tests in Kokoro + +# Location of the build script in repository +build_file: "protobuf/kokoro/macos-next/cpp/build.sh" +timeout_mins: 1440 + +# Upload logs +action: { + define_artifacts: { + regex: "protobuf/cmake/build/**/*sponge_log.log" + regex: "protobuf/cmake/build/**/*sponge_log.xml" + } +} diff --git a/kokoro/macos-next/cpp/presubmit.cfg b/kokoro/macos-next/cpp/presubmit.cfg new file mode 100644 index 0000000000..32f1b1da5a --- /dev/null +++ b/kokoro/macos-next/cpp/presubmit.cfg @@ -0,0 +1,13 @@ +# Config file for running tests in Kokoro + +# Location of the build script in repository +build_file: "protobuf/kokoro/macos-next/cpp/build.sh" +timeout_mins: 1440 + +# Upload logs +action: { + define_artifacts: { + regex: "protobuf/cmake/build/**/*sponge_log.log" + regex: "protobuf/cmake/build/**/*sponge_log.xml" + } +}