name: Build Wheels on: workflow_dispatch: permissions: contents: read jobs: build_wheels_linux_x64: name: Build wheels on self-hosted manylinux_2_28_x64 runs-on: linux_x64 steps: - name: Checkout code uses: actions/checkout@v6 with: submodules: recursive - name: Set up Python (for cibuildwheel controller) uses: actions/setup-python@v6 with: python-version: '3.11' - name: Install cibuildwheel run: | pip install --upgrade pip pip install cibuildwheel==2.17.0 - name: Build wheels using cibuildwheel run: | python -m cibuildwheel --output-dir wheelhouse # Save list of built wheels for publishing ls wheelhouse/*.whl | tee $GITHUB_STEP_SUMMARY echo "wheels=$(ls wheelhouse/*.whl | tr '\n' ' ')" >> $GITHUB_ENV - name: Publish to PyPI if: success() && github.event_name == 'workflow_dispatch' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} TWINE_REPOSITORY: pypi run: | pip install twine twine upload --skip-existing --verbose wheelhouse/*.whl - name: (Optional) Install and test from PyPI if: success() && github.event_name == 'workflow_dispatch' run: | # Create a clean venv python -m venv test_env source test_env/bin/activate pip install --upgrade pip # Install from PyPI pip install zvec # Run a simple smoke test python -c "import zvec; print('Import OK:', zvec.__version__)" shell: bash build_wheels_linux_arm64: name: Build wheels on self-hosted manylinux_2_28_arm64 runs-on: linux_arm64 steps: - name: Checkout code uses: actions/checkout@v6 with: submodules: recursive - name: Set up Python (for cibuildwheel controller) uses: actions/setup-python@v6 with: python-version: '3.11' - name: Install cibuildwheel run: | pip install --upgrade pip pip install cibuildwheel==2.17.0 - name: Build wheels using cibuildwheel run: | python -m cibuildwheel --output-dir wheelhouse # Save list of built wheels for publishing ls wheelhouse/*.whl | tee $GITHUB_STEP_SUMMARY echo "wheels=$(ls wheelhouse/*.whl | tr '\n' ' ')" >> $GITHUB_ENV - name: Publish to PyPI if: success() && github.event_name == 'workflow_dispatch' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} TWINE_REPOSITORY: pypi run: | pip install twine twine upload --skip-existing --verbose wheelhouse/*.whl - name: (Optional) Install and test from PyPI if: success() && github.event_name == 'workflow_dispatch' run: | # Create a clean venv python -m venv test_env source test_env/bin/activate pip install --upgrade pip # Install from PyPI pip install zvec # Run a simple smoke test python -c "import zvec; print('Import OK:', zvec.__version__)" shell: bash