summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2020-10-01 14:09:05 -0400
committerJoel Fischer <joeljfischer@gmail.com>2020-10-01 14:09:05 -0400
commita0b24fc90cb764dea434220d8c996c9bac987ea4 (patch)
tree0dcd89a9f149820465bdf296429796373c3b35aa
parent50ade80ebb005ca70eb22a03d3421e9a7e49b92f (diff)
downloadsdl_ios-a0b24fc90cb764dea434220d8c996c9bac987ea4.tar.gz
Update for Xcode 12
-rw-r--r--.github/workflows/test.yml9
-rw-r--r--carthage-build.sh6
2 files changed, 8 insertions, 7 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d30dcd7e5..0cb1567f6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -5,7 +5,7 @@ on: [push, pull_request]
env:
PROJECT: 'SmartDeviceLink-iOS.xcodeproj'
- DESTINATION: 'platform=iOS Simulator,name=iPhone 11,OS=13.5'
+ DESTINATION: 'platform=iOS Simulator,name=iPhone 11,OS=14.0'
jobs:
build:
@@ -27,7 +27,7 @@ jobs:
# Select the Xcode version (the platform/simulator/OS available for testing depend on the Xcode version)
- name: Select Xcode version
- run: sudo xcode-select -switch /Applications/Xcode_11.5.app
+ run: sudo xcode-select -switch /Applications/Xcode_12.0.app
- name: Build
run: set -o pipefail && xcodebuild -scheme "${{ matrix.scheme }}" -destination "$DESTINATION" build | xcpretty --color --simple
@@ -55,7 +55,8 @@ jobs:
- name: Installing dependencies
if: steps.carthage-cache.outputs.cache-hit != 'true'
- run: carthage bootstrap --no-use-binaries --platform iOS --cache-builds
+ run: bash carthage-build.sh --no-use-binaries --platform iOS --cache-builds
+ # run: carthage bootstrap --no-use-binaries --platform iOS --cache-builds
# Print the available Xcode versions
- name: Get available Xcode versions on the server
@@ -63,7 +64,7 @@ jobs:
# Select the Xcode version (the platform/simulator/OS available for testing depend on the Xcode version)
- name: Select Xcode version
- run: sudo xcode-select -switch /Applications/Xcode_11.5.app
+ run: sudo xcode-select -switch /Applications/Xcode_12.0.app
# Split build into build-only and test-only as it is faster than building and running in one step
- name: Building unit tests
diff --git a/carthage-build.sh b/carthage-build.sh
index 3c9a86c73..0dcdefdee 100644
--- a/carthage-build.sh
+++ b/carthage-build.sh
@@ -11,11 +11,11 @@ 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.
-# Xcode 12 GM (12A7209)
-echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7209 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
+CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
+echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $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 build "$@"
+carthage build "$@" \ No newline at end of file