Skip to content

CIBW: remove non-ABI3 code #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# We use the same order as in the table
# * For Windows we support amd64 only
# * For Linux we support ARM64, PPC64le, and x86_64
# * For CPython we build ABI3 wheels on cp38 only
# * We build wheels for CPython only, one per platform, compatible with ABI3.8
# * We skip PPC64le MUSL Linux, because there is no Rust toolchain for it
# * macos-12 runner is x86_64, macos-14 runner is arm64
include:
Expand Down Expand Up @@ -91,14 +91,6 @@ jobs:
CIBW_ARCHS=$(echo ${{ matrix.cibw_build }} | cut -d'_' -f2,3)
echo "CIBW_ARCHS=${CIBW_ARCHS}" >> $GITHUB_ENV

- name: Set ABI3 build on Windows
if: ${{ contains(matrix.cibw_build, 'cp3') && matrix.os == 'windows-2019' }}
run: echo "LICU_ADDITIONAL_FEATURES=abi3" >> $env:GITHUB_ENV

- name: Set ABI3 build on Linux of macOS
if: ${{ contains(matrix.cibw_build, 'cp3') && matrix.os != 'windows-2019' }}
run: echo "LICU_ADDITIONAL_FEATURES=abi3" >> $GITHUB_ENV

- name: Build wheels
uses: pypa/[email protected]
with:
Expand Down Expand Up @@ -143,7 +135,7 @@ jobs:
name: artifact_sdist

publish:
needs: [cibuildwheel, sdist]
needs: [ cibuildwheel, sdist ]

name: Publish light-curve
runs-on: ubuntu-latest
Expand Down
12 changes: 4 additions & 8 deletions light-curve/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ full = [
test-no-bench = [
"pytest",
"markdown-pytest",
"pytest-benchmark", # We need it here because we use benchmark-specific command line options
"pytest-benchmark", # We need it here because we use benchmark-specific command line options
"pytest-subtests>=0.10",
"iminuit>=2.21,<3",
"numpy",
Expand Down Expand Up @@ -157,7 +157,7 @@ build-frontend = "build"

# - Set PATH to include Rust.
# - Set maturin build options, including LICU_ADDITIONAL_FEATURES which may be passed through CIBW_ENVIRONMENT_PASS_LINUX
environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=mimalloc,ceres-system,fftw-system,gsl,${LICU_ADDITIONAL_FEATURES}" }
environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=abi3,ceres-system,fftw-system,gsl,mimalloc" }

# We use our own images which include Rust, GSL and platform-optimised FFTW
# Manylinux CPython
Expand All @@ -183,10 +183,6 @@ musllinux-aarch64-image = "ghcr.io/light-curve/base-docker-images/musllinux_1_1_
# musllinux-s390x-image = "ghcr.io/light-curve/base-docker-images/musllinux_1_1_s390x"
musllinux-x86_64-image = "ghcr.io/light-curve/base-docker-images/musllinux_1_1_x86_64"

[tool.cibuildwheel.linux]
# We use this variable to set additional Cargo features, such as 'abi3'
environment-pass = ["LICU_ADDITIONAL_FEATURES"]

[tool.cibuildwheel.macos]
before-all = [
# Install Rust
Expand All @@ -205,13 +201,13 @@ before-all = [
before-build = ["pip install delvewheel"]
repair-wheel-command = "delvewheel repair --add-path=%USERPROFILE%\\Downloads\\fftw-dll64 -w {dest_dir} {wheel}"
# We do not support Ceres and GSL on Windows
environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=mimalloc,fftw-source,${LICU_ADDITIONAL_FEATURES}" }
environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=abi3,fftw-source,mimalloc" }

# Build with Intel MKL on Linux x86_64
[[tool.cibuildwheel.overrides]]
select = "*linux_x86_64"
# We'd like to use MKL for x86_64
environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=mimalloc,ceres-system,fftw-mkl,gsl,${LICU_ADDITIONAL_FEATURES}" }
environment = { "PATH" = "$PATH:$HOME/.cargo/bin", "MATURIN_PEP517_ARGS" = "--locked --no-default-features --features=abi3,ceres-system,fftw-mkl,gsl,mimalloc" }

# Test
# We skip benchmark tests, because it requires feets and its transitive
Expand Down
Loading