Skip to content

Commit 873887c

Browse files
authored
[Infra] Switch zip building over to Xcode 15.2 (#12737)
1 parent 5b6940e commit 873887c

File tree

3 files changed

+74
-72
lines changed

3 files changed

+74
-72
lines changed

.github/workflows/zip.yml

Lines changed: 62 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
package-release:
2929
# Don't run on private repo.
3030
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
31-
runs-on: macos-12
31+
runs-on: macos-14
3232
steps:
3333
- uses: actions/checkout@v4
3434
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
3535
with:
3636
cache_key: package-release
37-
- name: Xcode 14.1
38-
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
37+
- name: Xcode 15.2
38+
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
3939
- uses: ruby/setup-ruby@v1
4040
- name: Setup Bundler
4141
run: ./scripts/setup_bundler.sh
@@ -54,11 +54,11 @@ jobs:
5454
build:
5555
# Don't run on private repo unless it is a PR.
5656
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
57-
runs-on: macos-12
57+
runs-on: macos-14
5858
steps:
5959
- uses: actions/checkout@v4
60-
- name: Xcode 14.1
61-
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
60+
- name: Xcode 15.2
61+
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
6262
- name: Build
6363
run: |
6464
cd ReleaseTooling
@@ -68,14 +68,14 @@ jobs:
6868
# Don't run on private repo.
6969
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
7070
needs: build
71-
runs-on: macos-12
71+
runs-on: macos-14
7272
steps:
7373
- uses: actions/checkout@v4
7474
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
7575
with:
7676
cache_key: package-head
77-
- name: Xcode 14.1
78-
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
77+
- name: Xcode 15.2
78+
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
7979
- uses: ruby/setup-ruby@v1
8080
- name: Setup Bundler
8181
run: ./scripts/setup_bundler.sh
@@ -341,10 +341,8 @@ jobs:
341341
SDK: "Database"
342342
strategy:
343343
matrix:
344-
os: [macos-12]
345-
include:
346-
- os: macos-12
347-
xcode: Xcode_14.2
344+
os: [macos-13]
345+
xcode: [Xcode_15.2]
348346
# TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources.
349347
# - os: macos-13
350348
# xcode: Xcode_15.2
@@ -446,59 +444,55 @@ jobs:
446444
name: quickstart_artifacts_dynamiclinks
447445
path: quickstart-ios/
448446

449-
quickstart_framework_firestore:
450-
# Don't run on private repo.
451-
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
452-
needs: package-head
453-
env:
454-
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
455-
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
456-
SDK: "Firestore"
457-
strategy:
458-
matrix:
459-
os: [macos-12]
460-
include:
461-
- os: macos-12
462-
xcode: Xcode_14.2
463-
# TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources.
464-
# - os: macos-13
465-
# xcode: Xcode_15.2
466-
runs-on: ${{ matrix.os }}
467-
steps:
468-
- uses: actions/checkout@v4
469-
- name: Get framework dir
470-
uses: actions/download-artifact@v4
471-
with:
472-
name: Firebase-actions-dir
473-
- uses: ruby/setup-ruby@v1
474-
- name: Setup Bundler
475-
run: ./scripts/setup_bundler.sh
476-
- name: Move frameworks
477-
run: |
478-
mkdir -p "${HOME}"/ios_frameworks/
479-
find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
480-
- uses: actions/checkout@v4
481-
- name: Setup quickstart
482-
run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \
483-
"${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
484-
"${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
485-
"${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
486-
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
487-
- name: Xcode
488-
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
489-
- name: Install Secret GoogleService-Info.plist
490-
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
491-
quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
492-
- name: Test Quickstart
493-
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
494-
- name: Remove data before upload
495-
if: ${{ failure() }}
496-
run: scripts/remove_data.sh firestore
497-
- uses: actions/upload-artifact@v4
498-
if: ${{ failure() }}
499-
with:
500-
name: quickstart_artifacts_firestore
501-
path: quickstart-ios/
447+
# quickstart_framework_firestore:
448+
# # Don't run on private repo.
449+
# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
450+
# needs: package-head
451+
# env:
452+
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
453+
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
454+
# SDK: "Firestore"
455+
# strategy:
456+
# matrix:
457+
# # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources.
458+
# os: [macos-13]
459+
# xcode: [Xcode_15.2]
460+
# runs-on: ${{ matrix.os }}
461+
# steps:
462+
# - uses: actions/checkout@v4
463+
# - name: Get framework dir
464+
# uses: actions/download-artifact@v4
465+
# with:
466+
# name: Firebase-actions-dir
467+
# - uses: ruby/setup-ruby@v1
468+
# - name: Setup Bundler
469+
# run: ./scripts/setup_bundler.sh
470+
# - name: Move frameworks
471+
# run: |
472+
# mkdir -p "${HOME}"/ios_frameworks/
473+
# find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
474+
# - uses: actions/checkout@v4
475+
# - name: Setup quickstart
476+
# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \
477+
# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
478+
# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
479+
# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
480+
# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
481+
# - name: Xcode
482+
# run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
483+
# - name: Install Secret GoogleService-Info.plist
484+
# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
485+
# quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
486+
# - name: Test Quickstart
487+
# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
488+
# - name: Remove data before upload
489+
# if: ${{ failure() }}
490+
# run: scripts/remove_data.sh firestore
491+
# - uses: actions/upload-artifact@v4
492+
# if: ${{ failure() }}
493+
# with:
494+
# name: quickstart_artifacts_firestore
495+
# path: quickstart-ios/
502496

503497
check_framework_firestore_symbols:
504498
# Don't run on private repo.
@@ -508,8 +502,8 @@ jobs:
508502
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
509503
runs-on: macos-13
510504
steps:
511-
- name: Xcode 14.1
512-
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
505+
- name: Xcode 15.2
506+
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
513507
- uses: actions/checkout@v4
514508
- name: Get framework dir
515509
uses: actions/download-artifact@v4

FirebaseCore/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
- [changed] Firebase now requires at least Xcode 15.2. See
3+
https://developer.apple.com/news/?id=fxu2qp7b for more info.
24
- [Zip Distribution] Update zip integration instructions with tips for
35
preserving symlinks and protecting code signatures.
46

ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,16 @@ struct FrameworkBuilder {
709709
.appendingPathComponent(frameworkBuildName(name) + ".xcframework")
710710

711711
// The arguments for the frameworks need to be separated.
712-
var frameworkArgs: [String] = []
713-
for frameworkBuilt in frameworks {
714-
frameworkArgs.append("-framework")
715-
frameworkArgs.append(frameworkBuilt.path)
712+
let frameworkArgs = frameworks.flatMap { frameworkPath in
713+
do {
714+
// Xcode 15.0-15.2: Return the canonical path to work around issue
715+
// https://forums.swift.org/t/67439
716+
let frameworkCanonicalPath = try frameworkPath.resourceValues(forKeys: [.canonicalPathKey])
717+
.canonicalPath!
718+
return ["-framework", frameworkCanonicalPath]
719+
} catch {
720+
fatalError("Failed to get canonical path for \(frameworkPath): \(error)")
721+
}
716722
}
717723

718724
let outputArgs = ["-output", xcframework.path]

0 commit comments

Comments
 (0)