Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Travis config for Xcode 8.3 and fix test failures #2378

Merged
merged 4 commits into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode8.2
osx_image: xcode8.3
language: objective-c
rvm:
- 2.2
Expand All @@ -16,7 +16,7 @@ before_install:
- brew update
- brew upgrade carthage || true
- carthage version
- travis_wait carthage bootstrap --platform $PLATFORM
- carthage bootstrap --platform $PLATFORM
script:
- bundle exec rake ci[$PLATFORM]
after_success:
Expand Down
16 changes: 16 additions & 0 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@
06165F2A1D8110E600722320 /* Sources */,
06165F2B1D8110E600722320 /* Frameworks */,
06165F2C1D8110E600722320 /* Resources */,
B6355D621EA9B71800B74B2E /* Copy Carthage Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -782,6 +783,21 @@
shellPath = /bin/sh;
shellScript = "exec \"${SRCROOT}/scripts/build-dependencies.sh\"\n";
};
B6355D621EA9B71800B74B2E /* Copy Carthage Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
FBSnapshotTestCase,
);
name = "Copy Carthage Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = " exec \"${SRCROOT}/scripts/copy-carthage-frameworks.sh\"";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
17 changes: 17 additions & 0 deletions Charts.xcodeproj/xcshareddata/xcschemes/Charts.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "06165F2D1D8110E600722320"
BuildableName = "ChartsTests.xctest"
BlueprintName = "ChartsTests"
ReferencedContainer = "container:Charts.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -61,6 +71,13 @@
ReferencedContainer = "container:Charts.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "FB_REFERENCE_IMAGE_DIR"
value = "$(SOURCE_ROOT)/Tests/ReferenceImages"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
10 changes: 5 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def devices
{
iOS: {
sdk: 'iphonesimulator',
device: "id='22FA2149-1241-469C-BF6D-462D3837DB72'",
uuid: '22FA2149-1241-469C-BF6D-462D3837DB72'
device: "name='iPhone 7'",
name: 'iPhone 7'
},
macOS: {
sdk: 'macosx',
Expand All @@ -49,8 +49,8 @@ def devices
},
tvOS: {
sdk: 'appletvsimulator',
device: "id='5761D8AB-2838-4681-A528-D0949FF240C5'",
uuid: '5761D8AB-2838-4681-A528-D0949FF240C5'
device: "name='Apple TV 1080p'",
name: 'Apple TV 1080p'
}
}
end
Expand Down Expand Up @@ -142,4 +142,4 @@ end
desc 'updated the podspec on cocoapods'
task :update_pod do
sh "bundle exec pod trunk push Charts.podspec --allow-warnings"
end
end
24 changes: 24 additions & 0 deletions scripts/copy-carthage-frameworks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

case "$PLATFORM_NAME" in
macosx) plat=Mac;;
iphone*) plat=iOS;;
watch*) plat=watchOS;;
appletv*) plat=tvOS;;
*) echo "error: Unknown PLATFORM_NAME: $PLATFORM_NAME"; exit 1;;
esac

for (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do
VAR=SCRIPT_INPUT_FILE_$n
framework=$(basename "${!VAR}")
export SCRIPT_INPUT_FILE_$n="$SRCROOT"/Carthage/Build/$plat/"$framework".framework
done

/usr/local/bin/carthage copy-frameworks || exit

for (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do
VAR=SCRIPT_INPUT_FILE_$n
source=${!VAR}.dSYM
dest=${BUILT_PRODUCTS_DIR}/$(basename "$source")
Copy link
Member Author

@liuxuan30 liuxuan30 Apr 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, @petester42 which dSYM is here? and what's for? carthage copy-framework seems will copy FBSnapshotTestCase.framework.dSYM under CodeCoverage/Products/Debug-iphonesimulator/

ditto "$source" "$dest" || exit
done