Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d864f0d
bugfix: build fix for linux
arman-bd Oct 8, 2025
2a7dc43
chore: ci update
arman-bd Oct 8, 2025
bb34763
chore: more fixes
arman-bd Oct 8, 2025
e1dc20b
bugfix: workflow path
arman-bd Oct 8, 2025
7f3b876
chore: removed items
arman-bd Oct 8, 2025
41a2bca
chore: cache things
arman-bd Oct 8, 2025
1cf4593
fix: Add POSIX feature macros and fix C compilation errors
arman-bd Oct 8, 2025
055fe5b
chore: fixes
arman-bd Oct 8, 2025
f1d64a3
feat: Add Docker testing environment and fix build issues
arman-bd Oct 8, 2025
c6927a9
chore: fixed cache
arman-bd Oct 8, 2025
4ff8db0
fix: enable mac
arman-bd Oct 8, 2025
615b876
chore: fix for mac
arman-bd Oct 8, 2025
d1e5b99
chore: fix
arman-bd Oct 8, 2025
013fd46
chore: windows
arman-bd Oct 9, 2025
8e665aa
chore: fix for windows
arman-bd Oct 9, 2025
a4a6916
chore: use MSYS2 for windows
arman-bd Oct 9, 2025
1923746
chore: vcpkg
arman-bd Oct 9, 2025
97c83e4
chore: fix vcpkg
arman-bd Oct 9, 2025
8613f3d
chore: more win fix
arman-bd Oct 9, 2025
27d34a8
chore: fix win
arman-bd Oct 9, 2025
c31e1c9
chore: win posix fix
arman-bd Oct 9, 2025
f75b938
chore: fix for else
arman-bd Oct 9, 2025
63a86c4
chore: win fix
arman-bd Oct 9, 2025
111afda
chore: fix
arman-bd Oct 9, 2025
57c8ba9
fix: win
arman-bd Oct 9, 2025
58f244e
chore: winfix
arman-bd Oct 9, 2025
56bc61b
wip
arman-bd Oct 9, 2025
c156360
chore: win fix
arman-bd Oct 9, 2025
438e272
wip
Oct 10, 2025
a5dbf51
build cache
Oct 10, 2025
6e9d9c7
chore: win fix
Oct 10, 2025
71d3f77
fix: add filelock dependency for tests
Oct 10, 2025
e99c0e4
fix: use relative vendor path and add cache verification
Oct 10, 2025
31a9448
fix: add save-always to cache steps to save even on job failure
Oct 10, 2025
ff565ea
debug: add verification step for C extension build
Oct 10, 2025
4335e7b
fix: split cache into separate restore and save actions for save-alwa…
Oct 10, 2025
62a245e
fix: add BoringSSL and vcpkg DLL paths to PATH for Windows
Oct 10, 2025
b7c0d83
debug: add detailed error traceback for C extension import
Oct 10, 2025
2c3c253
fix: correct YAML syntax for multi-line Python command
Oct 10, 2025
5427dd0
fix: simplify C extension import test to avoid YAML syntax issues
Oct 10, 2025
357ba66
debug: check for DLL files and improve error output
Oct 10, 2025
263df26
debug: add detailed import error traceback to _client_c.py
Oct 10, 2025
462827e
fix: add DLL directories using os.add_dll_directory on Windows
Oct 10, 2025
9e2e2f5
chore: enable benchmarks and align workflow caching
Oct 10, 2025
628f41b
chore: disable benchmark workflow
Oct 10, 2025
84fcf53
cross-test
Oct 10, 2025
45f7c69
benchmark
arman-bd Oct 10, 2025
da1904f
updated release
arman-bd Oct 10, 2025
313e8c3
more fixes
arman-bd Oct 10, 2025
86d2f2b
libnghttp2 for linux
arman-bd Oct 10, 2025
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
60 changes: 60 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual environments
venv/
ENV/
env/
.venv

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/

# OS
.DS_Store
Thumbs.db

# Git
.git/
.gitignore
.gitattributes

# CI
.github/

# Documentation
docs/_build/
*.md

# Local development
.uv/
uv.lock
133 changes: 133 additions & 0 deletions .github/workflows/_benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Benchmark

on:
workflow_call:
inputs:
primary-os:
required: true
type: string
primary-python:
required: true
type: string

jobs:
benchmark:
name: Benchmark
runs-on: ${{ inputs.primary-os }}

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.primary-python }}
cache: 'pip'

- name: Cache apt packages (Linux)
if: runner.os == 'Linux'
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/_benchmark.yml') }}
restore-keys: |
apt-${{ runner.os }}-

- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build libssl-dev pkg-config autoconf automake libtool

- name: Cache Homebrew packages (macOS)
if: runner.os == 'macOS'
uses: actions/cache@v4
with:
path: |
~/Library/Caches/Homebrew
/usr/local/Cellar
/usr/local/opt
key: brew-${{ runner.os }}-${{ hashFiles('.github/workflows/_benchmark.yml') }}
restore-keys: |
brew-${{ runner.os }}-

- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: brew install cmake ninja libnghttp2

- name: Setup Go (for BoringSSL build)
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true

- name: Setup ccache (Unix)
if: runner.os != 'Windows'
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ inputs.primary-python }}
max-size: 500M

- name: Configure ccache (Unix)
if: runner.os != 'Windows'
run: |
echo "CC=ccache gcc" >> $GITHUB_ENV
echo "CXX=ccache g++" >> $GITHUB_ENV
shell: bash

- name: Restore vendor cache
id: cache-vendor
uses: actions/cache/restore@v4
with:
path: vendor
key: vendor-${{ runner.os }}-${{ hashFiles('scripts/setup_vendors.sh') }}-v7
restore-keys: |
vendor-${{ runner.os }}-

- name: Setup vendor dependencies
if: steps.cache-vendor.outputs.cache-hit != 'true'
run: |
chmod +x scripts/setup_vendors.sh
./scripts/setup_vendors.sh

- name: Restore Python build cache
id: cache-python-build
uses: actions/cache/restore@v4
with:
path: |
build/
*.egg-info/
key: python-build-${{ runner.os }}-${{ inputs.primary-python }}-${{ hashFiles('setup.py', 'pyproject.toml', 'src/**/*.c', 'src/**/*.cpp', 'src/**/*.h') }}
restore-keys: |
python-build-${{ runner.os }}-${{ inputs.primary-python }}-

- name: Install package
run: pip install -e ".[dev,benchmark]"

- name: Run benchmarks
run: pytest benchmarks/ --benchmark-only --benchmark-json=benchmark.json

- name: Store benchmark
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'pytest'
output-file-path: benchmark.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true

# Save caches even if benchmarks fail (using always())
- name: Save vendor cache
if: always() && steps.cache-vendor.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: vendor
key: vendor-${{ runner.os }}-${{ hashFiles('scripts/setup_vendors.sh') }}-v7

- name: Save Python build cache
if: always()
uses: actions/cache/save@v4
with:
path: |
build/
*.egg-info/
key: python-build-${{ runner.os }}-${{ inputs.primary-python }}-${{ hashFiles('setup.py', 'pyproject.toml', 'src/**/*.c', 'src/**/*.cpp', 'src/**/*.h') }}
104 changes: 104 additions & 0 deletions .github/workflows/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#
# Global CI/CD Configuration
#
# This is a reusable workflow config that defines common settings across all workflows.
# Edit this file to control which OS and Python versions to test against.
#
# During development, you can comment out OS/Python versions to speed up CI runs.
#

name: Global Config

on:
workflow_call:
outputs:
# OS matrix - comment out any you don't want to test
os-matrix:
description: "Operating systems to test"
value: ${{ jobs.config.outputs.os-matrix }}

# Python versions - comment out any you don't want to test
python-matrix:
description: "Python versions to test"
value: ${{ jobs.config.outputs.python-matrix }}

# Primary OS/Python for single-runner jobs (benchmark, coverage, etc.)
primary-os:
description: "Primary OS for single-runner jobs"
value: ${{ jobs.config.outputs.primary-os }}

primary-python:
description: "Primary Python version for single-runner jobs"
value: ${{ jobs.config.outputs.primary-python }}

# Job toggles
enable-tests:
description: "Enable test job"
value: ${{ jobs.config.outputs.enable-tests }}

enable-benchmark:
description: "Enable benchmark job"
value: ${{ jobs.config.outputs.enable-benchmark }}

jobs:
config:
runs-on: ubuntu-latest
outputs:
os-matrix: ${{ steps.set-config.outputs.os-matrix }}
python-matrix: ${{ steps.set-config.outputs.python-matrix }}
primary-os: ${{ steps.set-config.outputs.primary-os }}
primary-python: ${{ steps.set-config.outputs.primary-python }}
enable-tests: ${{ steps.set-config.outputs.enable-tests }}
enable-benchmark: ${{ steps.set-config.outputs.enable-benchmark }}

steps:
- id: set-config
run: |
# ============================================================
# CONFIGURATION - Edit this section
# ============================================================

# Operating Systems to test
# Comment out any OS you want to skip during development
OS_MATRIX='[
"windows-latest", "ubuntu-latest", "macos-latest"
]'
# OS options: "windows-latest", "ubuntu-latest", "macos-latest"

# Python versions to test
# Comment out any version you want to skip during development
PYTHON_MATRIX='[
"3.9", "3.10", "3.11", "3.12"
]'
# Python versions: "3.9", "3.10", "3.11", "3.12"

# Primary OS and Python for single-runner jobs
PRIMARY_OS="ubuntu-latest"
PRIMARY_PYTHON="3.11"

# Enable/Disable Jobs
# Set to "true" or "false"
ENABLE_TESTS="true"
ENABLE_BENCHMARK="false"

# ============================================================
# END CONFIGURATION
# ============================================================

# Compact JSON (remove newlines and extra spaces)
OS_MATRIX_COMPACT=$(echo "$OS_MATRIX" | jq -c .)
PYTHON_MATRIX_COMPACT=$(echo "$PYTHON_MATRIX" | jq -c .)

echo "os-matrix=$OS_MATRIX_COMPACT" >> $GITHUB_OUTPUT
echo "python-matrix=$PYTHON_MATRIX_COMPACT" >> $GITHUB_OUTPUT
echo "primary-os=$PRIMARY_OS" >> $GITHUB_OUTPUT
echo "primary-python=$PRIMARY_PYTHON" >> $GITHUB_OUTPUT
echo "enable-tests=$ENABLE_TESTS" >> $GITHUB_OUTPUT
echo "enable-benchmark=$ENABLE_BENCHMARK" >> $GITHUB_OUTPUT

echo "✓ Configuration loaded:"
echo " OS: $OS_MATRIX_COMPACT"
echo " Python: $PYTHON_MATRIX_COMPACT"
echo " Primary: $PRIMARY_OS / $PRIMARY_PYTHON"
echo " Tests: $ENABLE_TESTS"
echo " Benchmark: $ENABLE_BENCHMARK"
Loading
Loading