From e308694e13b7e56406625b248a6c36b7b28cc477 Mon Sep 17 00:00:00 2001 From: Embers-of-the-Fire Date: Tue, 3 Mar 2026 21:35:16 +0800 Subject: [PATCH 1/2] feat(ci): Add test for minimum supported debug build of Python --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c29581d2b1..693b45352ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -579,8 +579,37 @@ jobs: components: rust-src - name: Install python3 standalone debug build with nox run: | - PBS_RELEASE="20241219" - PBS_PYTHON_VERSION="3.13.1" + PBS_RELEASE="20260211" + PBS_PYTHON_VERSION="3.14.3" + PBS_ARCHIVE="cpython-${PBS_PYTHON_VERSION}+${PBS_RELEASE}-x86_64-unknown-linux-gnu-debug-full.tar.zst" + wget "https://github.com/indygreg/python-build-standalone/releases/download/${PBS_RELEASE}/${PBS_ARCHIVE}" + tar -I zstd -xf "${PBS_ARCHIVE}" + ls -l $(pwd)/python/install/bin + ls -l $(pwd)/python/install/lib + echo PATH=$(pwd)/python/install/bin:$PATH >> $GITHUB_ENV + echo LD_LIBRARY_PATH=$(pwd)/python/install/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV + echo PYTHONHOME=$(pwd)/python/install >> $GITHUB_ENV + echo PYO3_PYTHON=$(pwd)/python/install/bin/python3 >> $GITHUB_ENV + - run: python3 -m sysconfig + - run: python3 -m pip install --upgrade pip && pip install nox[uv] + - run: python3 -m nox -s test + + test-debug-min-version: + if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }} + needs: [fmt] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6.0.2 + - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }} + - uses: dtolnay/rust-toolchain@stable + with: + components: rust-src + - name: Install python3 standalone debug build with nox + run: | + PBS_RELEASE="20260211" + PBS_PYTHON_VERSION="3.10.19" PBS_ARCHIVE="cpython-${PBS_PYTHON_VERSION}+${PBS_RELEASE}-x86_64-unknown-linux-gnu-debug-full.tar.zst" wget "https://github.com/indygreg/python-build-standalone/releases/download/${PBS_RELEASE}/${PBS_ARCHIVE}" tar -I zstd -xf "${PBS_ARCHIVE}" @@ -592,21 +621,6 @@ jobs: echo PYO3_PYTHON=$(pwd)/python/install/bin/python3 >> $GITHUB_ENV - run: python3 -m sysconfig - run: python3 -m pip install --upgrade pip && pip install nox[uv] - - run: | - PYO3_CONFIG_FILE=$(mktemp) - cat > $PYO3_CONFIG_FILE << EOF - implementation=CPython - version=3.13 - shared=true - abi3=false - lib_name=python3.13d - lib_dir=${{ github.workspace }}/python/install/lib - executable=${{ github.workspace }}/python/install/bin/python3 - pointer_width=64 - build_flags=Py_DEBUG,Py_REF_DEBUG - suppress_build_script_link_lines=false - EOF - echo PYO3_CONFIG_FILE=$PYO3_CONFIG_FILE >> $GITHUB_ENV - run: python3 -m nox -s test test-version-limits: From c3616880a55c46f4a6477400b5dbb2a480ce6c6f Mon Sep 17 00:00:00 2001 From: Embers-of-the-Fire Date: Fri, 6 Mar 2026 11:10:25 +0800 Subject: [PATCH 2/2] fix: fix PYO3_CONFIG_FILE --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 693b45352ca..93f7ce410a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -592,6 +592,21 @@ jobs: echo PYO3_PYTHON=$(pwd)/python/install/bin/python3 >> $GITHUB_ENV - run: python3 -m sysconfig - run: python3 -m pip install --upgrade pip && pip install nox[uv] + - run: | + PYO3_CONFIG_FILE=$(mktemp) + cat > $PYO3_CONFIG_FILE << EOF + implementation=CPython + version=3.14 + shared=true + abi3=false + lib_name=python3.14d + lib_dir=${{ github.workspace }}/python/install/lib + executable=${{ github.workspace }}/python/install/bin/python3 + pointer_width=64 + build_flags=Py_DEBUG,Py_REF_DEBUG + suppress_build_script_link_lines=false + EOF + echo PYO3_CONFIG_FILE=$PYO3_CONFIG_FILE >> $GITHUB_ENV - run: python3 -m nox -s test test-debug-min-version: @@ -621,6 +636,21 @@ jobs: echo PYO3_PYTHON=$(pwd)/python/install/bin/python3 >> $GITHUB_ENV - run: python3 -m sysconfig - run: python3 -m pip install --upgrade pip && pip install nox[uv] + - run: | + PYO3_CONFIG_FILE=$(mktemp) + cat > $PYO3_CONFIG_FILE << EOF + implementation=CPython + version=3.10 + shared=true + abi3=false + lib_name=python3.10d + lib_dir=${{ github.workspace }}/python/install/lib + executable=${{ github.workspace }}/python/install/bin/python3 + pointer_width=64 + build_flags=Py_DEBUG,Py_REF_DEBUG + suppress_build_script_link_lines=false + EOF + echo PYO3_CONFIG_FILE=$PYO3_CONFIG_FILE >> $GITHUB_ENV - run: python3 -m nox -s test test-version-limits: