Skip to content

Bump pypa/cibuildwheel from 3.0 to 3.1 in the actions group #109

Bump pypa/cibuildwheel from 3.0 to 3.1 in the actions group

Bump pypa/cibuildwheel from 3.0 to 3.1 in the actions group #109

Workflow file for this run

name: Wheels
on:
workflow_dispatch:
pull_request:
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# Ensures wheels are compatible with macOS 10.15+
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
jobs:
build_wheels:
name: Wheels leflib on ${{ matrix.platform.os }} ${{ matrix.platform.arch}} ${{ matrix.python-version }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
python-version: [cp39, cp310, cp311, cp312, cp313]
platform:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-24.04-arm
arch: aarch64
- os: macos-13
arch: universal
- os: windows-latest
arch: x86_64
env:
CIBW_ARCHS_LINUX: ${{ matrix.platform.arch }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup env (Windows)
if: matrix.platform.os == 'windows-latest'
run: |
choco install -y winflexbison3
vcpkg install zlib zlib:x64-windows
- name: Setup env (macOS)
if: matrix.platform.os == 'macos-13'
run: |
brew install bison
# https://github.com/The-OpenROAD-Project/OpenROAD/issues/1688
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
brew install flex
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
- uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL_LINUX: |
yum --disablerepo=epel -y update ca-certificates
yum install -y zlib-devel wget
CIBW_BEFORE_BUILD_WINDOWS: if exist "{package}\\_skbuild\" rd /q /s "{package}\\_skbuild"
CIBW_ENVIRONMENT_MACOS: >
LDFLAGS="-L/usr/local/opt/bison/lib -L/usr/local/opt/flex/lib"
CPPFLAGS="-I/usr/local/opt/flex/include"
CIBW_ENVIRONMENT_WINDOWS: SC_CMAKEARGS="-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake."
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD: ${{ matrix.python-version }}*
CIBW_SKIP: "pp* *win32 *i686 *-musllinux_*"
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_TEST_SKIP: "*_arm64"
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: >
pytest {package}/tests/
# "if: always()" ensures that we always upload any wheels that have
# been created, even if cibuildwheel action fails
- name: Upload wheels
if: always()
uses: actions/upload-artifact@v4
with:
name: sc-leflib-${{ matrix.platform.os }}-${{ matrix.platform.arch }}-${{ matrix.python-version }}
path: wheelhouse/*.whl
publish:
needs: [build_wheels]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published' && !contains(github.event.release.body, 'NOPUBLISH')
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: sc-leflib-*
path: dist
merge-multiple: true
- uses: pypa/[email protected]
- name: Add wheels to GitHub release artifacts
uses: softprops/action-gh-release@v2
with:
files: dist/*.whl