Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
e43f73e0
Commit
e43f73e0
authored
Dec 09, 2016
by
Thomas Van Lenten
Committed by
GitHub
Dec 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2473 from thomasvl/update_xcodes
Update xcode version support and travis usage
parents
243ebec8
70e21d7c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
10 deletions
+43
-10
.travis.yml
.travis.yml
+5
-1
full_mac_build.sh
objectivec/DevTools/full_mac_build.sh
+23
-4
tests.sh
tests.sh
+15
-5
No files found.
.travis.yml
View file @
e43f73e0
...
...
@@ -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
:
...
...
@@ -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
...
...
objectivec/DevTools/full_mac_build.sh
View file @
e43f73e0
...
...
@@ -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
...
...
tests.sh
View file @
e43f73e0
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment