Skip to content

Commit 4ac2833

Browse files
authored
Firmer SPM dependency versions and iOS device build check (#7838)
1 parent f3d030d commit 4ac2833

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

.github/workflows/spm.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,24 @@ jobs:
2020
runs-on: macOS-latest
2121
steps:
2222
- uses: actions/checkout@v2
23-
- name: Xcode 12
24-
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
2523
- name: Initialize xcodebuild
2624
run: xcodebuild -list
2725
- name: iOS Unit Tests
2826
run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm
2927

28+
# Test iOS Device build since some Firestore dependencies build different files.
29+
iOS-Device:
30+
# Don't run on private repo unless it is a PR.
31+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
32+
runs-on: macOS-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Initialize xcodebuild
36+
run: xcodebuild -list
37+
- name: iOS Unit Tests
38+
# TODO (#7785) Change to Firebase-Package when #7785 is resolved.
39+
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift-Beta iOS-device spmbuildonly
40+
3041
platforms:
3142
# Don't run on private repo unless it is a PR.
3243
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
@@ -39,8 +50,6 @@ jobs:
3950
test: [objc-import-test, swift-test, version-test]
4051
steps:
4152
- uses: actions/checkout@v2
42-
- name: Xcode 12
43-
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
4453
- name: Initialize xcodebuild
4554
run: xcodebuild -list
4655
- name: Unit Tests

Package.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,15 @@ let package = Package(
102102
),
103103
],
104104
dependencies: [
105-
.package(name: "Promises", url: "https://github.com/google/promises.git", "1.2.8" ..< "1.3.0"),
105+
.package(
106+
name: "Promises",
107+
url: "https://github.com/google/promises.git",
108+
"1.2.8" ..< "1.3.0"
109+
),
106110
.package(
107111
name: "SwiftProtobuf",
108112
url: "https://github.com/apple/swift-protobuf.git",
109-
from: "1.14.0"
113+
"1.15.0" ..< "2.0.0"
110114
),
111115
.package(
112116
name: "GoogleAppMeasurement",
@@ -131,18 +135,17 @@ let package = Package(
131135
.package(
132136
name: "nanopb",
133137
url: "https://github.com/firebase/nanopb.git",
134-
// This revision adds SPM enablement to the 0.3.9.6 release tag.
135138
"2.30908.0" ..< "2.30909.0"
136139
),
137140
.package(
138141
name: "abseil",
139142
url: "https://github.com/firebase/abseil-cpp-SwiftPM.git",
140-
from: "0.20200225.1"
143+
"0.20200225.3" ..< "0.20200226.0"
141144
),
142145
.package(
143146
name: "gRPC",
144147
url: "https://github.com/firebase/grpc-SwiftPM.git",
145-
"1.28.3" ..< "1.29.0"
148+
"1.28.4" ..< "1.29.0"
146149
),
147150
.package(
148151
name: "OCMock",

scripts/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ product can be one of:
4646
4747
platform can be one of:
4848
iOS (default)
49+
iOS-device
4950
macOS
5051
tvOS
5152
watchOS
@@ -154,6 +155,10 @@ else
154155
)
155156
fi
156157

158+
ios_device_flags=(
159+
-sdk 'iphoneos'
160+
)
161+
157162
ipad_flags=(
158163
-sdk 'iphonesimulator'
159164
-destination 'platform=iOS Simulator,name=iPad Pro (9.7-inch)'
@@ -183,6 +188,11 @@ case "$platform" in
183188
gen_platform=ios
184189
;;
185190

191+
iOS-device)
192+
xcb_flags=("${ios_device_flags[@]}")
193+
gen_platform=ios
194+
;;
195+
186196
iPad)
187197
xcb_flags=("${ipad_flags[@]}")
188198
;;

0 commit comments

Comments
 (0)