From 101a8642248b29ff28bae8e3341a24f4392b0943 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Mon, 10 Aug 2026 12:15:56 +0100 Subject: [PATCH 1/2] gh-110793: Add CI job that runs tests with an installed build (GH-152664) (cherry picked from commit 8a4ee5ca681a198df89960d0071d1ee74d9c0dcb) Co-authored-by: Stan Ulbrych Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/workflows/build.yml | 8 +++++ .github/workflows/reusable-install.yml | 44 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/reusable-install.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b86b6cad80275b..8632e51d0fcfad6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -283,6 +283,12 @@ jobs: with: free-threading: ${{ matrix.free-threading }} + build-ubuntu-installed: + name: 'Ubuntu (installed)' + needs: build-context + if: needs.build-context.outputs.run-ubuntu == 'true' + uses: ./.github/workflows/reusable-install.yml + build-ubuntu-ssltests: name: 'Ubuntu SSL tests with OpenSSL' runs-on: ${{ matrix.os }} @@ -592,6 +598,7 @@ jobs: - build-windows-msi - build-macos - build-ubuntu + - build-ubuntu-installed - build-ubuntu-ssltests - build-wasi - test-hypothesis @@ -638,6 +645,7 @@ jobs: !fromJSON(needs.build-context.outputs.run-ubuntu) && ' build-ubuntu, + build-ubuntu-installed, build-ubuntu-ssltests, test-hypothesis, build-asan, diff --git a/.github/workflows/reusable-install.yml b/.github/workflows/reusable-install.yml new file mode 100644 index 000000000000000..337da684882d29f --- /dev/null +++ b/.github/workflows/reusable-install.yml @@ -0,0 +1,44 @@ +name: Reusable Ubuntu (installed) + +on: + workflow_call: + +permissions: + contents: read + +env: + FORCE_COLOR: 1 + +jobs: + build-install-test: + name: build, install and test + runs-on: ubuntu-26.04-arm + timeout-minutes: 60 + env: + PYTHONSTRICTEXTENSIONBUILD: 1 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + - name: Register gcc problem matcher + run: echo "::add-matcher::.github/problem-matchers/gcc.json" + - name: Set install dir + run: + echo "INSTALL_DIR=$(realpath "${GITHUB_WORKSPACE}/../installed-python")" >> "$GITHUB_ENV" + - name: Install dependencies + run: sudo ./.github/workflows/posix-deps-apt.sh + - name: Configure CPython + run: ./configure --config-cache --prefix="$INSTALL_DIR" + - name: Build CPython + run: make -j + - name: Install CPython + run: make install + - name: Set installed interpreter + run: | + ldversion=$(./python -c 'import sysconfig; print(sysconfig.get_config_var("LDVERSION"))') + echo "INSTALLED_PYTHON=${INSTALL_DIR}/bin/python${ldversion}" >> "$GITHUB_ENV" + - name: Display build info + run: | + "$INSTALLED_PYTHON" -m test.pythoninfo + - name: Test the installed Python + run: xvfb-run "$INSTALLED_PYTHON" -m test --fast-ci --timeout=900 From 099859f7d66522001c7066cb8007e771c94d269a Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Mon, 10 Aug 2026 13:16:53 +0100 Subject: [PATCH 2/2] Use Ubuntu 24 --- .github/workflows/reusable-install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-install.yml b/.github/workflows/reusable-install.yml index 337da684882d29f..79b7147b12c368f 100644 --- a/.github/workflows/reusable-install.yml +++ b/.github/workflows/reusable-install.yml @@ -12,7 +12,7 @@ env: jobs: build-install-test: name: build, install and test - runs-on: ubuntu-26.04-arm + runs-on: ubuntu-24.04-arm timeout-minutes: 60 env: PYTHONSTRICTEXTENSIONBUILD: 1