Skip to content

Commit

Permalink
Set up CI for the free threaded build
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou committed May 27, 2024
1 parent 19f67cb commit ed7b4d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ jobs:
python-version: pypy-3.10
backend: c
env: { NO_CYTHON_COMPILE: 1 }
# Free-threading
- os: ubuntu-20.04
python-version: 3.13-freethreading-dev
backend: "c,cpp"
env: {}
allowed_failure: true

# This defaults to 360 minutes (6h) which is way too long and if a test gets stuck, it can block other pipelines.
# From testing, the runs tend to take ~20 minutes for ubuntu / macos and ~40 for windows,
Expand All @@ -186,9 +192,17 @@ jobs:

- name: Setup python
uses: actions/[email protected]
if: "!endsWith(matrix.python-version, '-freethreading-dev')"
with:
python-version: ${{ matrix.python-version }}

- name: Setup python from deadsnakes
uses: deadsnakes/[email protected]
if: "endsWith(matrix.python-version, '-freethreading-dev')"
with:
python-version: 3.13-dev
nogil: true

- name: Compilation Cache
uses: hendrikmuhs/[email protected]
with:
Expand Down
3 changes: 3 additions & 0 deletions Tools/ci-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit ed7b4d9

Please sign in to comment.