Skip to content

Commit

Permalink
Update Carthage examples to unbreak tests (#829)
Browse files Browse the repository at this point in the history
* Cherry-pick: Updated Carthage examples to use XCF (#823)

* Fixing Carthage examples embed settings (#827)

* fix changelog conflict
  • Loading branch information
julepka authored May 26, 2021
1 parent ba3e60d commit 043494d
Show file tree
Hide file tree
Showing 37 changed files with 227 additions and 237 deletions.
52 changes: 6 additions & 46 deletions .github/workflows/test-objc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ jobs:
find tests/objcthemis -type f -name Podfile -print0 | xargs -0 \
sed -E -i '' \
-e "s|(pod 'themis.*').*|\1, :git => \"https://github.com/${HACK_REPOSITORY}.git\", :commit => \"$HACK_SHA\"|"
- name: CocoaPods cache
uses: actions/cache@v1
with:
path: ~/.cocoapods
key: ${{ runner.os }}-cocoapods-common
- name: Update CocoaPods repo
run: |
pod repo update
Expand Down Expand Up @@ -250,11 +245,6 @@ jobs:
find docs/examples -type f -name Podfile -print0 | xargs -0 \
sed -E -i '' \
-e "s|(pod 'themis(/[a-z-]*)*').*|\1, :git => \"https://github.com/${HACK_REPOSITORY}.git\", :commit => \"$HACK_SHA\"|"
- name: CocoaPods cache
uses: actions/cache@v1
with:
path: ~/.cocoapods
key: ${{ runner.os }}-cocoapods-common
- name: Update CocoaPods repo
run: |
pod repo update
Expand Down Expand Up @@ -291,26 +281,11 @@ jobs:
#
# App samples: Objective-C
#
- name: Build sample app (Objective-C, Carthage, iOS) - excluding arm64
- name: Build sample app (Objective-C, Carthage, iOS)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/objc/iOS-Carthage
# ------ beginning of workaround
# This workaround lives here until we update example projects
# from https://github.com/Carthage/Carthage/issues/3019#issuecomment-699143260
# supports Xcode 12.0.1
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"
# ------ end of workaround
carthage bootstrap --platform iOS
carthage bootstrap --platform iOS --use-xcframeworks
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand All @@ -323,7 +298,7 @@ jobs:
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/objc/macOS-Carthage
carthage bootstrap --platform macOS
carthage bootstrap --platform macOS --use-xcframeworks
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand All @@ -346,26 +321,11 @@ jobs:
#
# App samples: Swift
#
- name: Build sample app (Swift, Carthage, iOS) - excluding arm64
- name: Build sample app (Swift, Carthage, iOS)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/swift/iOS-Carthage
# ------ beginning of workaround
# This workaround lives here until we update example projects
# from https://github.com/Carthage/Carthage/issues/3019#issuecomment-699143260
# supports Xcode 12.0.1
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"
# ------ end of workaround
carthage bootstrap --platform iOS
carthage bootstrap --platform iOS --use-xcframeworks
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand All @@ -378,7 +338,7 @@ jobs:
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/swift/macOS-Carthage
carthage bootstrap --platform macOS
carthage bootstrap --platform macOS --use-xcframeworks
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Changes that are currently in development and have not been released yet.

- Updated Carthage examples to use Themis XCFramework ([#823](https://github.com/cossacklabs/themis/pull/823)).

## [0.13.9](https://github.com/cossacklabs/themis/releases/tag/0.13.9), May 14th 2021

**Hotfix for Apple platforms:**
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/objc/iOS-Carthage/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "cossacklabs/themis" ~> 0.13.3
github "cossacklabs/themis" ~> 0.13.9
5 changes: 2 additions & 3 deletions docs/examples/objc/iOS-Carthage/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-MacOSX.json" "1.1.107"
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-iPhone.json" "1.1.107"
github "cossacklabs/themis" "0.13.3"
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" "1.1.11101"
github "cossacklabs/themis" "0.13.9"
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
6DEC19AF265BDD180042EA63 /* themis.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DCCB20D264EFFE8008072EF /* themis.xcframework */; };
6DEC19B0265BDD180042EA63 /* themis.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6DCCB20D264EFFE8008072EF /* themis.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9F00EA2E2241539600EC1EF3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F00EA2D2241539600EC1EF3 /* AppDelegate.m */; };
9F00EA312241539600EC1EF3 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F00EA302241539600EC1EF3 /* ViewController.m */; };
9F00EA342241539600EC1EF3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9F00EA322241539600EC1EF3 /* Main.storyboard */; };
Expand All @@ -17,10 +19,24 @@
9F00EA532241563800EC1EF3 /* client.priv in Resources */ = {isa = PBXBuildFile; fileRef = 9F00EA4F2241563800EC1EF3 /* client.priv */; };
9F00EA542241563800EC1EF3 /* server.pub in Resources */ = {isa = PBXBuildFile; fileRef = 9F00EA502241563800EC1EF3 /* server.pub */; };
9F00EA552241563800EC1EF3 /* client.pub in Resources */ = {isa = PBXBuildFile; fileRef = 9F00EA512241563800EC1EF3 /* client.pub */; };
9F1444A724E6D3D0008B6C73 /* themis.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F1444A524E6D3BD008B6C73 /* themis.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
6DEC19B1265BDD180042EA63 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
6DEC19B0265BDD180042EA63 /* themis.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
6DCCB20D264EFFE8008072EF /* themis.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = themis.xcframework; path = Carthage/Build/themis.xcframework; sourceTree = "<group>"; };
9F00EA292241539600EC1EF3 /* ThemisTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ThemisTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
9F00EA2C2241539600EC1EF3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
9F00EA2D2241539600EC1EF3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand All @@ -35,15 +51,14 @@
9F00EA4F2241563800EC1EF3 /* client.priv */ = {isa = PBXFileReference; lastKnownFileType = file; path = client.priv; sourceTree = "<group>"; };
9F00EA502241563800EC1EF3 /* server.pub */ = {isa = PBXFileReference; lastKnownFileType = file; path = server.pub; sourceTree = "<group>"; };
9F00EA512241563800EC1EF3 /* client.pub */ = {isa = PBXFileReference; lastKnownFileType = file; path = client.pub; sourceTree = "<group>"; };
9F1444A524E6D3BD008B6C73 /* themis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = themis.framework; path = Carthage/Build/iOS/themis.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
9F00EA262241539600EC1EF3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9F1444A724E6D3D0008B6C73 /* themis.framework in Frameworks */,
6DEC19AF265BDD180042EA63 /* themis.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -87,7 +102,7 @@
9F00EA422241555100EC1EF3 /* Frameworks */ = {
isa = PBXGroup;
children = (
9F1444A524E6D3BD008B6C73 /* themis.framework */,
6DCCB20D264EFFE8008072EF /* themis.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -113,7 +128,7 @@
9F00EA252241539600EC1EF3 /* Sources */,
9F00EA262241539600EC1EF3 /* Frameworks */,
9F00EA272241539600EC1EF3 /* Resources */,
6D7E2AB025372F1500B16F8F /* ShellScript */,
6DEC19B1265BDD180042EA63 /* Embed Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -173,28 +188,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
6D7E2AB025372F1500B16F8F /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/themis.framework",
);
outputFileListPaths = (
);
outputPaths = (
"$(BUILT_PRODUCT_DIR)/$(FRAMEWORKS_FOLDER_PATH)/themis.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n/usr/local/bin/carthage copy-frameworks\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
9F00EA252241539600EC1EF3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -353,12 +346,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
"$(PROJECT_DIR)/Carthage/Build",
);
INFOPLIST_FILE = ThemisTest/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
Expand All @@ -378,12 +372,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
"$(PROJECT_DIR)/Carthage/Build",
);
INFOPLIST_FILE = ThemisTest/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 043494d

Please sign in to comment.