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] Switch zip building over to Xcode 15.2 #12737

Merged
merged 30 commits into from
Apr 18, 2024
Merged

[Infra] Switch zip building over to Xcode 15.2 #12737

merged 30 commits into from
Apr 18, 2024

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Apr 9, 2024

Per https://developer.apple.com/news/?id=fxu2qp7b, start building the zip with Xcode 15.2. Creating XCFrameworks on Xcode 15 versions before 15.3 has a bug where the /var/ paths are not properly evaluated in their canonical form (/private/var/). To work around this, the -create-xcframework argument is given canonical paths. See #12737 (comment).

.github/workflows/zip.yml Outdated Show resolved Hide resolved
@ncooke3 ncooke3 added this to the 10.25.0 - M147 milestone Apr 9, 2024
@ncooke3 ncooke3 linked an issue Apr 9, 2024 that may be closed by this pull request
@ncooke3
Copy link
Member Author

ncooke3 commented Apr 9, 2024

Building with 15.2 has a bug that was fixed in 15.3:

Fixed a bug where creating an xcframework from a framework or library located at a path containing a symlink (such as /var which is a symlink to /private/var) would fail. (115786062) (FB13191683)

Which I believe is causing failure (https://github.com/firebase/firebase-ios-sdk/actions/runs/8620842172/job/23628537213?pr=12737#step:7:19446).

I think one idea to workaround would be to add an option to the zip builder to not use a temporary directory (as it contains the problematic symlink) and instead use a directory passed in (e.g. ~/path/to/build/intermediates`). I will investigate more tomorrow.

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 12, 2024

Locally reproducible with

➜  firebase git:(main) sudo xcode-select --switch /Applications/Xcode_15.2.app 
➜  firebase git:(main) swift run --package-path ReleaseTooling zip-builder \
  --disable-carthage-version-check \
  --no-dynamic \
  --keep-build-artifacts \
  --no-update-pod-repo \
  --pods FirebaseSharedSwift --platforms ios --no-include-catalyst
<-- snip -->
Successfully built FirebaseSharedSwift for iphonesimulator. Build log is at file:///var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/build_logs/FirebaseSharedSwift-iphonesimulator.txt.
buildDir: file:///var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/project-ios/iphonesimulator
buildSliced returns file:///var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/project-ios/iphonesimulator/Release-iphonesimulator/FirebaseSharedSwift/FirebaseSharedSwift.framework/
Building file:///var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/xcframeworks/FirebaseSharedSwift.xcframework with command:
/usr/bin/xcodebuild -create-xcframework -framework /var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/platform_frameworks/iphonesimulator/FirebaseSharedSwift.framework -framework /var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/platform_frameworks/iphoneos/FirebaseSharedSwift.framework -output /var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/xcframeworks/FirebaseSharedSwift.xcframework
error: cannot compute path of binary 'Path(str: "/private/var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/platform_frameworks/iphonesimulator/FirebaseSharedSwift.framework/FirebaseSharedSwift")' relative to that of '/var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/ZipRelease/2024-04-12T17-06-31/platform_frameworks/iphonesimulator/FirebaseSharedSwift.framework'
ZipBuilder/FrameworkBuilder.swift:727: Fatal error: Could not build xcframework for FirebaseSharedSwift exit code 70: 
[1]    82988 trace trap  swift run --package-path ReleaseTooling zip-builder  --no-dynamic   --pods  

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 13, 2024

path [URL]: file:///var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/
path (resolving symlinks) [URL]: file:///var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T/
path (canonical path) [String]: /private/var/folders/6h/fgkrlkjs0ygdzpbhyr9l4k1c0000gn/T

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 15, 2024

Perhaps we have to hold off on building the zip with the ARM mac. It took over 24 hrs for the original run to pick a machine, and I don't think it ever did before timing out. I kicked if off again this morning, but it still hasn't been picked up in the 90 minutes since I re-kicked it off. cc: @paulb777, @andrewheard

@paulb777
Copy link
Member

Choosing macos-14 seems a reliable way to get arm macs

@paulb777
Copy link
Member

Plain macos-14 is also arm. See https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/ pointing out that it is M1 machines.

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 16, 2024

There must have been something wrong with 83ff298 because CI did not run as expected. Trying again with the -arm suffix removed.

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 17, 2024

Testing the macos-14 built artifact on the quickstart tests: https://github.com/firebase/firebase-ios-sdk/actions/runs/8707424883/job/23882445114

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 17, 2024

By bumping the macOS version of the quickstart runner, we're running into https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/zip.yml#L463

Looking into ways we can fix the FirebaseUI XCFrameworks...

@paulb777
Copy link
Member

Finding an Xcode 15 build solution for Firebase UI sounds good - but I'm fine with a workaround for this PR.

@ncooke3
Copy link
Member Author

ncooke3 commented Apr 18, 2024

I think I'm going to need to comment out the Firestore test. My workaround around for now was to move the resource bundles that were embedded in the FirebaseAuth*UI.xcframework into the platform level .frameworks, but that did not work... I cannot reproduce the exact CI failure locally on either an Intel or arm mac.

Copy link
Contributor

@andrewheard andrewheard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ncooke3 ncooke3 merged commit 873887c into main Apr 18, 2024
79 checks passed
@ncooke3 ncooke3 deleted the nc/zip-testing branch April 18, 2024 15:05
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request May 1, 2024
….25.0" (#1056)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[firebase/firebase-ios-sdk](https://github.com/firebase/firebase-ios-sdk)
| minor | `from: "10.24.0"` -> `from: "10.25.0"` |

---

### Release Notes

<details>
<summary>firebase/firebase-ios-sdk (firebase/firebase-ios-sdk)</summary>

###
[`v10.25.0`](https://github.com/firebase/firebase-ios-sdk/releases/tag/10.25.0):
Firebase Apple 10.25.0

[Compare
Source](https://github.com/firebase/firebase-ios-sdk/compare/10.24.0...10.25.0)

The Firebase Apple SDK (10.25.0) is now available. For more details, see
the [Firebase Apple SDK release
notes.](https://firebase.google.com/support/release-notes/ios#10.25.0)

To install this SDK, see [Add Firebase to your
project.](https://firebase.google.com/docs/ios/setup)

#### What's Changed

- \[FirebaseCoreInternal] Switch to implementation-only import of GULs
by [@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12714
- \[AppCheck, Database, InAppMessaging, MLModelDownloader, Performance,
Sessions] Migrate to GoogleUtilities's storage container by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[#&#8203;12752](https://github.com/firebase/firebase-ios-sdk/issues/12752),
[#&#8203;12753](https://github.com/firebase/firebase-ios-sdk/issues/12753),
[#&#8203;12757](https://github.com/firebase/firebase-ios-sdk/issues/12757),
[#&#8203;12759](https://github.com/firebase/firebase-ios-sdk/issues/12759),
[#&#8203;12762](https://github.com/firebase/firebase-ios-sdk/issues/12762),
[#&#8203;12773](https://github.com/firebase/firebase-ios-sdk/issues/12773)
- Use declspec in Firestore on Windows machines by
[@&#8203;a-maurice](https://github.com/a-maurice) in
[firebase/firebase-ios-sdk#12758
- \[CI] Stop Xcode 14, start Xcode 15.3 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12746
- \[Performance] Migrate to GoogleUtilities's storage container by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12759
- Todos and workarounds for tests not yet ready for macos-14 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12781
- Another macos-14 CI workaround by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12787
- \[CI] Update grpc dependent jobs to macos-14 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12790
- \[Firestore] Remove DocumentID setter warning by
[@&#8203;andrewheard](https://github.com/andrewheard) in
[firebase/firebase-ios-sdk#12756
- \[App Check] Bump dependency on AppCheckCore to 10.19.0+ by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12806
- Allow Blob of data with zero length. by
[@&#8203;tom-andersen](https://github.com/tom-andersen) in
[firebase/firebase-ios-sdk#12694
- \[Infra] Switch zip building over to Xcode 15.2 by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12737
- Make use of
SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION
conditional. by
[@&#8203;cprince-foreflight](https://github.com/cprince-foreflight) in
[firebase/firebase-ios-sdk#12548
- \[Release Tooling] Consistent approach to resources when building on
Xcode 15 by [@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12821
- \[Release Tooling] Cleanup unused folder references by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12825
- Analytics 10.25.0 by [@&#8203;pcfba](https://github.com/pcfba) in
[firebase/firebase-ios-sdk#12843
- Update `FIRAuthInterop` to use `_Nullable_result` annotation by
[@&#8203;andrewheard](https://github.com/andrewheard) in
[firebase/firebase-ios-sdk#12841
- Disable quickstart CI that doesn't work with Xcode 15 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12846

#### New Contributors

- [@&#8203;mrs1669](https://github.com/mrs1669) made their first
contribution in
[firebase/firebase-ios-sdk#12760
- [@&#8203;a-maurice](https://github.com/a-maurice) made their first
contribution in
[firebase/firebase-ios-sdk#12758
- [@&#8203;cprince-foreflight](https://github.com/cprince-foreflight)
made their first contribution in
[firebase/firebase-ios-sdk#12548

**Full Changelog**:
firebase/firebase-ios-sdk@10.24.0...10.25.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
@firebase firebase locked and limited conversation to collaborators May 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly Testing Report
4 participants