Skip to content

Build Wheel

Build Wheel #3

Workflow file for this run

name: Build Wheel
on: workflow_dispatch
jobs:
build-posix:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, macos-13, macos-14] # , windows-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp310-* cp311-* cp312-* cp313-*
CIBW_BEFORE_BUILD_LINUX: |
yum install -y wget tar
wget -nv -O boost_1_75_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
tar -xzf boost_1_75_0.tar.gz
cd boost_1_75_0
./bootstrap.sh
./b2 headers
cp -r boost /usr/include
CIBW_BEFORE_BUILD_WINDOWS: |
curl -s -L -o boost.zip https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.zip
mkdir -p C:\local
tar -xf boost.zip -C C:\local
dir C:\local
CIBW_ENVIRONMENT_WINDOWS: BOOST_DIR=C:\\local\\boost_1_75_0
CIBW_BEFORE_BUILD_MACOS: |
wget -nv -O boost_1_75_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
tar -xzf boost_1_75_0.tar.gz
cd boost_1_75_0
./bootstrap.sh
./b2 headers
sudo mkdir -p /usr/local/include/boost
sudo cp -r boost/* /usr/local/include/boost
ls /usr/local/include/boost
CIBW_ENVIRONMENT_MACOS: BOOST_DIR=/usr/local/include
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build-windows:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
choco install visualstudio2022buildtools -y
curl -L -o boost.zip https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.zip
mkdir -p C:\local
tar -xf boost.zip -C C:\local
setx BOOST_ROOT C:\local\boost_1_75_0
setx PATH "%PATH%;C:\local\boost_1_75_0"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install cython wheel setuptools
- name: Build Wheel
run: |
python setup.py bdist_wheel
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: dist/*.whl