Skip to content

Commit ab7228e

Browse files
authored
[Config] Add CocoaPods test app to test library imports (#11734)
1 parent 2e7eecd commit ab7228e

File tree

18 files changed

+327
-35
lines changed

18 files changed

+327
-35
lines changed

.github/workflows/client_app.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: client_app
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/client_app.yml"
7+
- "Package.swift"
8+
- ".swiftpm/*"
9+
- "*.podspec"
10+
- "scripts/install_prereqs.sh"
11+
- "scripts/build.sh"
12+
- "SwiftPMTests/*"
13+
- "Gemfile*"
14+
schedule:
15+
# Run every day at 12am (PST) - cron uses UTC times
16+
- cron: "0 8 * * *"
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
client-app-spm:
24+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
25+
env:
26+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
27+
runs-on: macos-12
28+
strategy:
29+
matrix:
30+
platform: [iOS]
31+
# TODO(Xcode 14.3): Remove above line and uncomment below array when GHA
32+
# supports Ventura/Xcode 14.3.
33+
# platform: [iOS, tvOS, macOS, catalyst]
34+
steps:
35+
- uses: actions/checkout@v3
36+
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
37+
with:
38+
cache_key: ${{ matrix.os }}
39+
- name: Build Client App –– ${{ matrix.platform }}
40+
run: scripts/third_party/travis/retry.sh ./scripts/build.sh SwiftPMClientApp ${{ matrix.platform }} xcodebuild
41+
42+
client-app-cocoapods:
43+
# Don't run on private repo unless it is a PR.
44+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
45+
runs-on: macos-12
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
49+
with:
50+
cache_key: ${{ matrix.os }}
51+
- uses: ruby/setup-ruby@v1
52+
- name: Setup Bundler
53+
run: scripts/setup_bundler.sh
54+
- name: Prereqs
55+
run: scripts/install_prereqs.sh ClientApp iOS xcodebuild
56+
- name: Build
57+
run: scripts/build.sh CocoaPodsClientApp iOS xcodebuild

.github/workflows/spm.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,3 @@ jobs:
7777
run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm
7878
- name: Analytics Build Tests
7979
run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm
80-
81-
client-app:
82-
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
83-
env:
84-
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
85-
runs-on: macos-12
86-
strategy:
87-
matrix:
88-
platform: [iOS]
89-
# TODO(Xcode 14.3): Remove above line and uncomment below array when GHA
90-
# supports Ventura/Xcode 14.3.
91-
# platform: [iOS, tvOS, macOS, catalyst]
92-
steps:
93-
- uses: actions/checkout@v3
94-
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
95-
with:
96-
cache_key: ${{ matrix.os }}
97-
- name: Build Client App –– ${{ matrix.platform }}
98-
run: scripts/third_party/travis/retry.sh ./scripts/build.sh SwiftPMClientApp ${{ matrix.platform }} xcodebuild
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.files.user-selected.read-only</key>
8+
<true/>
9+
</dict>
10+
</plist>

SwiftPMTests/ClientApp/ClientApp.xcodeproj/project.pbxproj

Lines changed: 182 additions & 11 deletions
Large diffs are not rendered by default.

SwiftPMTests/ClientApp/Podfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
source 'https://github.com/firebase/SpecsDev.git'
2+
source 'https://github.com/firebase/SpecsStaging.git'
3+
source 'https://cdn.cocoapods.org/'
4+
5+
# Uncomment the next line to define a global platform for your project
6+
platform :ios, '13.0'
7+
8+
target 'ClientApp-CocoaPods' do
9+
# Comment the next line if you don't want to use dynamic frameworks
10+
use_frameworks!
11+
12+
# Pods for ClientApp-CocoaPods
13+
pod 'FirebaseCore', :path => '../../'
14+
pod 'FirebaseInstallations', :path => '../../'
15+
pod 'FirebaseAnalytics' # Binary pods don't work with `:path`.
16+
pod 'FirebaseAnalyticsOnDeviceConversion', :path => '../../'
17+
pod 'FirebaseAnalyticsSwift', :path => '../../'
18+
pod 'FirebaseABTesting', :path => '../../'
19+
pod 'FirebaseAppCheck', :path => '../../'
20+
pod 'FirebaseRemoteConfig', :path => '../../'
21+
pod 'FirebaseRemoteConfigSwift', :path => '../../'
22+
pod 'FirebaseAppDistribution', :path => '../../'
23+
pod 'FirebaseAuth', :path => '../../'
24+
pod 'FirebaseCrashlytics', :path => '../../'
25+
pod 'FirebaseDatabase', :path => '../../'
26+
pod 'FirebaseDatabaseSwift', :path => '../../'
27+
pod 'FirebaseDynamicLinks', :path => '../../'
28+
pod 'FirebaseFirestore', :path => '../../'
29+
pod 'FirebaseFirestoreSwift', :path => '../../'
30+
pod 'FirebaseFunctions', :path => '../../'
31+
pod 'FirebaseInAppMessaging', :path => '../../'
32+
pod 'FirebaseInAppMessagingSwift', :path => '../../'
33+
pod 'FirebaseMessaging', :path => '../../'
34+
pod 'FirebasePerformance', :path => '../../'
35+
pod 'FirebaseStorage', :path => '../../'
36+
pod 'FirebaseMLModelDownloader', :path => '../../'
37+
pod 'Firebase', :path => '../../'
38+
39+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

0 commit comments

Comments
 (0)