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
63 changes: 62 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build Wheels

on:
pull_request:
banches:
- main
push:
tags:
- '*'
Expand All @@ -12,18 +15,54 @@ env:
CIBW_SKIP: '*-musllinux_*'
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD_FRONTEND: 'build[uv]'
SQLITE_VERSION: '3.46.1'

jobs:
build_sqlite_amalgamation:
name: Build SQLite Amalgamation
runs-on: ubuntu-latest

steps:
- name: Clone SQLite repository
run: |
git clone https://github.com/sqlite/sqlite.git sqlite-src
cd sqlite-src
git checkout version-${{ env.SQLITE_VERSION }}

- name: Build SQLite amalgamation
run: |
cd sqlite-src
mkdir build
cd build
../configure
make sqlite3.c

- name: Upload SQLite amalgamation files
uses: actions/upload-artifact@v4
with:
name: sqlite-amalgamation
path: |
sqlite-src/build/sqlite3.c
sqlite-src/build/sqlite3.h
retention-days: 1

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

steps:
- uses: actions/checkout@v4

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -48,6 +87,7 @@ jobs:
build_wheels_linux:
name: Build Linux wheels (${{ matrix.arch.name }})
runs-on: ${{ matrix.arch.runner }}
needs: build_sqlite_amalgamation
strategy:
matrix:
arch:
Expand All @@ -59,6 +99,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -83,10 +129,17 @@ jobs:
build_wheels_windows:
name: Build Windows wheels
runs-on: windows-latest
needs: build_sqlite_amalgamation

steps:
- uses: actions/checkout@v4

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -109,13 +162,20 @@ jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
needs: build_sqlite_amalgamation

steps:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Download SQLite amalgamation
uses: actions/download-artifact@v4
with:
name: sqlite-amalgamation
path: .

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -161,10 +221,11 @@ jobs:
name: python-package-distributions
path: dist/*

publish-to-testpypi:
publish-to-pypi:
name: Publish Python to Pypi
needs: [collect_artifacts]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')

environment:
name: publish
Expand Down
Loading
Loading