From 47dcd18375dc480759eeebbaa6ef2b37c50d5292 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 27 May 2024 14:10:51 +0200 Subject: [PATCH] Set up CI for the free threaded build --- .github/workflows/ci.yml | 11 +++++++++++ Tools/ci-run.sh | 3 +++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 266c8e83bfd..08672247b2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,9 @@ jobs: env: [{}] include: + - python-version: "3.13-freethreading-dev" + allow_failure: true + os: ubuntu-20.04 - python-version: "3.13-dev" allowed_failure: true @@ -186,9 +189,17 @@ jobs: - name: Setup python uses: actions/setup-python@v5.0.0 + if: "!endsWith(matrix.python-version, '-freethreading-dev')" with: python-version: ${{ matrix.python-version }} + - name: Setup python from deadsnakes + uses: deadsnakes/action@v3.1.0 + if: "!endsWith(matrix.python-version, '-freethreading-dev')" + with: + python-version: 3.13-dev + nogil: true + - name: Compilation Cache uses: hendrikmuhs/ccache-action@v1.2.12 with: diff --git a/Tools/ci-run.sh b/Tools/ci-run.sh index 915ae7a49b0..10f7dd6e6c2 100644 --- a/Tools/ci-run.sh +++ b/Tools/ci-run.sh @@ -216,6 +216,9 @@ if [[ $TEST_CODE_STYLE != "1" ]]; then fi export CFLAGS="$CFLAGS $EXTRA_CFLAGS" +if [[ $PYTHON_VERSION == *"-freethreading-dev" ]]; then + export PYTHON_GIL=0 +fi python runtests.py \ -vv $STYLE_ARGS \ -x Debugger \