Skip to content

Commit

Permalink
Updates of example projects for Xcode12.0.1 (cossacklabs#722)
Browse files Browse the repository at this point in the history
* github actions -> use xcode 12.0

* updating ios swift cocoapods example for themis 0.13.3

* disable openssl-1.1.1 subspec

* "fix" carthage build by disabling arm64

* github actions: carthage, exclude arm64 architecture

* update changelog
  • Loading branch information
vixentael committed Oct 13, 2020
1 parent d22bbab commit 1ae32a3
Show file tree
Hide file tree
Showing 37 changed files with 168 additions and 146 deletions.
57 changes: 51 additions & 6 deletions .github/workflows/test-objc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ env:
HACK_REPOSITORY: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
HACK_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

# let's use Xcode 12.2 to test Xcode12-specifics
# let's use Xcode 12 to test Xcode12-specifics
# TODO: change on default Xcode later
DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer
# the list is here
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer

jobs:
unit-tests-cocoapods:
Expand Down Expand Up @@ -171,8 +173,22 @@ jobs:
uses: actions/checkout@v2
- name: Pull Carthage dependencies
run: carthage bootstrap
- name: Build Carthage projects
run: carthage build --no-skip-current
- 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
project-cocoapods:
name: CocoaPods project
Expand Down Expand Up @@ -277,11 +293,26 @@ jobs:
#
# App samples: Objective-C
#
- name: Build sample app (Objective-C, Carthage, iOS)
- name: Build sample app (Objective-C, Carthage, iOS) - excluding arm64
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/objc/iOS-Carthage
# ------ 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 bootstrap --platform iOS
rm -rf DerivedData
xcodebuild \
-derivedDataPath DerivedData \
Expand Down Expand Up @@ -317,10 +348,24 @@ jobs:
#
# App samples: Swift
#
- name: Build sample app (Swift, Carthage, iOS)
- name: Build sample app (Swift, Carthage, iOS) - excluding arm64
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/swift/iOS-Carthage
# ------ 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 bootstrap --platform iOS
rm -rf DerivedData
xcodebuild \
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ _Code:_

- **Objective-C**

- Switched to test on Xcode 12.2 ([#721](https://github.com/cossacklabs/themis/pull/721)).
- Updated Objective-C examples (iOS and macOS, Carthage and CocoaPods) to showcase usage of the newest Secure Cell API: generating symmetric keys and using Secure Cell with Passphrase ([#688](https://github.com/cossacklabs/themis/pull/688)) and to use latest Themis 0.13.2 ([#701](https://github.com/cossacklabs/themis/pull/701), [#703](https://github.com/cossacklabs/themis/pull/703), [#706](https://github.com/cossacklabs/themis/pull/706)).
- Switched to test on Xcode 12.0, disable ARM64 builds for Themis CocoaPods and Themis Carthage ([#721](https://github.com/cossacklabs/themis/pull/721), [#722](https://github.com/cossacklabs/themis/pull/722)).
- Updated Objective-C examples (iOS and macOS, Carthage and CocoaPods) to showcase usage of the newest Secure Cell API: generating symmetric keys and using Secure Cell with Passphrase ([#688](https://github.com/cossacklabs/themis/pull/688)) and to use latest Themis 0.13.2, 0.13.3 ([#701](https://github.com/cossacklabs/themis/pull/701), [#703](https://github.com/cossacklabs/themis/pull/703), [#706](https://github.com/cossacklabs/themis/pull/706)).
- `TSSession` initializer now returns an error (`nil`) when given incorrect key type ([#710](https://github.com/cossacklabs/themis/pull/710)).

- **PHP**
Expand All @@ -45,8 +45,8 @@ _Code:_

- **Swift**

- Switched to test on Xcode 12.2 ([#721](https://github.com/cossacklabs/themis/pull/721)).
- Updated Swift examples (iOS and macOS, Carthage and CocoaPods) to showcase usage of the newest Secure Cell API: generating symmetric keys and using Secure Cell with Passphrase ([#688](https://github.com/cossacklabs/themis/pull/688)) and to use latest Themis 0.13.2 ([#701](https://github.com/cossacklabs/themis/pull/701), [#703](https://github.com/cossacklabs/themis/pull/703), [#706](https://github.com/cossacklabs/themis/pull/706)).
- Switched to test on Xcode 12.0, disable ARM64 builds for Themis CocoaPods and Themis Carthage ([#721](https://github.com/cossacklabs/themis/pull/721), [#722](https://github.com/cossacklabs/themis/pull/722)).
- Updated Swift examples (iOS and macOS, Carthage and CocoaPods) to showcase usage of the newest Secure Cell API: generating symmetric keys and using Secure Cell with Passphrase ([#688](https://github.com/cossacklabs/themis/pull/688)) and to use latest Themis 0.13.2, 0.13.3 ([#701](https://github.com/cossacklabs/themis/pull/701), [#703](https://github.com/cossacklabs/themis/pull/703), [#706](https://github.com/cossacklabs/themis/pull/706)).
- `TSSession` initializer now returns an error (`nil`) when given incorrect key type ([#710](https://github.com/cossacklabs/themis/pull/710)).

_Infrastructure:_
Expand Down
Loading

0 comments on commit 1ae32a3

Please sign in to comment.