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

Bump travis ci to use xcode 12 #4476

Merged
merged 5 commits into from
Oct 19, 2020

Conversation

jjatie
Copy link
Collaborator

@jjatie jjatie commented Sep 23, 2020

This is just to bump travis to use the latest Swift compiler. Project changes for Xcode 12 will come in a separate PR

@jjatie jjatie changed the base branch from master to ResolveConflict September 23, 2020 09:11
@jjatie jjatie closed this Sep 23, 2020
@jjatie jjatie reopened this Sep 23, 2020
@liuxuan30
Copy link
Member

*** Checking out ios-snapshot-test-case at "6.2.0"
*** Cloning ios-snapshot-test-case
*** xcodebuild output can be found in /var/folders/z3/_825pg0s3jvf0hb_q8kzmg5h0000gn/T/carthage-xcodebuild.iiamXF.log
*** Downloading ios-snapshot-test-case.framework binary at "6.2.0"
***  Skipped installing ios-snapshot-test-case.framework binary due to the error:
	"Incompatible Swift version - framework was built with 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7) and the local version is 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)."

ios-snapshot-test-case is not updated so the binary framework failed. I checked there is no new update on their repo. So seems we have to build from scratch to avoid this at least for now

@liuxuan30
Copy link
Member

liuxuan30 commented Oct 9, 2020

@jjatie seems the problem is Carthage after changing to source compile. Carthage/Carthage#3019

there is a workaround mentioned here

Workaround that works with both Xcode 11 and 12

Works with all versions of Xcode 12 (except beta 1 and 2; but no-one should be using those anymore). Once XCFrameworks support lands in Carthage this workaround won’t be needed. However not that XCFrameworks puts some strict requirements on projects that most projects don’t comply with.

Note: This is a change from before where the script excluded arm64 for simulators by individual Xcode 12 version. It now removes it from all Xcode 12 based builds.

How to use

Save the script (👇) to your project (e.g. as a carthage.sh file).
Make the script executable chmod +x carthage.sh
Instead of calling carthage ... call ./carthage.sh ...
E.g. ./carthage.sh build or ./carthage.sh update --use-submodules

Script

#!/usr/bin/env bash

# carthage.sh
# Usage example: ./carthage.sh build --platform iOS

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"

…e#3019

there is a workaround mentioned [here](Carthage/Carthage#3019 (comment))
making travis to build from carthage.sh until the root issue is fixed.
@liuxuan30
Copy link
Member

liuxuan30 commented Oct 9, 2020

@jjatie I'm having a hard time on my side that most of the tests failed even in the Xcode itself.
I'm seeing the failures because image diff exceeds the tolerance. however I couldn't say who's fault. (likely Apple?)

for example, the diff image on my side is (bold area is the image diff):
image

I also roll back to my commit fix line chart UT failures, it still fails. so I think this might because of the new iOS14 SDK? I'm on Xcode 12.0.1 right now.

could you try it on your side to see what will happen?

if you got similar issues like me, do you think this is a bug and we should report to apple, or we just recreate new images?

@liuxuan30
Copy link
Member

I have made the image refresh a single commit so we can move on or revert. I'm really confused, but seems there is some hidden changes in the UIKit or CoreGraphics rendering component that causes the slight difference.
@jjatie I still need you to help to take a look at old images and have consistent behaviours like me. thank you

@liuxuan30
Copy link
Member

let's move ahead

@liuxuan30 liuxuan30 merged commit 96ac08d into ResolveConflict Oct 19, 2020
@liuxuan30 liuxuan30 deleted the bump-travis-ci-to-use-xcode-12 branch October 19, 2020 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants