Skip to content

Commit 80f7c58

Browse files
committed
project: update CI to run xcarthage-bootstrap.sh
1 parent 714dff9 commit 80f7c58

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@master
1919
- name: Compile and Test
2020
run: |
21-
carthage bootstrap --platform iOS --cache-builds && xcodebuild clean test -project RxFlow.xcodeproj -scheme RxFlow -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
21+
./xcarthage-bootstrap.sh --platform iOS --cache-builds && xcodebuild clean test -project RxFlow.xcodeproj -scheme RxFlow -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
2222
env:
2323
destination: ${{ matrix.destination }}
2424

xcarthage-bootstrap.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# carthage-bootstrap.sh
2+
# Usage example: ./carthage-bootstrap.sh --platform iOS
3+
4+
set -euo pipefail
5+
6+
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
7+
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
8+
9+
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
10+
# the build will fail on lipo due to duplicate architectures.
11+
12+
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
13+
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
14+
15+
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
16+
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
17+
18+
export XCODE_XCCONFIG_FILE="$xcconfig"
19+
carthage bootstrap "$@"

xcarthage.sh xcarthage-update.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# carthage-build.sh
2-
# Usage example: ./carthage-build.sh --platform iOS
1+
# carthage-update.sh
2+
# Usage example: ./carthage-update.sh --platform iOS
33

44
set -euo pipefail
55

0 commit comments

Comments
 (0)