Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 53 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@ name: Build Wheels

on:
pull_request:
banches:
branches:
- main
push:
tags:
- '*'

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSION: '3.11.9'
CIBW_VERSION: '2.21.3'
CIBW_BUILD: 'cp311-*'
PYTHON_VERSION: '3.13.14'
CIBW_VERSION: '3.4.1'
CIBW_BUILD: 'cp313-* cp313t-*'
CIBW_ENABLE: 'cpython-freethreading'
CIBW_SKIP: '*-musllinux_*'
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD_FRONTEND: 'build[uv]'
Expand All @@ -27,7 +34,7 @@ jobs:
run: |
git clone https://github.com/sqlite/sqlite.git sqlite-src
cd sqlite-src
git checkout version-${{ env.SQLITE_VERSION }}
git checkout "version-${SQLITE_VERSION}"

- name: Build SQLite amalgamation
run: |
Expand All @@ -38,7 +45,7 @@ jobs:
make sqlite3.c

- name: Upload SQLite amalgamation files
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sqlite-amalgamation
path: |
Expand All @@ -47,41 +54,47 @@ jobs:
retention-days: 1

build_wheels_macos:
name: Build macOS wheels (${{ matrix.arch }})
runs-on: macos-13
name: Build macOS wheels (${{ matrix.os.arch }})
runs-on: ${{ matrix.os.runner }}
needs: build_sqlite_amalgamation
strategy:
matrix:
arch: [x86_64, arm64]
os:
- runner: macos-15
arch: arm64
- runner: macos-15-intel
arch: x86_64

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install cibuildwheel
run: |
pip install cibuildwheel[uv]==${{ env.CIBW_VERSION }}
python -m pip install "cibuildwheel[uv]==${CIBW_VERSION}"

- name: Build wheels
env:
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
CIBW_ARCHS_MACOS: ${{ matrix.os.arch }}
run: |
python -m cibuildwheel --output-dir dist

- name: Upload macOS wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheel-macos-${{ matrix.arch }}-cp311
name: wheel-macos-${{ matrix.os.arch }}-cp313-cp313t
path: dist/*.whl

build_wheels_linux:
Expand All @@ -97,22 +110,24 @@ jobs:
runner: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install cibuildwheel
run: |
pip install cibuildwheel[uv]==${{ env.CIBW_VERSION }}
python -m pip install "cibuildwheel[uv]==${CIBW_VERSION}"

- name: Build wheels
env:
Expand All @@ -121,9 +136,9 @@ jobs:
python -m cibuildwheel --output-dir dist

- name: Upload Linux wheel
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheel-linux-${{ matrix.arch.name }}-cp311
name: wheel-linux-${{ matrix.arch.name }}-cp313-cp313t
path: dist/*.whl

build_wheels_windows:
Expand All @@ -132,31 +147,33 @@ jobs:
needs: build_sqlite_amalgamation

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install cibuildwheel
run: |
pip install cibuildwheel[uv]==${{ env.CIBW_VERSION }}
python -m pip install "cibuildwheel[uv]==$env:CIBW_VERSION"

- name: Build wheels
run: |
python -m cibuildwheel --output-dir dist

- name: Upload Windows wheel
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheel-windows-cp311
name: wheel-windows-cp313-cp313t
path: dist/*.whl

build_sdist:
Expand All @@ -165,19 +182,19 @@ jobs:
needs: build_sqlite_amalgamation

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
persist-credentials: false

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -190,7 +207,7 @@ jobs:
python -m build -s

- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pypi-sdist
path: dist/*.tar.gz
Expand All @@ -202,7 +219,7 @@ jobs:

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: all-artifacts
pattern: '*'
Expand All @@ -216,7 +233,7 @@ jobs:
ls -la dist/

- name: Upload combined distributions
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: python-package-distributions
path: dist/*
Expand All @@ -236,10 +253,10 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# rsqlite3

A Python SQLite3 extension module with static SQLite build support.
A Python 3.13 SQLite3 extension module with static SQLite build support.

The release workflow builds wheels for both standard (`cp313`) and
free-threaded (`cp313t`) Python 3.13 interpreters.

## Building

Expand Down
Loading
Loading