Skip to content

Commit ef1c911

Browse files
authored
Merge pull request #1666 from firebase/mc/spm
Move non-legacy examples to Swift Package Manager
2 parents 6e483be + 5ae1f99 commit ef1c911

File tree

111 files changed

+1338
-3411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1338
-3411
lines changed

.github/workflows/abtesting.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: A/B Testing
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -32,14 +35,15 @@ env:
3235

3336
jobs:
3437
cocoapods:
35-
name: cocoapods
3638
runs-on: macOS-15
3739
env:
3840
SPM: false
3941
TEST: true
4042
steps:
4143
- name: Checkout
4244
uses: actions/checkout@master
45+
- name: Xcode
46+
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
4347
- name: Setup
4448
run: |
4549
cd abtesting/LegacyABTestingQuickstart
@@ -92,7 +96,6 @@ jobs:
9296
OS: ${{ matrix.os }}
9397
DEVICE: ${{ matrix.device }}
9498
TEST: ${{ matrix.test }}
95-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
9699
steps:
97100
- name: Checkout
98101
uses: actions/checkout@master

.github/workflows/analytics.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Analytics
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -27,8 +30,8 @@ env:
2730
secrets_passphrase: ${{ secrets.GHASECRETSGPGPASSPHRASE1 }}
2831

2932
jobs:
30-
cocoapods:
31-
name: cocoapods - ${{ matrix.os }}
33+
spm:
34+
name: spm (Xcode ${{ matrix.xcode }} - ${{ matrix.os }})
3235
runs-on: macOS-15
3336
strategy:
3437
matrix:
@@ -52,28 +55,25 @@ jobs:
5255
device: localhost
5356
scheme: AnalyticsExampleMac
5457
test: true
58+
5559
env:
56-
SPM: false
60+
SPM: true
5761
LEGACY: false
5862
OS: ${{ matrix.os }}
5963
DEVICE: ${{ matrix.device }}
60-
SCHEME: ${{ matrix.scheme }}
61-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
64+
SCHEME: ${{ matrix.scheme || 'AnalyticsExample' }}
65+
DIR: analytics
6266
steps:
6367
- name: Checkout
6468
uses: actions/checkout@master
69+
- name: Xcode
70+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
6571
- name: Setup
6672
run: |
6773
cd analytics
68-
gem install bundler
69-
bundle install
7074
gem install xcpretty
71-
bundle exec pod install --repo-update
7275
../scripts/install_prereqs/analytics.sh
7376
- name: Build Swift
7477
run: ./scripts/test.sh
7578
env:
7679
TEST: ${{ matrix.test }}
77-
SWIFT_SUFFIX: ""
78-
79-
#TODO: Add `spm` job.

.github/workflows/authentication.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Authentication
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -27,27 +30,26 @@ env:
2730
secrets_passphrase: ${{ secrets.GHASECRETSGPGPASSPHRASE1 }}
2831

2932
jobs:
30-
cocoapods:
31-
name: cocoapods
33+
spm:
3234
runs-on: macOS-15
3335
env:
34-
SPM: false
35-
LEGACY: false
3636
OS: iOS
37+
SETUP: authentication
38+
SPM: true
39+
LEGACY: false
40+
DIR: authentication
3741
DEVICE: iPhone 16
3842
TEST: false
43+
SCHEME: AuthenticationExample
3944
steps:
4045
- name: Checkout
4146
uses: actions/checkout@master
47+
- name: Xcode
48+
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
4249
- name: Setup
4350
run: |
44-
cd authentication
45-
gem install bundler
46-
bundle install
4751
gem install xcpretty
48-
bundle exec pod install --repo-update
49-
../scripts/install_prereqs/authentication.sh
50-
- name: Build Swift
52+
cd $SETUP
53+
../scripts/install_prereqs/${SETUP}.sh
54+
- name: Build and Test SwiftUI (${OS})
5155
run: ./scripts/test.sh
52-
env:
53-
SWIFT_SUFFIX: ""

.github/workflows/check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: check
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
push:

.github/workflows/config.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Remote Config
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -27,28 +30,23 @@ env:
2730
secrets_passphrase: ${{ secrets.GHASECRETSGPGPASSPHRASE1 }}
2831

2932
jobs:
30-
cocoapods:
31-
name: cocoapods
33+
spm:
3234
runs-on: macOS-15
3335
env:
34-
SPM: false
36+
OS: iOS
37+
DEVICE: iPhone 16
38+
DIR: config
39+
SPM: true
3540
LEGACY: false
36-
SWIFT_SUFFIX: ""
41+
SCHEME: ConfigExample
3742
TEST: true
3843
steps:
3944
- name: Checkout
4045
uses: actions/checkout@master
4146
- name: Setup
4247
run: |
4348
cd config
44-
gem install bundler
45-
bundle install
46-
gem install xcpretty
47-
bundle exec pod install --repo-update
4849
../scripts/install_prereqs/config.sh
4950
xcrun simctl boot "iPhone 16"
5051
- name: Build Swift
5152
run: ./scripts/test.sh
52-
env:
53-
OS: iOS
54-
DEVICE: iPhone 16

.github/workflows/crashlytics.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Crashlytics
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -28,7 +31,6 @@ env:
2831

2932
jobs:
3033
cocoapods:
31-
name: cocoapods
3234
runs-on: macOS-15
3335
env:
3436
SPM: false
@@ -79,7 +81,6 @@ jobs:
7981
OS: ${{ matrix.os }}
8082
DEVICE: ${{ matrix.device }}
8183
TEST: ${{ matrix.test }}
82-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
8384
steps:
8485
- name: Checkout
8586
uses: actions/checkout@master

.github/workflows/database.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Database
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -27,30 +30,28 @@ env:
2730
secrets_passphrase: ${{ secrets.GHASECRETSGPGPASSPHRASE1 }}
2831

2932
jobs:
30-
cocoapods:
31-
name: cocoapods
33+
spm-buildonly:
34+
name: spm (non-SwiftUI)
3235
runs-on: macOS-15
3336
env:
34-
SPM: false
35-
LEGACY: false
3637
OS: iOS
38+
SPM: true
39+
LEGACY: false
40+
DIR: database
3741
DEVICE: iPhone 16
3842
TEST: false
43+
SCHEME: DatabaseExampleSwift
3944
steps:
4045
- name: Checkout
4146
uses: actions/checkout@master
4247
- name: Setup
4348
run: |
44-
cd database
45-
gem install bundler
46-
bundle install
4749
gem install xcpretty
48-
bundle exec pod install --repo-update
50+
cd database
4951
../scripts/install_prereqs/database.sh
5052
- name: Build Swift
5153
run: ./scripts/test.sh
52-
env:
53-
SWIFT_SUFFIX: Swift
54+
5455
spm:
5556
name: spm (Xcode ${{ matrix.xcode }} - ${{ matrix.os }})
5657
runs-on: macOS-15
@@ -75,7 +76,6 @@ jobs:
7576
OS: ${{ matrix.os }}
7677
DEVICE: ${{ matrix.device }}
7778
TEST: ${{ matrix.test }}
78-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
7979
steps:
8080
- name: Checkout
8181
uses: actions/checkout@master

.github/workflows/firebaseai.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: firebaseai
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
paths:
@@ -19,31 +22,35 @@ env:
1922

2023
jobs:
2124
spm:
22-
name: spm (Xcode ${{ matrix.xcode }} - ${{ matrix.os }})
23-
runs-on: macOS-15
25+
name: spm (Xcode ${{ matrix.xcode }} - ${{ matrix.platform }})
2426
strategy:
2527
matrix:
26-
xcode: ["16.4"]
27-
os: [iOS]
2828
include:
29-
- os: iOS
29+
- os: macos-15
30+
xcode: "16.4"
31+
platform: iOS
3032
device: iPhone 16
33+
- os: macos-26
34+
xcode: "26.0"
35+
platform: iOS
36+
device: iPhone 16e
37+
runs-on: ${{ matrix.os }}
3138
env:
3239
SETUP: firebaseai
3340
SPM: true
3441
DIR: firebaseai
35-
OS: ${{ matrix.os }}
42+
OS: ${{ matrix.platform }}
3643
DEVICE: ${{ matrix.device }}
3744
TEST: false
38-
XCODE_VERSION: ${{ matrix.xcode }}
39-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
4045
steps:
4146
- name: Checkout
4247
uses: actions/checkout@master
48+
- name: Xcode
49+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
4350
- name: Setup
4451
run: |
4552
gem install xcpretty
4653
- name: Placeholder GoogleService-Info.plist good enough for build only testing.
4754
run: cp ./mock-GoogleService-Info.plist ./firebaseai/GoogleService-Info.plist
48-
- name: Build and Test SwiftUI (${{ matrix.os }})
55+
- name: Build and Test SwiftUI (${{ matrix.platform }})
4956
run: ./scripts/test.sh

.github/workflows/firestore.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Firestore
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -27,27 +30,23 @@ env:
2730
secrets_passphrase: ${{ secrets.GHASECRETSGPGPASSPHRASE1 }}
2831

2932
jobs:
30-
cocoapods:
31-
name: cocoapods
33+
spm:
3234
runs-on: macOS-15
3335
env:
34-
SPM: false
36+
SPM: true
3537
LEGACY: false
3638
OS: iOS
39+
DIR: firestore
3740
DEVICE: iPhone 16
3841
TEST: false
42+
SCHEME: FirestoreExample
3943
steps:
4044
- name: Checkout
4145
uses: actions/checkout@master
4246
- name: Setup
4347
run: |
4448
cd firestore
45-
gem install bundler
46-
bundle install
4749
gem install xcpretty
48-
bundle exec pod install --repo-update
4950
../scripts/install_prereqs/firestore.sh
5051
- name: Build
5152
run: ./scripts/test.sh
52-
env:
53-
SWIFT_SUFFIX: ""

.github/workflows/functions.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Functions
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]
@@ -48,8 +51,6 @@ jobs:
4851
OS: ${{ matrix.os }}
4952
DEVICE: ${{ matrix.device }}
5053
TEST: false
51-
XCODE_VERSION: ${{ matrix.xcode }}
52-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
5354
steps:
5455
- name: Checkout
5556
uses: actions/checkout@master

0 commit comments

Comments
 (0)