Skip to content

Commit

Permalink
use cibuildwheel with AlmaLinux9 manylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Dec 5, 2024
1 parent f97d130 commit ac53057
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 40 deletions.
46 changes: 6 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,53 +47,19 @@ jobs:
# macos-13 is an intel runner, macos-14 is apple silicon
- macos-13
- macos-latest
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
exclude:
# importing the package from the wheel instantly segfaults on macOS Python <= 3.12
- runs-on: macos-latest
python-version: "3.8"
- runs-on: macos-latest
python-version: "3.9"
- runs-on: macos-latest
python-version: "3.10"
- runs-on: macos-latest
python-version: "3.11"
- runs-on: macos-latest
python-version: "3.12"
- runs-on: macos-13
python-version: "3.8"
- runs-on: macos-13
python-version: "3.9"
- runs-on: macos-13
python-version: "3.10"
- runs-on: macos-13
python-version: "3.11"
- runs-on: macos-13
python-version: "3.12"
fail-fast: false
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 30
steps:
- uses: zacharyburnett/setup-abseil-cpp@de39f445295c887839e30c864ffbbb1c0231bc83 # 1.0.5
with:
cmake-build-args: "-DCMAKE_CXX_STANDARD=17 -DABSL_PROPAGATE_CXX_STD=ON -DABSL_ENABLE_INSTALL=ON -DBUILD_TESTING=off -DCMAKE_POSITION_INDEPENDENT_CODE=ON"
abseil-version: "20240722.0"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
with:
python-version: ${{ matrix.python-version }}
- run: pip install build repairwheel
- run: python -m build -w
- run: repairwheel ./dist/*.whl -o ./dist/delocated/
package-dir: .
output-dir: dist/
config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: s2geometry-py${{ matrix.python-version }}-${{ runner.os }}-${{ runner.arch }}
path: ./dist/delocated/*.whl
name: s2geometry-${{ runner.os }}-${{ runner.arch }}
path: ./dist/*.whl
- if: (github.event_name == 'release') && (github.event.action == 'released')
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions: read-all

env:
GOOGLETEST_VERSION: "1.15.2"

Expand All @@ -21,6 +27,7 @@ jobs:
- macos-latest
fail-fast: false
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 30
env:
CTEST_OUTPUT_ON_FAILURE: ON
steps:
Expand Down Expand Up @@ -83,6 +90,7 @@ jobs:
python-version: "3.12"
fail-fast: false
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 30
steps:
- uses: zacharyburnett/setup-abseil-cpp@de39f445295c887839e30c864ffbbb1c0231bc83 # 1.0.5
with:
Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,19 @@ namespaces = false
[tool.setuptools.package-dir]
"" = "src"

[tool.cibuildwheel]
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_34_x86_64"
test-requires = "pytest"
test-command = "pytest {project}/tests"

[tool.cibuildwheel.environment]
MACOSX_DEPLOYMENT_TARGET = 14.0

[tool.cibuildwheel.linux]
# repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
before-all = "yum install -y gflags-devel glog-devel gtest-devel openssl-devel abseil-cpp"

[tool.cibuildwheel.macos]
# repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
before-all = "brew install gflags glog openssl abseil"

0 comments on commit ac53057

Please sign in to comment.