Skip to content

[CI] Prepare Mac jobs for running both on physical machines and homebrew-based VMs - #20126

Merged
hageboeck merged 4 commits into
root-project:masterfrom
hageboeck:experimental-brew-ci
Dec 5, 2025
Merged

hageboeck merged 4 commits into
root-project:masterfrom
hageboeck:experimental-brew-ci

Conversation

@hageboeck

@hageboeck hageboeck commented Oct 16, 2025 •

Copy link
Copy Markdown
Member

Here, the CI of master is prepared for running both on physical Macs as well as VMs that are using homebrew and Python virtual environments. To make the workflow steps robust for using one or the other, the build&test steps will check for a folder where a Python virtual environment should be located, and if one is found, they source the activate script before starting the build and test.

All workflow steps on Mac are now run in bash login shells, so environments from .bash_profile or .profile will be visible in each step.

@hageboeck hageboeck self-assigned this Oct 16, 2025
@github-actions

github-actions Bot commented Oct 16, 2025 •

Copy link
Copy Markdown

Test Results

    21 files      21 suites   3d 17h 27m 40s ⏱️
 3 786 tests  3 786 ✅ 0 💤 0 ❌
77 558 runs  77 558 ✅ 0 💤 0 ❌

Results for commit d321895.

♻️ This comment has been updated with latest results.

@hageboeck
hageboeck force-pushed the experimental-brew-ci branch 2 times, most recently from c46acc5 to 7d14b31 Compare October 16, 2025 12:43
@hageboeck hageboeck changed the title [CI] Experimental brew ci for mac VMs [CI] Experimental homebrew-based CI for mac VMs Oct 16, 2025
@hageboeck
hageboeck force-pushed the experimental-brew-ci branch 25 times, most recently from df6e07b to 735a13a Compare October 23, 2025 12:30
@hageboeck
hageboeck force-pushed the experimental-brew-ci branch 15 times, most recently from 41e4eb2 to 59f3c21 Compare December 4, 2025 09:17
@hageboeck
hageboeck force-pushed the experimental-brew-ci branch from 59f3c21 to da0ece7 Compare December 5, 2025 10:05
@hageboeck hageboeck changed the title [CI] Experimental homebrew-based CI for mac VMs [CI] Prepare Mac jobs for running both on physical machines and homebrew-based VMs Dec 5, 2025
@hageboeck
hageboeck marked this pull request as ready for review December 5, 2025 10:54
@hageboeck
hageboeck requested a review from dpiparo as a code owner December 5, 2025 10:54
@hageboeck
hageboeck force-pushed the experimental-brew-ci branch 2 times, most recently from 0cac5e1 to cd3e3cd Compare December 5, 2025 13:41
To reliably set up the enviroment, use bash as a login shell for all
workflow steps on mac. This ensures that settings from ~/.bash_profile
are visible in all steps of the workflow.
The homebrew VMs use a virtualenv for Python. Since it's not added to
the path by default, we test if an environment has been set up and enter
it before any build and test step.
Furthermore, the paths to the ca certificates differ between the VMs and
the physical Macs, so the setup of the environment variable will test
multiple paths now.
@hageboeck
hageboeck force-pushed the experimental-brew-ci branch from cd3e3cd to d321895 Compare December 5, 2025 18:35
@hageboeck
hageboeck merged commit 65be772 into root-project:master Dec 5, 2025
30 checks passed
@hageboeck
hageboeck deleted the experimental-brew-ci branch December 5, 2025 22:25
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ inputs.ref_name }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This effectively reverts 8bb62ae which I believe will break nightly builds on future release branches. There the call sequence is something like the following:

  1. On the master branch, we have a schedule workflow. This runs with the ref being the latest commit on master.
  2. That uses the root-ci.yml from a fixed branch. However, if I remember correctly, this does not change the context.
  3. The root-ci.yml from the branch runs, but its checkout will download master. This gets used for the buildconfig and the build_root.py script.
  4. Eventually, build_root.py will download the "right" branch for building.

The critical point is step 3 where we want to make sure that we are actually using the CI configuration of the branch, including platforms and options. I think we need to restore the ref: options.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK, thanks for the explanation!
I anyway needed to apply some changes to test the new runner. 🙂

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