Skip to content

Run the relocatability checks in GitHub Actions - #41

Open
itamaro wants to merge 1 commit into
python:mainfrom
itamaro:relocatability-ci
Open

itamaro wants to merge 1 commit into
python:mainfrom
itamaro:relocatability-ci

Conversation

@itamaro

@itamaro itamaro commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

This adds a workflow that builds CPython main on Ubuntu and macOS and runs relocatable.py test with both --strategy patch and --strategy origin. It serves as a "progress tracker" as well as a "burndown list" of relocatability gaps.

Some checks fail until CPython is fixed, so failed checks don't fail the job. Each run's summary has a table of the results, and the JSON output is uploaded as an artifact. The job fails only if the build or the harness itself breaks.

The daily run only happens in this repository, not in forks.

Test run

I ran this workflow in my fork (run, from this PR).
Both jobs passed: Linux took ~3m and macOS ~5m.

Both strategies gave the same results on each platform:

Platform PASS FAIL SKIP
macOS 14 5 0
Linux 15 4 0

Written with assistance from Claude Opus 5.5

Build CPython main on Ubuntu and macOS and run `relocatable.py test` with
both strategies, daily and for each push and pull request. On macOS, the
libraries that the system doesn't provide are built with
`relocatable.py deps`. Failed checks don't fail the job, since some fail
until CPython is fixed; the results go in the job summary and an uploaded
JSON artifact. The job fails only if the build or the harness itself
breaks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@itamaro

itamaro commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@brettcannon I think GHA is not enabled for this repo. do you have access to enable it?

Comment on lines +9 to +10
push:
branches: [main]

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.

Allow forks to run CI on feature branches, so we can check results on our fork CI before opening a PR.

Suggested change
push:
branches: [main]
push:

test:
name: ${{ matrix.os }}
# Forks get the schedule too; only run it here.
if: github.event_name != 'schedule' || github.repository == 'python/prebuilt-cpython'

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.

Same thing without hardcoding repo name, easier to copy to other repos:

Suggested change
if: github.event_name != 'schedule' || github.repository == 'python/prebuilt-cpython'
if: github.event_name != 'schedule' || github.event.repository.fork == false

with:
path: prebuilt-cpython
persist-credentials: false
- uses: actions/checkout@v5

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.

Suggested change
- uses: actions/checkout@v5
- uses: actions/checkout@v7

matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v5

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.

Suggested change
- uses: actions/checkout@v5
- uses: actions/checkout@v7

repository: python/cpython
path: cpython
persist-credentials: false
- uses: actions/setup-python@v6

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.

Suggested change
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7

persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.14"

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.

Do we specifically need 3.14, or can we use 3.15?

Suggested change
python-version: "3.14"
python-version: "3.15"

Or whatever the latest stable is?

Suggested change
python-version: "3.14"
python-version: "3.x"

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.

2 participants