Skip to content

Simplify macOS packaging step and improve notarization - #8498

Closed
jpfeuffer with Copilot wants to merge 7 commits into
fix_notarizationfrom
copilot/sub-pr-8494
Closed

jpfeuffer with Copilot wants to merge 7 commits into
fix_notarizationfrom
copilot/sub-pr-8494

Conversation

Copilot AI commented Dec 14, 2025 •

Copy link
Copy Markdown
Contributor

Description

The macOS packaging step was hanging indefinitely during "Re-checking globbed directories..." when certificate/keychain issues occurred. This was caused by the ctest/cmake script approach (cipackage.cmake) which triggered cmake's directory globbing machinery.

Changes

  • Package step refactored: Replaced ctest -S cipackage.cmake with direct commands:

    1. Reconfigure with packaging options as -D flags
    2. Run ninja install
    3. Run cpack directly
  • Old approach preserved: Commented out for reference/reversal

  • Notarization improvements: Enhanced the notarization script to accept and pass Apple Developer Team ID (C64UCGJ5PL):

    • Updated notarize.sh to accept team ID as optional 6th parameter
    • Team ID is now passed to both notarytool submit and notarytool log commands
    • Workflow updated to pass team ID when calling notarization script

This bypasses cmake's obfuscated build target machinery that was causing the hang, while maintaining identical functionality. The team ID addition helps avoid interactive authorization prompts and ensures the correct team is used for notarization.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out

Advanced commands (admins / reviewer only)

Click to expand
  • /reformat (experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai

coderabbitai Bot commented Dec 14, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Dec 17 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

Instead of using the obfuscated ctest/cmake script (cipackage.cmake) which can hang
during "Re-checking globbed directories..." on macOS, now directly:
1. Reconfigure with packaging options passed as -D flags
2. Run ninja install
3. Run cpack

The old approach is kept commented out for reference/reversal.

Co-authored-by: jpfeuffer <[email protected]>
Copilot AI changed the title [WIP] Address coderabbot issues from #8486 Simplify macOS packaging step to avoid hang on certificate issues Dec 14, 2025
Copilot AI requested a review from jpfeuffer December 14, 2025 23:48
@poshul

poshul commented Dec 15, 2025

Copy link
Copy Markdown
Collaborator

@jpfeuffer I have a hunch it's running out of memory while trying to sign all the documentation. I'm trying turning that off to see if it changes the behavior.

@poshul

poshul commented Dec 15, 2025

Copy link
Copy Markdown
Collaborator

or it's just incredibly slow to sign all the individual docs pages: https://github.com/OpenMS/OpenMS/actions/runs/20218824490/job/58036592374 according to the logs it was progressing through the whole run, just very slowly.

I've a hunch that part of the slowdown is productbuilder walking other keychains that are leftover.
Updated keychain settings and import commands for macOS CI.
@poshul

poshul commented Dec 15, 2025

Copy link
Copy Markdown
Collaborator

@jpfeuffer fixed it! (Well this part of it at least). We needed to add /usr/bin/productbuild to the allowed executables when we imported the certificates, and to set-key-partition-list. Otherwise it waits for interactive authorization.

@jpfeuffer

Copy link
Copy Markdown
Contributor

.. I hate that company:
godotengine/godot#70307

@jpfeuffer

Copy link
Copy Markdown
Contributor

Do you really think it is signing the docs? Looks like it is "just" installing, i.e. copying them.
Actually it could be that when I tested it locally, I did not have docs built. I remember them taking a long time to install. How long did packaging take before on GitHub actions?

@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot pass the team ID to notarization

Add support for passing Apple Developer Team ID (C64UCGJ5PL) to the
notarization script. The team ID is now passed as the 6th parameter
to notarize.sh and included in both notarytool submit and log commands.

This helps avoid interactive authorization prompts and ensures the
correct team is used for notarization.

Co-authored-by: jpfeuffer <[email protected]>

Copilot AI commented Dec 15, 2025

Copy link
Copy Markdown
Contributor Author

@copilot pass the team ID to notarization

Updated notarize.sh to accept and pass team ID (C64UCGJ5PL) to both notarytool submit and log commands. The workflow now passes the team ID as the 6th parameter. (a6b5c31)

Copilot AI changed the title Simplify macOS packaging step to avoid hang on certificate issues Simplify macOS packaging step and improve notarization Dec 15, 2025
@jpfeuffer

Copy link
Copy Markdown
Contributor

Fixed in #8494 too

@jpfeuffer jpfeuffer closed this Dec 17, 2025
@jpfeuffer
jpfeuffer deleted the copilot/sub-pr-8494 branch December 21, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants