1.1.4 #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-dev | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| # Xcode command line tools should be available by default | |
| - name: Install system dependencies (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| # Windows typically has MSVC available | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install setuptools wheel cffi xxhash pytest | |
| - name: Build CFFI extension | |
| run: | | |
| python setup.py build_ext | |
| - name: Install package | |
| run: | | |
| python setup.py install | |
| - name: Run tests | |
| run: | | |
| python -m pytest tests/ -v --tb=short | |
| - name: Test import and basic functionality | |
| run: | | |
| python -c " | |
| import pyfusefilter | |
| print('[OK] Import successful') | |
| # Test basic functionality | |
| f = pyfusefilter.Xor8([1, 2, 3, 4, 5]) | |
| print(f'[OK] Filter created: {f}') | |
| print(f'[OK] Contains 3: {f.contains(3)}') | |
| print(f'[OK] Does not contain 10: {not f.contains(10)}') | |
| # Test serialization | |
| serialized = f.serialize() | |
| recovered = pyfusefilter.Xor8.deserialize(serialized) | |
| print(f'[OK] Serialization works: {recovered.contains(3)}') | |
| " | |
| build-wheel: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build setuptools wheel cffi | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-dev | |
| - name: Build wheel | |
| run: | | |
| python -m build --wheel |