Skip to content
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

gh-127432: Add CI test for cross-builds #127447

Closed

Conversation

gianfrancomauro
Copy link

@gianfrancomauro gianfrancomauro commented Nov 30, 2024

Fixes #127432

Add CI test for cross-builds.

  • Add a new test function test_cross_build in Lib/test/test_embed.py to run test_sysconfig, test_site, and test_embed tests.
    • Use subprocess to run the tests in the build directory and after installation.
  • Add a new workflow file .github/workflows/cross-build.yml to define the CI test for cross-builds.
    • Include steps to build a host Python, install it, configure a new build, and run the tests.
    • Run the tests in the build directory and after installation.
    • Use a different architecture in the cross-build.

For more details, open the Copilot Workspace session.

Fixes python#127432

Add CI test for cross-builds.

* Add a new test function `test_cross_build` in `Lib/test/test_embed.py` to run `test_sysconfig`, `test_site`, and `test_embed` tests.
  * Use `subprocess` to run the tests in the build directory and after installation.
* Add a new workflow file `.github/workflows/cross-build.yml` to define the CI test for cross-builds.
  * Include steps to build a host Python, install it, configure a new build, and run the tests.
  * Run the tests in the build directory and after installation.
  * Use a different architecture in the cross-build.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/python/cpython/issues/127432?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

cpython-cla-bot bot commented Nov 30, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Nov 30, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

* **Cross-Build Job**
  - Add a new job named `Cross-Builds` to the JIT workflow
  - Checkout code using `actions/checkout@v2`
  - Set up Python using `actions/setup-python@v2`
  - Install build-essential dependencies
  - Build host Python and install it
  - Configure cross-build with the host Python
  - Run tests in the build directory
  - Install cross-build
  - Run tests with the installed Python
@bedevere-app
Copy link

bedevere-app bot commented Nov 30, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@ZeroIntensity ZeroIntensity changed the title Add CI test for cross-builds gh-127432: Add CI test for cross-builds Nov 30, 2024
@ZeroIntensity ZeroIntensity marked this pull request as draft November 30, 2024 14:44
@ZeroIntensity
Copy link
Member

I've marked this as a draft while you address the CI failures.

* **Lib/test/test_multiprocessing_forkserver.py**
  - Add tests for shared memory access, process return code, and signal handling in forkserver.

* **Lib/test/test_dependencies.py**
  - Add tests to check for the existence of `pyvenv.cfg` and availability of `multiprocessing.shared_memory`, `ssl`, `pdb`, and `warnings` modules.
@gianfrancomauro gianfrancomauro deleted the add-cross-build-ci-test branch November 30, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CI test for cross-builds
2 participants