Skip to content

* better script that hopefully does not hit download limits #10

* better script that hopefully does not hit download limits

* better script that hopefully does not hit download limits #10

Workflow file for this run

name: Build Wheels
on:
push:
branches: [ '**' ] # All branches
tags: [ 'v*' ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache cibuildwheel virtualenv
uses: actions/cache@v4
with:
path: ~/Library/Caches/cibuildwheel
key: ${{ runner.os }}-cibuildwheel-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-cibuildwheel-
- name: Build wheels
uses: pypa/cibuildwheel@v2.22
with:
output-dir: wheelhouse
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: "*-musllinux_* *-win32 *-manylinux_i686"
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64
CIBW_BEFORE_ALL_LINUX: >
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* &&
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
yum install -y wget hwloc-devel
CIBW_BEFORE_BUILD_LINUX: ./build.sh
CIBW_BEFORE_BUILD_MACOS: ./build.sh
CIBW_BEFORE_BUILD_WINDOWS: build.bat
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
LD_LIBRARY_PATH=/project/extern/local/kahip/lib:/project/extern/local/mt-kahypar/lib64:$LD_LIBRARY_PATH
auditwheel repair --lib-sdir . -w {dest_dir} {wheel}
CIBW_BUILD_VERBOSITY: 1
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
pattern: "*"
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}