This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new 3363bafe1 fix(ci): Pass tag to bump_py_version, set PLAT inside
manylinux container (#2522)
3363bafe1 is described below
commit 3363bafe131f9c2af5c4cfb1129435f23e3f1c11
Author: Emre Şafak <[email protected]>
AuthorDate: Mon Aug 25 22:35:37 2025 -0400
fix(ci): Pass tag to bump_py_version, set PLAT inside manylinux container
(#2522)
## Why?
* TestPyPi was running in the release workflow, making it difficult to
test.
* The wheel platform tag was rejected #2520
* The wheel version did not match the tag #2521
## What does this PR do?
* Remove TestPyPI publishing from release-python.yaml.
* Pass tag name to bump_py_version script in build-native-release.yml
and build-containerized-release.yml.
* Install auditwheel in build_linux_wheels.py.
* Add explicit PLAT variable for aarch64 in build_linux_wheels.py.
* Add upload-artifact and publish-to-testpypi jobs to
build-containerized-pr.yml.
* Add upload-artifact and publish-to-testpypi jobs to
build-native-pr.yml.
* Add permissions for contents and id-token to
build-containerized-pr.yml and build-native-pr.yml.
## Related issues
Closes #2520, closes #2521
---
.github/workflows/build-containerized-pr.yml | 5 +++++
.github/workflows/build-containerized-release.yml | 3 ++-
.github/workflows/build-native-pr.yml | 5 +++++
.github/workflows/build-native-release.yml | 3 ++-
ci/build_linux_wheels.py | 8 +++++++-
5 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build-containerized-pr.yml
b/.github/workflows/build-containerized-pr.yml
index 5d144bc60..3f1240f1d 100644
--- a/.github/workflows/build-containerized-pr.yml
+++ b/.github/workflows/build-containerized-pr.yml
@@ -33,3 +33,8 @@ jobs:
- uses: actions/checkout@v5
- name: Build and test wheels
run: ./ci/build_linux_wheels.py --arch ${{ runner.arch }}
+ - name: Upload wheels as artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: pyfory-wheels-containerized-${{ matrix.os }}
+ path: dist/*.whl
diff --git a/.github/workflows/build-containerized-release.yml
b/.github/workflows/build-containerized-release.yml
index 7551ec047..4637c577b 100644
--- a/.github/workflows/build-containerized-release.yml
+++ b/.github/workflows/build-containerized-release.yml
@@ -29,7 +29,8 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Bump version
- run: ./ci/deploy.sh bump_py_version
+ # Pass the tag name from the push (e.g. "v0.12.1b1"); deploy.sh will
strip leading "v".
+ run: ./ci/deploy.sh bump_py_version "${{ github.ref_name }}"
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Build and test wheels
diff --git a/.github/workflows/build-native-pr.yml
b/.github/workflows/build-native-pr.yml
index 3c0d2c06c..9a5150235 100644
--- a/.github/workflows/build-native-pr.yml
+++ b/.github/workflows/build-native-pr.yml
@@ -51,3 +51,8 @@ jobs:
python -m pip install --upgrade pip
pip install dist/*.whl
python -c "import pyfory; print(pyfory.__version__)"
+ - name: Upload wheels as artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: pyfory-wheels-native-${{ matrix.os }}-${{
matrix.python-version }}
+ path: dist/*.whl
diff --git a/.github/workflows/build-native-release.yml
b/.github/workflows/build-native-release.yml
index d6f013b96..b4e0afda9 100644
--- a/.github/workflows/build-native-release.yml
+++ b/.github/workflows/build-native-release.yml
@@ -30,7 +30,8 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Bump version
- run: ./ci/deploy.sh bump_py_version
+ # Pass the tag name from the push so the python package version
matches the tag.
+ run: ./ci/deploy.sh bump_py_version "${{ github.ref_name }}"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
diff --git a/ci/build_linux_wheels.py b/ci/build_linux_wheels.py
index 02c1754e6..4e0a67b0e 100755
--- a/ci/build_linux_wheels.py
+++ b/ci/build_linux_wheels.py
@@ -53,7 +53,13 @@ for PY in $PYTHON_VERSIONS; do
export PYTHON_PATH="/opt/python/$PY/bin/python"
export PATH="/opt/python/$PY/bin:$OLD_PATH"
echo "Using $PYTHON_PATH"
- python -m pip install cython wheel pytest
+ ARCH=$(uname -m)
+ if [ "$ARCH" = "aarch64" ]; then
+ export PLAT="manylinux2014_aarch64"
+ else
+ export PLAT="manylinux2014_x86_64"
+ fi
+ python -m pip install cython wheel pytest auditwheel
ci/deploy.sh build_pyfory
latest_wheel=$(ls -t dist/*.whl | head -n1)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]