Skip to content

Commit c4ce567

Browse files
committed
Add CI job for test-free-threaded Python 3.13t/3.14t
Introduce a dedicated test-free-threaded CI job to cover Python 3.13t and 3.14t. The job uses setup-python guidance and follows the same build/test/FFI/TPC-H steps as the standard matrix, ensuring that free-threaded failures are clearly surfaced.
1 parent e39973e commit c4ce567

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.github/workflows/test.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,98 @@ jobs:
122122
uv run --no-project python convert_data_to_parquet.py
123123
uv run --no-project pytest _tests.py
124124
125+
test-free-threaded:
126+
runs-on: ubuntu-latest
127+
strategy:
128+
fail-fast: false
129+
matrix:
130+
python-version:
131+
- "3.13t"
132+
- "3.14t"
133+
toolchain:
134+
- "stable"
135+
136+
steps:
137+
- uses: actions/checkout@v5
138+
139+
- name: Verify example datafusion version
140+
run: |
141+
MAIN_VERSION=$(grep -A 1 "name = \"datafusion-common\"" Cargo.lock | grep "version = " | head -1 | sed 's/.*version = "\(.*\)"/\1/')
142+
EXAMPLE_VERSION=$(grep -A 1 "name = \"datafusion-common\"" examples/datafusion-ffi-example/Cargo.lock | grep "version = " | head -1 | sed 's/.*version = "\(.*\)"/\1/')
143+
echo "Main crate datafusion version: $MAIN_VERSION"
144+
echo "FFI example datafusion version: $EXAMPLE_VERSION"
145+
146+
if [ "$MAIN_VERSION" != "$EXAMPLE_VERSION" ]; then
147+
echo "❌ Error: FFI example datafusion versions don't match!"
148+
exit 1
149+
fi
150+
151+
- name: Setup Rust Toolchain
152+
uses: dtolnay/rust-toolchain@stable
153+
id: rust-toolchain
154+
with:
155+
components: clippy,rustfmt
156+
157+
- name: Install Protoc
158+
uses: arduino/setup-protoc@v3
159+
with:
160+
version: '27.4'
161+
repo-token: ${{ secrets.GITHUB_TOKEN }}
162+
163+
- name: Setup Python (free-threaded)
164+
uses: actions/setup-python@v6
165+
with:
166+
# Free-threaded builds are published with the "t" suffix. If these
167+
# stop being available via setup-python, fallback to a manual install
168+
# (e.g. pyenv) or pin to a supported action version.
169+
python-version: ${{ matrix.python-version }}
170+
allow-prereleases: true
171+
172+
- name: Cache Cargo
173+
uses: actions/cache@v4
174+
with:
175+
path: ~/.cargo
176+
key: cargo-cache-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('Cargo.lock') }}
177+
178+
- name: Install dependencies and build
179+
uses: astral-sh/setup-uv@v7
180+
with:
181+
enable-cache: true
182+
183+
- name: Run tests (free-threaded)
184+
env:
185+
RUST_BACKTRACE: 1
186+
run: |
187+
git submodule update --init
188+
uv sync --dev --no-install-package datafusion
189+
uv run --no-project maturin develop --uv
190+
uv run --no-project pytest -v .
191+
192+
- name: FFI unit tests (free-threaded)
193+
run: |
194+
cd examples/datafusion-ffi-example
195+
uv run --no-project maturin develop --uv
196+
uv run --no-project pytest python/tests/_test*.py
197+
198+
- name: Cache the generated dataset
199+
id: cache-tpch-dataset
200+
uses: actions/cache@v4
201+
with:
202+
path: benchmarks/tpch/data
203+
key: tpch-data-2.18.0
204+
205+
- name: Run dbgen to create 1 Gb dataset
206+
if: ${{ steps.cache-tpch-dataset.outputs.cache-hit != 'true' }}
207+
run: |
208+
cd benchmarks/tpch
209+
RUN_IN_CI=TRUE ./tpch-gen.sh 1
210+
211+
- name: Run TPC-H examples (free-threaded)
212+
run: |
213+
cd examples/tpch
214+
uv run --no-project python convert_data_to_parquet.py
215+
uv run --no-project pytest _tests.py
216+
125217
nightly-fmt:
126218
runs-on: ubuntu-latest
127219

0 commit comments

Comments
 (0)