Merge pull request #2473 from thomasvl/update_xcodes
Update xcode version support and travis usage
This commit is contained in:
commit
e43f73e099
@ -8,7 +8,7 @@ language: cpp
|
|||||||
os:
|
os:
|
||||||
- osx
|
- osx
|
||||||
# The Objective C build needs Xcode 7.0 or later.
|
# The Objective C build needs Xcode 7.0 or later.
|
||||||
osx_image: xcode8
|
osx_image: xcode8.1
|
||||||
script:
|
script:
|
||||||
- ./tests.sh $CONFIG
|
- ./tests.sh $CONFIG
|
||||||
env:
|
env:
|
||||||
@ -73,6 +73,10 @@ matrix:
|
|||||||
# we moved to an OS X image that is 10.11.
|
# we moved to an OS X image that is 10.11.
|
||||||
- os: osx
|
- os: osx
|
||||||
env: CONFIG=python_cpp
|
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
|
# Mark the iOS test as flakey as xcodebuild some times fails to start the
|
||||||
# iOS Simulator.
|
# iOS Simulator.
|
||||||
- os: osx
|
- os: osx
|
||||||
|
@ -45,6 +45,8 @@ OPTIONS:
|
|||||||
Skip the invoke of Xcode to test the runtime on OS X.
|
Skip the invoke of Xcode to test the runtime on OS X.
|
||||||
--skip-objc-conformance
|
--skip-objc-conformance
|
||||||
Skip the Objective C conformance tests (run on OS X).
|
Skip the Objective C conformance tests (run on OS X).
|
||||||
|
--xcode-quiet
|
||||||
|
Pass -quiet to xcodebuild.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@ -83,6 +85,7 @@ DO_XCODE_OSX_TESTS=yes
|
|||||||
DO_XCODE_DEBUG=yes
|
DO_XCODE_DEBUG=yes
|
||||||
DO_XCODE_RELEASE=yes
|
DO_XCODE_RELEASE=yes
|
||||||
DO_OBJC_CONFORMANCE_TESTS=yes
|
DO_OBJC_CONFORMANCE_TESTS=yes
|
||||||
|
XCODE_QUIET=no
|
||||||
while [[ $# != 0 ]]; do
|
while [[ $# != 0 ]]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-h | --help )
|
-h | --help )
|
||||||
@ -124,6 +127,9 @@ while [[ $# != 0 ]]; do
|
|||||||
--skip-objc-conformance )
|
--skip-objc-conformance )
|
||||||
DO_OBJC_CONFORMANCE_TESTS=no
|
DO_OBJC_CONFORMANCE_TESTS=no
|
||||||
;;
|
;;
|
||||||
|
--xcode-quiet )
|
||||||
|
XCODE_QUIET=yes
|
||||||
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "ERROR: Unknown option: ${1}" 1>&2
|
echo "ERROR: Unknown option: ${1}" 1>&2
|
||||||
printUsage
|
printUsage
|
||||||
@ -217,17 +223,21 @@ if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
|
||||||
XCODEBUILD_TEST_BASE_IOS=(
|
XCODEBUILD_TEST_BASE_IOS=(
|
||||||
xcodebuild
|
xcodebuild
|
||||||
-project objectivec/ProtocolBuffers_iOS.xcodeproj
|
-project objectivec/ProtocolBuffers_iOS.xcodeproj
|
||||||
-scheme ProtocolBuffers
|
-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;
|
# Don't need to worry about form factors or retina/non retina;
|
||||||
# just pick a mix of OS Versions and 32/64 bit.
|
# just pick a mix of OS Versions and 32/64 bit.
|
||||||
# NOTE: Different Xcode have different simulated hardware/os support.
|
# 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
|
case "${XCODE_VERSION}" in
|
||||||
6.* )
|
6.* )
|
||||||
echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
|
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
|
-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}"
|
echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}"
|
||||||
exit 2
|
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.
|
# Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported.
|
||||||
-destination "platform=OS X,arch=x86_64" # 64bit
|
-destination "platform=OS X,arch=x86_64" # 64bit
|
||||||
)
|
)
|
||||||
readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )"
|
if [[ "${XCODE_QUIET}" == "yes" ]] ; then
|
||||||
readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix.
|
XCODEBUILD_TEST_BASE_OSX+=( -quiet )
|
||||||
|
fi
|
||||||
case "${XCODE_VERSION}" in
|
case "${XCODE_VERSION}" in
|
||||||
6.* )
|
6.* )
|
||||||
echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
|
echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
|
||||||
|
20
tests.sh
20
tests.sh
@ -38,11 +38,21 @@ build_cpp() {
|
|||||||
make check -j2
|
make check -j2
|
||||||
cd conformance && make test_cpp && cd ..
|
cd conformance && make test_cpp && cd ..
|
||||||
|
|
||||||
# Verify benchmarking code can build successfully.
|
# The benchmark code depends on cmake, so test if it is installed before
|
||||||
git submodule init
|
# trying to do the build.
|
||||||
git submodule update
|
# NOTE: The travis macOS images say they have cmake, but the xcode8.1 image
|
||||||
cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../..
|
# appears to be missing it: https://github.com/travis-ci/travis-ci/issues/6996
|
||||||
cd benchmarks && make && ./generate-datasets && cd ..
|
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() {
|
build_cpp_distcheck() {
|
||||||
|
Loading…
Reference in New Issue
Block a user