Skip to content
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
26 changes: 25 additions & 1 deletion .github/workflows/build-pyxdameraulevenshtein.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,26 @@ jobs:
PYXDAMERAULEVENSHTEIN_VERSION: ${{ matrix.version }}

steps:
# Upstream tags older releases `vX.Y.Z` and newer ones plain `X.Y.Z`; use whichever exists.
- name: Resolve upstream tag
id: tag
run: |
for ref in "v$VERSION" "$VERSION"; do
if git ls-remote --exit-code --tags https://github.com/lanl/pyxDamerauLevenshtein "refs/tags/$ref" >/dev/null; then
echo "ref=$ref" >> "$GITHUB_OUTPUT"
exit 0
fi
done
echo "no tag for $VERSION in lanl/pyxDamerauLevenshtein" >&2
exit 1
env:
VERSION: ${{ env.PYXDAMERAULEVENSHTEIN_VERSION }}

- name: Checkout pyxDamerauLevenshtein v${{ env.PYXDAMERAULEVENSHTEIN_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: lanl/pyxDamerauLevenshtein
ref: v${{ env.PYXDAMERAULEVENSHTEIN_VERSION }}
ref: ${{ steps.tag.outputs.ref }}
persist-credentials: false

- name: Build wheels
Expand All @@ -70,6 +85,15 @@ jobs:
only: ${{ matrix.python }}-manylinux_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# Restates upstream's [tool.cibuildwheel] environment (an env var replaces it),
# minus -mtune=generic: GCC has no such CPU on riscv64 ("unknown cpu 'generic'
# for '-mtune'"), which fails the first C compile since 1.11.0.
CIBW_ENVIRONMENT: CFLAGS="-O3 -g0 -pipe -fPIC" LDFLAGS="-fPIC"
# The extension does not declare free-threading support, so importing it under
# cp314t re-enables the GIL with a RuntimeWarning that upstream's
# filterwarnings = ["error"] turns fatal at collection; asking for the GIL up
# front is the same outcome without the warning. Ignored on the GIL builds.
CIBW_TEST_ENVIRONMENT: PYTHON_GIL=1
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {package}/tests

Expand Down
1 change: 1 addition & 0 deletions docs/packages/pyxdameraulevenshtein.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ versions:
- filename: pyxdameraulevenshtein-1.10.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl
sha256: 79899e08458649850d5775aa464d6c585f41a12fef15276a37721d815d3b533c
requires-python: '>=3.9'
- version: 1.11.0
Loading