From 2754586fa4e4fb75b13cb1915dce566e30b7db2c Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 8 Dec 2016 14:53:04 -0500 Subject: Xcode 8.1 support - Add entries to objectivec/DevTools/full_mac_build.sh - Support `-quiet` via an option on full_mac_build.sh. NOTE: we don't use this on travis because the lack of output for a long time could cause travis to kill the build (when we get a slow VM). - Update travis config to use newer images. --- .travis.yml | 2 +- objectivec/DevTools/full_mac_build.sh | 27 +++++++++++++++++++++++---- tests.sh | 2 +- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd9a5dfb..a34cb83b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ language: cpp os: - osx # The Objective C build needs Xcode 7.0 or later. -osx_image: xcode8 +osx_image: xcode8.1 script: - ./tests.sh $CONFIG env: diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh index 7b335618..ef8fb740 100755 --- a/objectivec/DevTools/full_mac_build.sh +++ b/objectivec/DevTools/full_mac_build.sh @@ -45,6 +45,8 @@ OPTIONS: Skip the invoke of Xcode to test the runtime on OS X. --skip-objc-conformance Skip the Objective C conformance tests (run on OS X). + --xcode-quiet + Pass -quiet to xcodebuild. EOF } @@ -83,6 +85,7 @@ DO_XCODE_OSX_TESTS=yes DO_XCODE_DEBUG=yes DO_XCODE_RELEASE=yes DO_OBJC_CONFORMANCE_TESTS=yes +XCODE_QUIET=no while [[ $# != 0 ]]; do case "${1}" in -h | --help ) @@ -124,6 +127,9 @@ while [[ $# != 0 ]]; do --skip-objc-conformance ) DO_OBJC_CONFORMANCE_TESTS=no ;; + --xcode-quiet ) + XCODE_QUIET=yes + ;; -*) echo "ERROR: Unknown option: ${1}" 1>&2 printUsage @@ -217,17 +223,21 @@ if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*. exit 1 fi +readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" +readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. + if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then XCODEBUILD_TEST_BASE_IOS=( xcodebuild -project objectivec/ProtocolBuffers_iOS.xcodeproj -scheme ProtocolBuffers ) + if [[ "${XCODE_QUIET}" == "yes" ]] ; then + XCODEBUILD_TEST_BASE_IOS+=( -quiet ) + fi # Don't need to worry about form factors or retina/non retina; # just pick a mix of OS Versions and 32/64 bit. # NOTE: Different Xcode have different simulated hardware/os support. - readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" - readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. case "${XCODE_VERSION}" in 6.* ) echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2 @@ -247,6 +257,14 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit ) ;; + 8.1* ) + XCODEBUILD_TEST_BASE_IOS+=( + -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=10.1" # 64bit + -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit + -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.1" # 64bit + ) + ;; * ) echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}" exit 2 @@ -271,8 +289,9 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported. -destination "platform=OS X,arch=x86_64" # 64bit ) - readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" - readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. + if [[ "${XCODE_QUIET}" == "yes" ]] ; then + XCODEBUILD_TEST_BASE_OSX+=( -quiet ) + fi case "${XCODE_VERSION}" in 6.* ) echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2 diff --git a/tests.sh b/tests.sh index eb8255e1..d1e337d5 100755 --- a/tests.sh +++ b/tests.sh @@ -89,7 +89,7 @@ build_csharp() { echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list sudo apt-get update -qq sudo apt-get install -qq mono-devel referenceassemblies-pcl nunit - + # Then install the dotnet SDK as per Ubuntu 14.04 instructions on dot.net. sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 -- cgit v1.2.3 From bc9d0774f374ffa5128e2d5c6c62db556a6a4968 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 8 Dec 2016 16:19:58 -0500 Subject: Skip benchmark test if cmake isn't installed. --- tests.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests.sh b/tests.sh index d1e337d5..ab6d1d61 100755 --- a/tests.sh +++ b/tests.sh @@ -38,11 +38,21 @@ build_cpp() { make check -j2 cd conformance && make test_cpp && cd .. - # Verify benchmarking code can build successfully. - git submodule init - git submodule update - cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../.. - cd benchmarks && make && ./generate-datasets && cd .. + # The benchmark code depends on cmake, so test if it is installed before + # trying to do the build. + # NOTE: The travis macOS images say they have cmake, but the xcode8.1 image + # appears to be missing it: https://github.com/travis-ci/travis-ci/issues/6996 + if [[ $(type cmake 2>/dev/null) ]]; then + # Verify benchmarking code can build successfully. + git submodule init + git submodule update + cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../.. + cd benchmarks && make && ./generate-datasets && cd .. + else + echo "" + echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed." + echo "" + fi } build_cpp_distcheck() { -- cgit v1.2.3 From 70e21d7cf9bce62ccae8ab89088873598b14238e Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Fri, 9 Dec 2016 10:24:33 -0500 Subject: Mark objectivec_cocoapods_integration as failing --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index a34cb83b..7011546e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,6 +73,10 @@ matrix: # we moved to an OS X image that is 10.11. - os: osx env: CONFIG=python_cpp + # This started failing with the OS X 10.12 / Xcode 8.1 image. + # https://github.com/google/protobuf/issues/2472 + - os: osx + env: CONFIG=objectivec_cocoapods_integration # Mark the iOS test as flakey as xcodebuild some times fails to start the # iOS Simulator. - os: osx -- cgit v1.2.3