.github/workflows/build_wheels.yml #38
This file contains 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
on: | |
workflow_dispatch: | |
jobs: | |
build_unix: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
version: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312", "cp313"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Setup swig for macos | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install swig | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
- name: Setup pip | |
run: | | |
python -m pip install --upgrade pip cibuildwheel | |
- name: Build wheel | |
run: python -m cibuildwheel --output-dir dist | |
env: | |
CIBW_BUILD: ${{ matrix.version }}-* | |
CIBW_SKIP: "cp36-* *-win* *_i686 *-musllinux*" | |
CIBW_ARCHS_MACOS: "x86_64 arm64" | |
# Skip delocate for macOS builds | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ctp-python | |
path: ./dist/*.whl | |
build_win: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Prepare Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
conda init | |
conda install -c conda-forge libiconv | |
- name: Setup pip for Windows | |
run: | | |
python -m pip install --upgrade pip wheel build | |
- name: Build wheel for Windows | |
run: python -m build -w -n | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ctp-python | |
path: ./dist/*.whl |