Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
031c93a
fix(ci): upgrade pyapp and use zigbuild for glibc compat
cofin Jan 8, 2026
717dc3c
fix(ci): add binary build verification step to ci pipeline
cofin Jan 8, 2026
2bea6d4
fix(ci): restrict workflow permissions to contents:read
cofin Jan 8, 2026
70bd68a
fix(ci): upgrade python to 3.13 for binary builds
cofin Jan 8, 2026
4180a8e
chore(ci): debug requirements generation in binary build
cofin Jan 8, 2026
2286bf9
fix(ci): remove x86_64-apple-darwin target
cofin Jan 8, 2026
ef168a8
fix(ci): explicitly set pyapp dist source for macos aarch64
cofin Jan 8, 2026
154e02f
fix(ci): explicitly set pyapp dist source for linux aarch64
cofin Jan 8, 2026
38c4064
fix(ci): windows build and linux aarch64 test skip
cofin Jan 8, 2026
8257f37
fix(ci): add alpine test for musl binaries
cofin Jan 8, 2026
34ef7a8
fix(ci): enable runtime project installation
cofin Jan 8, 2026
be23c43
feat(ci): bundle dependencies for linux x86_64
cofin Jan 8, 2026
2511247
feat(ci): refine dependency bundling and debugging
cofin Jan 8, 2026
e4c85cb
fix(ci): add offline binary test for Linux musl in CI workflows
cofin Jan 8, 2026
0c5005c
fix(deps): remove explicit pypi index for uv
cofin Jan 8, 2026
bc3d96a
chore(config): ignore uv.toml for local configuration
cofin Jan 8, 2026
9510836
feat(tools): add local env setup script
cofin Jan 8, 2026
5920415
fix(tools): update uv.toml template to use public pypi
cofin Jan 8, 2026
c7a6f33
docs: add guide for local uv configuration
cofin Jan 8, 2026
77e57d1
docs: remove outdated UV configuration guide
cofin Jan 8, 2026
0c282eb
fix(makefile): force public pypi for pre-commit if uv.toml exists
cofin Jan 8, 2026
2c84920
fix(lint): resolve ruff and pre-commit errors
cofin Jan 8, 2026
76fe684
style: apply pre-commit fixes to setup script
cofin Jan 8, 2026
a58a43a
fix(lint): final cleanup for bundle script and ignores
cofin Jan 8, 2026
8efddfd
fix(lint): additional cleanup for tests and init
cofin Jan 8, 2026
922acc9
fix(lint): rename dummy variable in bundle script
cofin Jan 8, 2026
3a9c28e
fix(deps): align with aiosql and rich-click updates
cofin Jan 8, 2026
a61c955
chore: formatting
cofin Jan 9, 2026
9512939
fix: update Python version requirements to 3.10 in configuration files
cofin Jan 9, 2026
4c8ad53
fix: update type hints and improve async handling in database adapters
cofin Jan 9, 2026
44d25a8
fix: streamline distribution source setup and adjust dependency handl…
cofin Jan 9, 2026
e89cf18
fix(ci): standalone bundle all targets + modernize script
cofin Jan 9, 2026
39c1a14
fix: ensure newline at end of file in bundle_python.py
cofin Jan 9, 2026
532968b
fix(ci): disable color output in uv export to prevent invalid require…
cofin Jan 9, 2026
cda2a06
fix(ci): fix standalone build, remove musl, use uv pip install
cofin Jan 12, 2026
2bb75eb
chore: fix linting and formatting in bundle script
cofin Jan 12, 2026
4e74cc9
fix(ci): rename PYAPP_REPO to avoid conflict with pyapp config
cofin Jan 12, 2026
a9591d0
fix: rename PYAPP_REPO in build script
cofin Jan 12, 2026
1340ba5
fix(ci): use relative paths for pyapp to avoid URL parsing issues
cofin Jan 12, 2026
43196a2
fix(ci): correct paths for bundle script and pyapp
cofin Jan 12, 2026
cc50110
fix: update identify package version to 2.6.16
cofin Jan 12, 2026
0a048c0
fix(ci): thorough cleanup of pyapp variables and paths
cofin Jan 12, 2026
53862ed
fix: enhance bundle_python script with validation and retry logic; ad…
cofin Jan 12, 2026
72d62ad
fix: remove musl target support and update platform mappings in bundl…
cofin Jan 12, 2026
c99ec9c
fix(ci): add PYAPP_DISTRIBUTION_PYTHON_PATH for custom distributions
cofin Jan 12, 2026
c175c36
fix: upgrade duckdb to 1.4.3 and use manylinux_2_28 platform
cofin Jan 13, 2026
44640e9
fix: remove lib/ from gitignore to include dma/lib in wheel
cofin Jan 13, 2026
4d969a0
fix(ci): use --help instead of --version for binary test
cofin Jan 13, 2026
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
182 changes: 180 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ on:
- main
pull_request:

permissions:
contents: read

concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
STABLE_PYTHON_VERSION: "3.13"

jobs:
build-collection-scripts:
Expand All @@ -49,7 +53,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
uses: ./.github/workflows/test.yaml
with:
coverage: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
Expand All @@ -60,7 +64,7 @@ jobs:
fail-fast: true
matrix:
os: [ windows-latest ]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
uses: ./.github/workflows/test.yaml
with:
coverage: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
Expand All @@ -76,3 +80,177 @@ jobs:
with:
coverage: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
python-version: ${{ matrix.python-version }}

build-wheel:
name: Build pure Python wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: uv python install ${{ env.STABLE_PYTHON_VERSION }}
- name: Build
run: uv build
- uses: actions/upload-artifact@v6
with:
name: wheels
path: dist/*
if-no-files-found: error
overwrite: true

verify-binary-builds:
name: Verify binary build for ${{ matrix.job.target }} (${{ matrix.job.os }})
runs-on: ${{ matrix.job.os }}
needs:
- test-linux
- test-windows
- test-osx
- build-wheel
strategy:
fail-fast: false
matrix:
job:
# Linux - GNU libc (manylinux2014 baseline: glibc 2.17+)
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
artifact: dma-x86_64-linux-gnu

- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
artifact: dma-aarch64-linux-gnu

# macOS
- target: aarch64-apple-darwin
os: macos-latest
artifact: dma-aarch64-macos

# Windows
- target: x86_64-pc-windows-msvc
os: windows-latest
artifact: dma-x86_64-windows.exe

env:
STABLE_PYTHON_VERSION: "3.13"

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Clone PyApp
run: git clone --depth 1 --branch v0.29.0 https://github.com/ofek/pyapp pyapp-src

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Set up Python
run: uv python install ${{ env.STABLE_PYTHON_VERSION }}

- name: Install Zig
if: contains(matrix.job.target, 'linux-gnu')
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0

- name: Install cargo-zigbuild
if: contains(matrix.job.target, 'linux-gnu')
run: uv tool install cargo-zigbuild

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}

- name: Setup cross-compilation (Linux)
if: contains(matrix.job.target, 'linux') && !contains(matrix.job.target, 'linux-gnu')
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.job.target }}

- name: Download wheel artifact
uses: actions/download-artifact@v7
with:
name: wheels
path: dist/
merge-multiple: true

- name: Inspect Wheel Content
run: unzip -l dist/*.whl | grep dma/lib || true

- name: Get version
id: version
run: |
VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash

- name: Generate requirements.txt
run: |
uv export --no-color --frozen --no-dev --no-editable --no-hashes --no-header --no-emit-project --extra postgres --extra server > dist/requirements.txt
echo "dist/dma-${{ steps.version.outputs.VERSION }}-py3-none-any.whl" >> dist/requirements.txt
cat dist/requirements.txt

- name: Bundle Python dependencies
shell: bash
run: |
uv run tools/bundle_python.py \
--target ${{ matrix.job.target }} \
--requirements dist/requirements.txt \
--output dist/python-dist-${{ matrix.job.target }}.tar.gz
# Use PYAPP_DISTRIBUTION_PATH for local files (not PYAPP_DISTRIBUTION_SOURCE which expects a URL)
echo "PYAPP_DISTRIBUTION_PATH=${{ github.workspace }}/dist/python-dist-${{ matrix.job.target }}.tar.gz" >> $GITHUB_ENV
# Set the path to Python binary inside the custom distribution
if [[ "${{ matrix.job.target }}" == *"windows"* ]]; then
echo "PYAPP_DISTRIBUTION_PYTHON_PATH=python/python.exe" >> $GITHUB_ENV
else
echo "PYAPP_DISTRIBUTION_PYTHON_PATH=python/bin/python3" >> $GITHUB_ENV
fi

- name: Build PyApp binary (Linux GNU)
if: contains(matrix.job.target, 'linux-gnu')
working-directory: pyapp-src
env:
PYAPP_PROJECT_NAME: "dma"
PYAPP_PROJECT_PATH: ../dist/dma-${{ steps.version.outputs.VERSION }}-py3-none-any.whl
PYAPP_SKIP_INSTALL: "true"
PYAPP_DISTRIBUTION_EMBED: "true"
PYAPP_FULL_ISOLATION: "true"
PYAPP_PYTHON_VERSION: "3.13"
run: cargo zigbuild --release --target ${{ matrix.job.target }}.2.28

- name: Build PyApp binary (Others)
if: (!contains(matrix.job.target, 'linux-gnu'))
working-directory: pyapp-src
env:
PYAPP_PROJECT_NAME: "dma"
PYAPP_PROJECT_PATH: ../dist/dma-${{ steps.version.outputs.VERSION }}-py3-none-any.whl
PYAPP_SKIP_INSTALL: "true"
PYAPP_DISTRIBUTION_EMBED: "true"
PYAPP_FULL_ISOLATION: "true"
PYAPP_PYTHON_VERSION: "3.13"
run: cargo build --release --target ${{ matrix.job.target }}

- name: Rename binary (Unix)
if: runner.os != 'Windows'
run: |
cp pyapp-src/target/${{ matrix.job.target }}/release/pyapp ${{ matrix.job.artifact }}
chmod +x ${{ matrix.job.artifact }}

- name: Rename binary (Windows)
if: runner.os == 'Windows'
run: |
cp pyapp-src/target/${{ matrix.job.target }}/release/pyapp.exe ${{ matrix.job.artifact }}

- name: Test binary offline (Linux)
if: contains(matrix.job.target, 'linux') && !contains(matrix.job.target, 'musl') && !contains(matrix.job.target, 'aarch64')
run: |
# Test in network-isolated container
docker run --network none -v $(pwd):/app ubuntu:20.04 /app/${{ matrix.job.artifact }} --help

- name: Test binary (macOS/Windows)
if: runner.os != 'Linux'
run: ./${{ matrix.job.artifact }} --help
Loading
Loading