Skip to content

[CI] Use "native" Python environment from Mac runners - #24071

Merged
hageboeck merged 1 commit into
root-project:masterfrom
hageboeck:mac-venv-location
Nov 11, 2026
Merged

hageboeck merged 1 commit into
root-project:masterfrom
hageboeck:mac-venv-location

Conversation

@hageboeck

@hageboeck hageboeck commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Instead of defining the location of Python virtual environment via github actions, use what is available in login shells.
This means that any environment set up in .bash_profile or .zprofile will be used.

The runners that are using virtual environments (26, 27, beta) have already been updated to enter the virtual environment in the profile scripts.

Advantages:

  • Environment between interactive use and GH actions is the same
  • Environments can be [updated, moved, recreated, cloned] while actions are running, and one can switch over by editing the login shell environment scripts
  • All steps of the GH actions use the same environment. Currently, only the build&test step uses the "ROOT environment", whereas others used to fall back to either mac native, manually installed pythons or pythons from homebrew/port, depending on what's visible in PATH. Now that the profile scripts are updated, the runners only expose the "desired" virtual environment.

@hageboeck hageboeck self-assigned this Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 13h 26m 50s ⏱️
 3 884 tests  3 883 ✅ 0 💤 1 ❌
76 045 runs  76 044 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 0378de5.

♻️ This comment has been updated with latest results.

Since our actions use login shells on the mac runners, the python environment can
be defined using ~/.bash_profile.
This means that no further environment modifications need to be done as
part of the CI job.
@hageboeck
hageboeck force-pushed the mac-venv-location branch 2 times, most recently from 1de1d60 to 0378de5 Compare November 10, 2026 17:17
@hageboeck hageboeck changed the title Test virtual envs for Mac [CI] Use Python environment from Mac runners Nov 10, 2026
@hageboeck
hageboeck marked this pull request as ready for review November 10, 2026 17:22
@hageboeck
hageboeck requested a review from dpiparo as a code owner November 10, 2026 17:22
@hageboeck hageboeck changed the title [CI] Use Python environment from Mac runners [CI] Use "native" Python environment from Mac runners Nov 10, 2026
@hageboeck
hageboeck merged commit 4fef9a0 into root-project:master Nov 11, 2026
33 of 35 checks passed
@hageboeck
hageboeck deleted the mac-venv-location branch November 11, 2026 12:37
@hageboeck

Copy link
Copy Markdown
Member Author

/backport to 6.42, 6.40, 6.36

@root-project-bot

Copy link
Copy Markdown

Preparing to backport PR #24071 to branches 6.42, 6.40 and 6.36 requested by hageboeck

@root-project-bot

Copy link
Copy Markdown

Something went wrong with the creation of the PR to backport to 6.40: @hageboeck please see the logs

@root-project-bot

Copy link
Copy Markdown

Something went wrong with the creation of the PR to backport to 6.36: @hageboeck please see the logs

@root-project-bot

Copy link
Copy Markdown

This PR has been backported to branch 6.42: #24102

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