Skip to content

Commit

Permalink
Carthage XCF support and OpenSSL 1.1.1k (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
julepka committed May 14, 2021
1 parent ada3015 commit ba3e60d
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 111 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/test-objc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,17 @@ jobs:
unit-tests-carthage:
name: Unit tests (Carthage)
runs-on: macos-latest
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Pull Carthage dependencies
run: carthage bootstrap
run: |
carthage bootstrap --use-xcframeworks
- name: Build Carthage projects
run: |
carthage build --no-skip-current --use-xcframeworks
- name: Run unit tests (Swift 4, macOS)
if: always()
run: |
Expand Down Expand Up @@ -168,27 +174,17 @@ jobs:
project-carthage:
name: Carthage project
runs-on: macos-latest
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Pull Carthage dependencies
run: carthage bootstrap
- name: Build Carthage projects - excluding arm64
run: |
# ------ beginning of workaround
# 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 build --no-skip-current
carthage bootstrap --use-xcframeworks
- name: Build Carthage projects
run: |
carthage build --no-skip-current --use-xcframeworks
project-cocoapods:
name: CocoaPods project
Expand Down Expand Up @@ -236,6 +232,8 @@ jobs:
examples:
name: Code examples
runs-on: macos-latest
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out code
uses: actions/checkout@v2
Expand Down Expand Up @@ -266,7 +264,7 @@ jobs:
- name: Build ObjCThemis for Generic Device (Carthage)
if: always()
run: |
carthage bootstrap --platform iOS
carthage bootstrap --platform iOS --use-xcframeworks
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand Down Expand Up @@ -299,6 +297,7 @@ jobs:
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
Expand All @@ -312,7 +311,6 @@ jobs:
# ------ end of workaround
carthage bootstrap --platform iOS
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand Down Expand Up @@ -354,6 +352,7 @@ jobs:
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
Expand Down
31 changes: 23 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,48 @@

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

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

**Hotfix for Apple platforms:**

- `themis` for Carthage switched to using XCFrameworks ([#817](https://github.com/cossacklabs/themis/pull/817)). So, the minimum required Carthage version is now [0.38.0](https://github.com/Carthage/Carthage/releases/tag/0.38.0). You can continue using previous Themis version with previous Carthage versions.
- Updated OpenSSL to the latest 1.1.1k for Carthage ([#817](https://github.com/cossacklabs/themis/pull/817)).

_Code:_

- **Objective-C / Swift**

- `themis` for Carthage now pulls OpenSSL dependency as XCFramework, and Carthage builds `themis` as XCFramework as well. `Themis.xcodeproj` now uses `openssl.xcframwork` and `themis.xcframework`. Carthage dependencies should be built with `--use-xcframeworks` flag ([#817](https://github.com/cossacklabs/themis/pull/817)).
- Updated OpenSSL to the latest 1.1.1k for Carthage ([#817](https://github.com/cossacklabs/themis/pull/817)).
- Tests (Github Actions) are updated to use the latest Carthage version (0.38.0 and up) and `--use-xcframeworks` flag ([#817](https://github.com/cossacklabs/themis/pull/817)).

## [0.13.8](https://github.com/cossacklabs/themis/releases/tag/0.13.8), April 30th 2021

**Hotfix for Apple platforms:**

- Updated OpenSSL to the latest 1.1.1k for SMP and attached `themis.xcframework`. (iOS and macOS).
- New Swift and Objective-C example projects: SPM for iOS and macOS.
- Updated OpenSSL to the latest 1.1.1k for SMP and attached `themis.xcframework` (iOS and macOS) ([#808](https://github.com/cossacklabs/themis/pull/808)).
- New Swift and Objective-C example projects: SPM for iOS and macOS ([#808](https://github.com/cossacklabs/themis/pull/808)).

_Code:_

- **Objective-C / Swift**

- Updated OpenSSL to the latest 1.1.1k for SMP and attached `themis.xcframework`. It is `openssl-apple` version 1.1.11101.
- New Swift and Objective-C example projects: SPM for iOS and macOS.
- Updated SPM examples source code to remove deprecated calls.
- Updated OpenSSL to the latest 1.1.1k for SMP and attached `themis.xcframework`. It is `openssl-apple` version 1.1.11101 ([#808](https://github.com/cossacklabs/themis/pull/808)).
- New Swift and Objective-C example projects: SPM for iOS and macOS ([#808](https://github.com/cossacklabs/themis/pull/808)).
- Updated SPM examples source code to remove deprecated calls ([#808](https://github.com/cossacklabs/themis/pull/808)).

## [0.13.7](https://github.com/cossacklabs/themis/releases/tag/0.13.7), April 28th 2021

**Hotfix for Apple platforms:**

- `themis` is now packaged as xcframework. It is available in the release attached files section.
- `themis` now supports SPM, its installation and usage are very straightforward, just add `themis` as SPM dependency.
- `themis` is now packaged as XCFramework ([#789](https://github.com/cossacklabs/themis/pull/789)). It is available in the release attached files section.
- `themis` now supports SPM ([#789](https://github.com/cossacklabs/themis/pull/789)), its installation and usage are very straightforward, just add `themis` as SPM dependency.

_Code:_

- **Objective-C / Swift**

- Added script to generate xcframework for iOS, iOS Simulator and macOS ([#789](https://github.com/cossacklabs/themis/pull/789)).
- Added script to generate XCFramework for iOS, iOS Simulator and macOS ([#789](https://github.com/cossacklabs/themis/pull/789)).
- Added Package.swift file for SPM ([#789](https://github.com/cossacklabs/themis/pull/789)).

## [0.13.6](https://github.com/cossacklabs/themis/releases/tag/0.13.6), November 23rd 2020
Expand Down
5 changes: 2 additions & 3 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# OpenSSL 1.1.1h
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-iPhone.json" == 1.1.10802
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-MacOSX.json" == 1.1.10802
# OpenSSL 1.1.1k
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" == 1.1.11101
3 changes: 1 addition & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-MacOSX.json" "1.1.10802"
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-iPhone.json" "1.1.10802"
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" "1.1.11101"
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ let package = Package(
targets: [
.binaryTarget(name: "themis",
// update version in URL path
url: "https://github.com/cossacklabs/themis/releases/download/0.13.8/themis.xcframework.zip",
url: "https://github.com/cossacklabs/themis/releases/download/0.13.9/themis.xcframework.zip",
// The scripts/create_xcframework.sh calculates the checksum when generating the XCF.
// Alternatively, run from package directory:
// swift package compute-checksum build/xcf_output/themis.xcframework.zip
checksum: "afda7b2ab0ca86a73f55d309289283e648cd958b5cd9f16dc89d7157317b2165"),
checksum: "5e1e3bb83cf18465e3705dd333fd94510c5a8464680d43025331efa8c999df23"),

]
)

0 comments on commit ba3e60d

Please sign in to comment.