Skip to content

Setup CI for macos15 with qt6 #670

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Setup CI for macos15 with qt6 #670

wants to merge 5 commits into from

Conversation

vifactor
Copy link
Collaborator

@vifactor vifactor commented Jun 9, 2025

No description provided.

Copy link
Collaborator

@hannesa2 hannesa2 left a comment

Choose a reason for hiding this comment

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

Please consider to extend matrix. Preparation is here #675
And in my point of view, a move to qt6 should also happen on Linux and Windows too

@@ -106,6 +106,35 @@ jobs:
with:
name: DLTViewer-${{ matrix.macos }}-${{ matrix.abi }}
path: build/dist/DLTViewer*.tgz

buildMacOS15:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, with this way, you have a lot of boiler plate code in github action.

@hannesa2
Copy link
Collaborator

Please rebase to recent master and here #677 you have an idea, how to extend the matrix

@vifactor
Copy link
Collaborator Author

I agree this leads to some boilerplate, but I did not want to extend that matrix intentionally to check Qt6. Anyway, this is just a draft which I have not finished and maybe will never do.

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 20, 2025

Btw, there is an other draft too #405

@vifactor
Copy link
Collaborator Author

vifactor commented Jun 22, 2025

And in my point of view, a move to qt6 should also happen on Linux and Windows too

I agree, but not necessarily simultaneously. Btw, migration to Qt6 has already happened on ubuntu 24.04.

Btw, there is an other draft too #405

I know, that PR was too scary to touch. My goal was simply add a new job to check macos-15 + Qt6 build without packaging. Since I do not have macos, it would be close to impossible for me to check produced package even if I figure out how to produce one.

@vifactor vifactor force-pushed the ci-macos15-qt6 branch 24 times, most recently from 77440c8 to 2ba0aff Compare June 22, 2025 19:36
@vifactor vifactor force-pushed the ci-macos15-qt6 branch 2 times, most recently from 8fda689 to 9306615 Compare June 22, 2025 20:23
vifactor added 4 commits June 23, 2025 07:59
This reverts commit b489a74.

Signed-off-by: Viktor Kopp <[email protected]>
Signed-off-by: Viktor Kopp <[email protected]>
@vifactor
Copy link
Collaborator Author

@hannesa2 if you have a mac machine, this PR now generates a mac bundle, would you be able to check whether app can be launched from the bundle?

@hannesa2
Copy link
Collaborator

image image

@hannesa2 hannesa2 added the Build pipeline Build pipeline for CI label Jun 23, 2025
@@ -166,3 +166,72 @@ jobs:
build/dist/DLTViewer*.7z
build/dist/DLTViewer*.exe
build/dist/*.md

buildMacOS15Qt6:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using the matrix and not introduce a new job, would avoid the start problems on MacOS.
Signing and notarization is in matrix out of the box

Copy link
Collaborator Author

@vifactor vifactor Jun 23, 2025

Choose a reason for hiding this comment

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

Using matrix is good to save on code, but in this case important thing is to make build with qt6 working. The problem with existing packaging code is that it is crafted for qt5, is full of obsolete and hardcoded assumptions which are hard to fix in such a way that it works both with qt5 amnd qt6. Here, I am trying to come up with a minimal setup which would allow me to produce a working macos 15 bundle with qt6

@bunty95
Copy link
Collaborator

bunty95 commented Jun 23, 2025

If RPATH is toggled to "ON" it should correct some of qt libraries being embedded into the .app file
Possibly we can use this template with QT5 and integrate notarization.

cmake -G Ninja -DCMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
-DCMAKE_BUILD_TYPE=Release \
-DDLT_USE_QT_RPATH=OFF \
Copy link
Collaborator

Choose a reason for hiding this comment

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

DDLT_USE_QT_RPATH=ON

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I spent quite some time to find out that this option leads to some rpath garbage with qt6 and macos 15, which in turn leads to macdeployqt tool failure

@bunty95
Copy link
Collaborator

bunty95 commented Jun 25, 2025

Added notarization to this PR. It now runs on without issue.

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 26, 2025

Added notarization to this PR. It now runs on without issue.

I see no reason to duplicate this. With an new build_cmake_qt6.sh and add it the matrix you probably avoid this boilerplate code

@vifactor
Copy link
Collaborator Author

@bunty95 @hannesa2 I do not have mac, but because I desperately want us to migrate to qt6, I made this work blindly relying on ci. Further progress on my side is not possible. please help me first to fix the bundle, then we can decide how to proceed

@bunty95
Copy link
Collaborator

bunty95 commented Jun 26, 2025

@hannesa2 agree, only problem is that notarization for qt5 and qt6 is different. which is why the boiler plate for signing is added.
Should qt5 support be dropped for macOS?
I dont see a need to have both.

@bunty95
Copy link
Collaborator

bunty95 commented Jun 26, 2025

Also do we need macOS 13, 14, and 15? I think we can drop macOS 14 since arm64 is captured by macOS 15, and intel is captured by macOS 13.

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 26, 2025

For my point of view, when qt6 is working, we don't need qt5 anymore.
But I don't want to decide this
@alexmucde

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 26, 2025

Also do we need macOS 13, 14, and 15? I think we can drop macOS 14 since arm64 is captured by macOS 15, and intel is captured by macOS 13.

There I've no opinion. But currently nothing hurt here.
Important is, that we have arm64 and x86. But even x86 is questionable.

@bunty95
Copy link
Collaborator

bunty95 commented Jun 26, 2025

Also do we need macOS 13, 14, and 15? I think we can drop macOS 14 since arm64 is captured by macOS 15, and intel is captured by macOS 13.

There I've no opinion. But currently nothing hurt here. Important is, that we have arm64 and x86. But even x86 is questionable.

Once apple drops x86 from macOS, we can drop it from project

@nickelpot
Copy link

I tested it on macOS 15.5.

I can open the app file
Screenshot 2025-06-29 at 18 36 15

About the dmg file, it doesn't work if I just run it (in dmg or move it into Applications folder)
Screenshot 2025-06-29 at 18 37 23
Because from macOS 15.1, you can't run unsigned applications on macOS.
https://www.osnews.com/story/141055/bug-or-intentional-macos-15-1-completely-removes-ability-to-launch-unsigned-applications/
https://hackaday.com/2024/11/01/apple-forces-the-signing-of-applications-in-macos-sequoia-15-1/

I don't know how this application codesigning works. However, I can test running this app with some tweek.
You can run the app in DMG file after run this command: xattr -c <your path>/DLTViewer.app && codesign --force --deep -s - <your path>/DLTViewer.app
Screenshot 2025-06-29 at 18 49 05

@bunty95
Copy link
Collaborator

bunty95 commented Jun 29, 2025

I tested it on macOS 15.5.

I can open the app file Screenshot 2025-06-29 at 18 36 15

About the dmg file, it doesn't work if I just run it (in dmg or move it into Applications folder) Screenshot 2025-06-29 at 18 37 23 Because from macOS 15.1, you can't run unsigned applications on macOS. https://www.osnews.com/story/141055/bug-or-intentional-macos-15-1-completely-removes-ability-to-launch-unsigned-applications/ https://hackaday.com/2024/11/01/apple-forces-the-signing-of-applications-in-macos-sequoia-15-1/

I don't know how this application codesigning works. However, I can test running this app with some tweek. You can run the app in DMG file after run this command: xattr -c <your path>/DLTViewer.app && codesign --force --deep -s - <your path>/DLTViewer.app Screenshot 2025-06-29 at 18 49 05

Thank you for double checking. using the "--force" is not the correct way to sign a ".dmg".
I will look into the correct method to do this, but for now the ".app" will be bundled, along with a release on the appstore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build pipeline Build pipeline for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants