Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Update zip workflow to use macOS 15 for Xcode 16 jobs #14050

Merged
merged 12 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 44 additions & 52 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,13 @@ jobs:
SDK: "ABTesting"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -134,7 +133,7 @@ jobs:
find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
- uses: actions/checkout@v4
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup quickstart
env:
LEGACY: true
Expand Down Expand Up @@ -173,11 +172,11 @@ jobs:
SDK: "Authentication"
strategy:
matrix:
os: [macos-14]
os: [macos-15]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-14
xcode: Xcode_16
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -225,14 +224,13 @@ jobs:
SDK: "Config"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -247,7 +245,7 @@ jobs:
mkdir -p "${HOME}"/ios_frameworks/
find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup Swift Quickstart

run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
Expand Down Expand Up @@ -277,14 +275,13 @@ jobs:
SDK: "Crashlytics"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -300,7 +297,7 @@ jobs:
find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
- uses: actions/checkout@v4
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup quickstart
env:
LEGACY: true
Expand Down Expand Up @@ -404,14 +401,13 @@ jobs:
SDK: "DynamicLinks"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -430,7 +426,7 @@ jobs:
"${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup Swift Quickstart
run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
- name: Update Environment Variable For DynamicLinks
Expand Down Expand Up @@ -464,14 +460,13 @@ jobs:
SDK: "Firestore"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -493,7 +488,7 @@ jobs:
"${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
Expand All @@ -505,7 +500,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.os }}
name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }}
path: quickstart_artifacts_firestore.zip

check_framework_firestore_symbols:
Expand Down Expand Up @@ -549,14 +544,13 @@ jobs:
SDK: "InAppMessaging"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -577,7 +571,7 @@ jobs:
"${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup swift quickstart
run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
- name: Install Secret GoogleService-Info.plist
Expand Down Expand Up @@ -606,14 +600,13 @@ jobs:
SDK: "Messaging"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -633,7 +626,7 @@ jobs:
"${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup swift quickstart
run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
- name: Install Secret GoogleService-Info.plist
Expand Down Expand Up @@ -662,14 +655,13 @@ jobs:
SDK: "Storage"
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
build-env:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_16
runs-on: ${{ matrix.os }}
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
Expand All @@ -692,7 +684,7 @@ jobs:
"${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup swift quickstart
env:
LEGACY: true
Expand Down
14 changes: 13 additions & 1 deletion scripts/zip_quickstart_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,23 @@ if [[ ! -z "$LEGACY" ]]; then
cd "Legacy${SAMPLE}Quickstart"
fi

xcode_version=$(xcodebuild -version | grep Xcode)
xcode_version="${xcode_version/Xcode /}"
xcode_major="${xcode_version/.*/}"

if [[ "$xcode_major" -lt 15 ]]; then
device_name="iPhone 14"
elif [[ "$xcode_major" -lt 16 ]]; then
device_name="iPhone 15"
else
device_name="iPhone 16"
fi

(
xcodebuild \
-project ${SAMPLE}Example.xcodeproj \
-scheme ${SAMPLE}Example${SWIFT_SUFFIX} \
-destination 'platform=iOS Simulator,name=iPhone 14' "SWIFT_VERSION=5.3" "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/" HEADER_SEARCH_PATHS='$(PROJECT_DIR)/Firebase' \
-destination "platform=iOS Simulator,name=$device_name" "SWIFT_VERSION=5.3" "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/" HEADER_SEARCH_PATHS='$(PROJECT_DIR)/Firebase' \
build \
) || EXIT_STATUS=$?

Expand Down
Loading