Skip to content

Commit b8de33f

Browse files
authored
Update the Podspec and fix CI issues with Carthage verification. (#817)
* Update podspec to include new source paths. * CI workaround to Carthage issues with Xcode 12
1 parent d1c7b8d commit b8de33f

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
key: 4-carthage-verification-${{ runner.os }}-${{ hashFiles('Cartfile.resolved') }}
2323
- name: Carthage verification
2424
run: |
25-
carthage checkout
26-
carthage build --cache-builds --no-skip-current
25+
./script/carthage checkout
26+
./script/carthage build --cache-builds --no-skip-current
2727
2828
swiftpm-macos:
2929
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}

ReactiveSwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.tvos.deployment_target = "9.0"
1717
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveSwift.git", :tag => "#{s.version}" }
1818
# Directory glob for all Swift files
19-
s.source_files = "Sources/*.{swift}"
19+
s.source_files = ["Sources/*.{swift}", "Sources/**/*.{swift}"]
2020

2121
s.pod_target_xcconfig = {"OTHER_SWIFT_FLAGS[config=Release]" => "$(inherited) -suppress-warnings" }
2222

script/carthage

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
# Adopted from https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323
4+
5+
# carthage.sh
6+
# Usage example: ./carthage.sh build --platform iOS
7+
8+
set -euo pipefail
9+
10+
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
11+
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
12+
13+
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
14+
# the build will fail on lipo due to duplicate architectures.
15+
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $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 "$@"

0 commit comments

Comments
 (0)