Commit Graph

59 Commits

Author SHA1 Message Date
Mauro b1ed870474 Support for Xcode 27 on CI (#6217)
* Run the tests on iOS 27.0

Bump the required simulator OS in the preview, UI and Compound tests, and the CI tool's default OS, from 26.5 to 27.0. Test devices stay the same.

iOS 27 writes transcoded videos 146 bytes larger, so update the expected sizes in MediaUploadingPreprocessorTests.

* Build and test on CI with Xcode 27

Select Xcode 27 in ci_common.sh and move every macOS workflow to the xcode-27 runner image, as macos-26 doesn't include Xcode 27. The Compound workflow now also creates its simulator on the iOS 27.0 runtime.

The xcode-27 runners are slower, so give the unit, Enterprise, Compound and snapshot recording jobs longer timeouts.

* Fix the preview snapshot layout on iOS 27

On iOS 27 the hosting controller applies the window's safe area when rendering, but the snapshot size comes from sizeThatFits, which ignores it. Component previews were shifted down and clipped at the bottom. Disable the hosting controller's safe area regions for these snapshots so the measured and rendered layouts match.

swift-snapshot-testing also renders into a window without a scene, and on iOS 27 a navigation stack in such a window reserves space for a large title it never shows, leaving a gap below the navigation bar. Attach the render window to the app's scene until swift-snapshot-testing handles it.

The invite users and add rooms screens sized their selected items row from a measured width stored in state, which is zero on the first layout pass, so snapshots could draw the row empty. Use containerRelativeFrame instead. The add rooms search previews now also wait for their results, and the search previews that show a clear button get a small precision tolerance, as it renders inconsistently in snapshots.

* Re-record the preview snapshots on iOS 27.0

Recorded on an iPhone SE (3rd generation) simulator running iOS 27.0 with Xcode 27.0 (27A266a). The changes come from iOS 27 rendering: text anti-aliasing, hyphenation and line breaking, navigation bars and toggles that now render in snapshots, lazy stacks that were blank on iOS 26, and pseudo-language locale formatting.

* Fix the UI tests on iOS 27

iOS 27 no longer exposes accessibility identifiers on SwiftUI menu items, so the space exploration test now finds them by label within the menu. On iPad, the start chat search field keeps focus after submitting and can swallow the next tap, so retry the tap if the create room screen doesn't appear.

* Re-record the UI test snapshots on iOS 27.0

Recorded on iPhone 17 and iPad (A16) simulators running iOS 27.0 with Xcode 27.0. The changes come from iOS 27 styling, like the keyboard height and glass borders. This also removes the iPad app lock setup snapshots, which have been orphaned since those tests stopped running on iPad.

* Fix the accessibility tests crashing on iOS 27

The accessibility tests' previews wrapper kept its ImageRenderer alive across the awaits that follow the render. On iOS 27, releasing it at that point tears down its view graph outside of a SwiftUI update, which hits an assertion and crashes the app. Release the renderer as soon as the image has been rendered.

* Keep the accessibility tests' image renderers alive on iOS 27

Releasing the ImageRenderer straight away wasn't enough: on iOS 27, releasing one that rendered a preview crashes SwiftUI whichever context it happens in. Keep the renderers alive instead. Each test launches a fresh app, so they only live for the one test.

* Share the UI tests' app settings with their mock user session

Since the user session flow reads its settings from UserSettings, the UI tests' mock user session was wrapping a fresh volatile AppSettings instead of the one the tests configure. The flags that skip onboarding weren't picked up, so every user session UI test got stuck on the notifications permission screen.

* Re-record the Compound snapshots on iOS 27.0

Apply the same safe area fix as the app's preview tests, so size-that-fits snapshots aren't clipped on iOS 27, and re-record the snapshots on an iPhone SE (3rd generation) simulator running iOS 27.0 in English (US).

* Fix a race reading the keyboard in the accessibility tests

On iOS 27 the QR code login screen's keyboard can be dismissing between checking that it exists and reading its frame, which fails the test. Snapshot it in a single query instead.
2026-09-29 17:02:48 +02:00
Stefan Ceriu cd453bc6fa Move xcresultparser to the Tools to avoid long recompilation times through brew 2026-08-19 07:41:26 +03:00
Doug 5915713a02 Introduce a build setting to detect Nightly builds. (#5852)
* Allow the AppIconBanner tool to be called with purely the build number.

And use that for the Element Pro Nightly.

* Use a build setting to determine Nightly builds.
2026-07-09 13:56:26 +01:00
Doug 81b33da6ab Switch back to using the stable version of SwiftFormat. (#5850) 2026-07-08 11:01:55 +01:00
Stefan Ceriu 2fddb597b8 Bump the CI workflows to iOS 26.5, centralise default OS version 2026-06-08 19:54:07 +03:00
Doug 5138e05e47 Use SwiftFormat from develop and enabled indent-blank-lines option. 2026-05-27 17:11:42 +01:00
Doug 63422f8f6b Upgrade the project to use Xcode 26.4 (and the 26.4 simulator for tests). (#5375)
* Upgrade the project to use Xcode 26.4 (and iOS 26.4 when running tests).

* Update the test OS assertions.

* updated preview tests

# Conflicts:
#	PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreenInviteCell.iPhone-en-GB-0.png
#	PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreenInviteCell.iPhone-pseudo-0.png

* update compound preview tests

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-04-16 14:33:20 +02:00
Stefan Ceriu bce9119bc3 Replace the last of the fastlane lanes with swift tooling
- move more sharable code to CI static methods
- merge `release_to_github` and `prepare_next_release` into one single command as they had dependencies on each other
- remove all traces of ruby and fastlane
2026-03-11 10:06:44 +02:00
Doug 0d4ff5ea87 Fix the post-build command. 2026-03-05 17:08:54 +00:00
Doug af587338cb Fix the post-clone tools command. 2026-03-05 16:29:17 +00:00
Stefan Ceriu e23959a201 Convert more fastlane tools to swift commands (#5163)
* Upload dSYMs to sentry using swift and the sentry-cli instead of fastlane.

* Replace the fastlane `config_production` lane with a swift tools `ConfigureProduction` command.

* Replace Zsh with CI.run in the new ConfigureNightly command

* Replace the fastlane `tag_nightly` lane with a swift tools `TagNightly` command.

* Print out all the commands going through CI.Run and their arguments

* Address PR comments
2026-03-05 16:14:09 +02:00
Stefan Ceriu 1590f2b2a1 Fix xcode cloud nightly run build number setting 2026-03-02 12:34:58 +02:00
Stefan Ceriu 5732199519 Completely remove ruby from github actions 2026-03-02 12:34:58 +02:00
Stefan Ceriu aa423e3592 Update the enterprise submodule and use the new configure-element-pro command 2026-03-02 12:34:58 +02:00
Stefan Ceriu 0fc0e2880b Add a separate tools command for building nightly and remove the old fastlane one. 2026-02-26 18:43:49 +02:00
Stefan Ceriu 0d5f0b1593 Call the pipeline from within swift tools instead of through fastlane. 2026-02-26 18:43:49 +02:00
Doug f6d0b2c096 Use Xcode 26.1 on GitHub runners. 2025-11-27 16:43:48 +00:00
Mauro b725100cc1 Run CI with Xcode 26.1 RC (#4672)
* Use Xcode 26.1 RC on CI

* regenerated previews with 26.1

* ui tests

* fix

* fix some iPad tests rendering

* remove useless fastlane line

---------

Co-authored-by: Doug <douglase@element.io>
2025-11-17 12:30:57 +01:00
Stefan Ceriu be01ddf212 Switch ci_common's xcode-select to 26.0 2025-09-26 17:20:41 +03:00
Doug 1c2d77217f Update the project for Xcode 16.4 (#4277) 2025-07-02 15:13:52 +01:00
Doug 5f621411b2 Run Xcode select on the Translations and CalVer workflows. (#4224)
* Run Xcode select on the Translations and CalVer workflows.

* Use ci_common.sh for xcode-select instead.
2025-06-18 16:53:32 +01:00
Doug 6a8f35db9c Make the secrets optional. (#3966) 2025-04-01 16:14:05 +01:00
Doug 4b7cf3c6a5 Rename the Enterprise variant to Pro. (#3877) 2025-03-07 13:47:11 +00:00
Mauro Romito 1e931c9f16 fetch unshallow only in post-clone 2025-03-07 10:56:02 +01:00
Mauro Romito 48c50cecee check if the git is shallow before fetching 2025-03-07 10:22:32 +01:00
Mauro Romito 9c8404a3cb fastlane: rebase main with develop after a release
moved the git fetch into the setup of xcode cloud

fix
2025-03-06 17:05:22 +01:00
Doug 6ded867bcc Configure diagnostics (and MapLibre) using Pkl. (#3820)
* Bump the version for the next release.

* Ignore all generated sources.

* Use Pkl+XcodeGen to inject secrets instead of the project.

* Inject the PostHog/Sentry/Rageshake configuration from the environment.

* Fix bad unicode.

* Fix unit tests.
2025-02-24 18:36:08 +00:00
Doug b71c93dfaa Update Enterprise submodule.
Include pkl in the dependencies.
2025-02-17 12:01:08 +00:00
Doug cfaa1b455a Use the new preview screen when tapping media on the room and pinned events screens. (#3736)
* Use the new TimelineMediaPreview modifier on the room and pinned timeline screens.

* Use the same presentation logic for all timeline media previews.

* Fix a bug with the detection of the timeline end.

* Send pagination requests from the media preview screen.

* Add SwiftLint to the Danger workflow (it is no longer installed on the runner).

* Put SwiftLint back on all of the GitHub runners too.

* Set the function_parameter_count lint rule to 10.

* Make sure to clean-up any previews when the coordinator is done.

* Handle the viewInRoomTimeline action more appropriately.
2025-02-05 13:27:23 +00:00
Stefan Ceriu 55e399aaf7 Replace ImageMagick with a custom tool written in swift. 2025-01-21 16:25:29 +02:00
Doug 5d35a74fb6 Switch UI tests back to the perf-only runner. (#3349) 2024-09-30 11:13:14 +01:00
Stefan Ceriu f264c2559c Free up CI runner disk space before running UI tests. 2024-09-10 18:23:13 +03:00
Doug 1178561853 Setup unit tests for Enterprise. (#2984)
* Fix Analytics on Enterprise.
2024-07-01 12:34:47 +01:00
Doug 3cc4145a4c Use XcodeGen files for app variants and setup Enterprise submodule. (#2976)
- Create an app.yml with the base app variant.
- Override app.yml contents on Nightly/PR builds.
- Add AppHooks mechanism.
- Add Enterprise submodule.
- Conditionally import Enterprise/fastlane/Fastfile if available.
2024-06-27 18:18:17 +01:00
Doug 82823c94ce Replace Towncrier with GitHub releases + labels. (#2966)
* Set up GitHub generated release notes.

* Remove Towncrier from the release script.

* Add changelog failures for Labels with Danger and stop requesting a changelog file.

* Update changelog documentation.
2024-06-25 11:07:01 +00:00
Doug f56eb3647b Try Ruby 3.0 on CI. 2024-06-18 11:56:23 +01:00
Doug 026bd56bfc Use the system ruby on CI. 2024-06-18 11:49:28 +01:00
Stefan Ceriu 333c031798 Fix Xcode Cloud release notes, unshallow repository before generating them. 2024-03-17 09:16:30 +02:00
Stefan Ceriu d7e0bbc537 Brew link imagemagick@6 2024-03-13 11:05:09 +02:00
Doug 595858b6c1 Use imagemagick6 as it doesn't depend on Python. (#2557) 2024-03-12 17:06:51 +00:00
Doug b0f109a023 Only install imagemagick when needed.
Workaround for issues installing python from brew on a runner right now.
2024-03-11 12:16:09 +00:00
Stefan Ceriu 2cf427f715 Attempt to fix multiline Testflight changelog... again 2024-02-27 08:16:20 +02:00
Doug a3b3aa8517 Move PreviewTests into their own scheme. (#2492)
* Use xcresultparser for coverage as there are 2 schemes now.
2024-02-22 15:13:52 +00:00
Stefan Ceriu 6d7471e161 Attempt to fix multiline Testflight changelog 2024-02-22 12:00:50 +02:00
Stefan Ceriu b00295151e Fixes #2104 - Expose changelog (git diffs since the last tag) on Xcode Cloud builds / Testflight 2024-01-25 12:34:56 +02:00
Stefan Ceriu 756b96f7ff Translation workflow fix (#2271)
* Setup the translations workflow through ci_scripts
2023-12-19 19:50:04 +02:00
Stefan Ceriu 12e8ffaf87 Show the build number on the nightly app icons 2023-11-27 10:55:38 +02:00
Doug 22c0e38c5d Upload to sentry before releasing/tagging. (#1457)
This is to prevent tags being created for CI runs that have failed.
2023-08-07 14:52:54 +01:00
Doug 3a3ff695fb Tweak homebrew env vars. (#1374) 2023-07-20 16:15:33 +00:00
Alfonso Grillo a7256bb486 Move Map Libre API key to Xcode Cloud (#1313)
* Add config_production lane

* Add maplibre to .gitignore

* Add setupMapLibreKey

* Add documentation

* Fix failing UTs

* Fix more UTs

* Cleanup

* Add secrets.xcconfig

* Cleanup gitignore file

* Update post-checkout hook

* Cleanup SetupProject

* Update project

* Remove leftover in SetupProject

* Cleanup project.yml

* Add fastlane-plugin-xcconfig

* Improve test

* Update docs
2023-07-14 10:19:38 +02:00