Skip to content

Commit 091556c

Browse files
gh-127432: Add CI job to cross build Python
This is to avoid regressions in the cross building process
1 parent b2ac70a commit 091556c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,31 @@ jobs:
523523
suppressions_path: Tools/tsan/suppressions_free_threading.txt
524524
tsan_logs_artifact_name: tsan-logs-free-threading
525525

526+
with-python-build-linux:
527+
runs-on: ubuntu-latest
528+
steps:
529+
- uses: actions/checkout@v4
530+
with:
531+
persist-credentials: false
532+
- name: Install Dependencies
533+
run: sudo ./.github/workflows/posix-deps-apt.sh
534+
- name: Configure host build
535+
run: ./configure --prefix "$PWD/.../build/host-python"
536+
- name: Install host Python
537+
run: make -j8 install
538+
- name: Run test subset with host build
539+
run: |
540+
"$PWD/.../build/host-python/bin/python3" -m test test_sysconfig test_site test_embed
541+
- name: Clean up build
542+
run: make -j clean
543+
- name: Configure cross build
544+
run: ./configure --prefix "$PWD/.../build/cross-python" --with-build-python "$PWD/../host-python/bin/python3"
545+
- name: Install cross Python
546+
run: make -j8 install
547+
- name: Run test subset with host build
548+
run: |
549+
"$PWD/.../build/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
550+
526551
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
527552
cifuzz:
528553
name: CIFuzz

0 commit comments

Comments
 (0)