Skip to content

Commit f8fbe93

Browse files
authored
Merge branch 'apache:main' into main
2 parents e555435 + 3f40a69 commit f8fbe93

File tree

798 files changed

+124977
-31291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

798 files changed

+124977
-31291
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.2
1+
8.2.1

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
java/benchmark export-ignore
1+
benchmarks export-ignore
2+
integration_tests export-ignore

.github/scripts/add_doc_headers.sh

Lines changed: 0 additions & 108 deletions
This file was deleted.

.github/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
apache/fory-site@main:
1919
- source: docs/guide/
20-
dest: docs/docs/guide/
20+
dest: docs/guide/
2121
- source: docs/specification/
2222
dest: docs/specification/
2323
- source: docs/benchmarks/

.github/workflows/build-containerized-pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ jobs:
2929
strategy:
3030
matrix:
3131
os: [ubuntu-latest, ubuntu-24.04-arm]
32+
python: [cp313-cp313]
3233
steps:
3334
- uses: actions/checkout@v5
3435
- name: Build and test wheels
35-
run: ./ci/build_linux_wheels.py --arch ${{ runner.arch }}
36+
run: ./ci/build_linux_wheels.py --arch ${{ runner.arch }} --python ${{ matrix.python }}
3637
- name: Upload wheels as artifacts
3738
uses: actions/upload-artifact@v4
3839
with:
39-
name: pyfory-wheels-containerized-${{ matrix.os }}
40+
name: pyfory-wheels-${{ matrix.os }}-${{ matrix.python }}
4041
path: dist/*.whl

.github/workflows/build-containerized-release.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,22 @@ jobs:
2626
strategy:
2727
matrix:
2828
os: [ubuntu-latest, ubuntu-24.04-arm]
29+
python:
30+
- cp38-cp38
31+
- cp39-cp39
32+
- cp310-cp310
33+
- cp311-cp311
34+
- cp312-cp312
35+
- cp313-cp313
2936
steps:
3037
- uses: actions/checkout@v5
3138
- name: Bump version
3239
# Pass the tag name from the push (e.g. "v0.12.1b1"); deploy.sh will strip leading "v".
3340
run: ./ci/deploy.sh bump_py_version "${{ github.ref_name }}"
34-
- name: Set up Python 3.8
35-
uses: actions/setup-python@v5
36-
with:
37-
python-version: 3.8
38-
cache: 'pip'
39-
- name: Cache Bazel binary
40-
uses: actions/cache@v4
41-
with:
42-
path: |
43-
~/bin/bazel
44-
~/.local/bin/bazel
45-
key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.bazelversion') }}
46-
- name: Install bazel
47-
run: ./ci/run_ci.sh install_bazel
4841
- name: Build and test wheels
49-
run: ./ci/build_linux_wheels.py --arch ${{ runner.arch }} --release
42+
run: ./ci/build_linux_wheels.py --arch ${{ runner.arch }} --python ${{ matrix.python }} --release
5043
- name: Upload wheels as artifacts
5144
uses: actions/upload-artifact@v4
5245
with:
53-
name: pyfory-wheels-${{ matrix.os }}-${{ runner.arch }}-${{ github.ref_name }}
46+
name: pyfory-wheels-${{ matrix.os }}-${{ matrix.python }}-${{ github.ref_name }}
5447
path: dist/*.whl

.github/workflows/build-native-pr.yml

Lines changed: 139 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ on:
2424
paths: [ci/**, python/**, .github/workflows/**]
2525

2626
jobs:
27-
build:
28-
runs-on: ${{ matrix.os }}
27+
build-windows:
28+
runs-on: windows-latest
2929
strategy:
3030
matrix:
31-
os: [macos-latest, windows-latest]
32-
python-version: ['3.8', '3.13']
31+
python-version: ['3.13']
3332
steps:
3433
- uses: actions/checkout@v5
3534
- uses: actions/setup-python@v5
@@ -44,11 +43,7 @@ jobs:
4443
~/.local/bin/bazel
4544
C:\bazel\bazel.exe
4645
key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.bazelversion') }}
47-
- name: Install bazel
48-
if: runner.os != 'Windows'
49-
run: ./ci/run_ci.sh install_bazel
5046
- name: Install bazel (Windows)
51-
if: runner.os == 'Windows'
5247
run: ./ci/run_ci.sh install_bazel_windows
5348
shell: bash
5449
- name: Build wheel
@@ -63,5 +58,140 @@ jobs:
6358
- name: Upload wheels as artifacts
6459
uses: actions/upload-artifact@v4
6560
with:
66-
name: pyfory-wheels-native-${{ matrix.os }}-${{ matrix.python-version }}
61+
name: pyfory-wheels-native-windows-${{ matrix.python-version }}
62+
path: dist/*.whl
63+
64+
build-macos-arm64:
65+
runs-on: macos-15
66+
strategy:
67+
matrix:
68+
python-version: ['3.13']
69+
steps:
70+
- uses: actions/checkout@v5
71+
- uses: actions/setup-python@v5
72+
with:
73+
python-version: ${{ matrix.python-version }}
74+
cache: 'pip'
75+
- name: Cache Bazel binary
76+
uses: actions/cache@v4
77+
with:
78+
path: |
79+
~/bin/bazel
80+
~/.local/bin/bazel
81+
key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.bazelversion') }}
82+
- name: Install bazel
83+
run: ./ci/run_ci.sh install_bazel
84+
- name: Build wheel
85+
run: ./ci/deploy.sh build_pyfory
86+
shell: bash
87+
env:
88+
MACOSX_DEPLOYMENT_TARGET: "11.0"
89+
PYFORY_WHEEL_PLAT: macosx_11_0_arm64
90+
- name: Install and verify wheel
91+
shell: bash
92+
run: |
93+
python -m pip install --upgrade pip
94+
pip install dist/*.whl
95+
python -c "import pyfory; print(pyfory.__version__)"
96+
- name: Upload wheel artifact
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: pyfory-macos-arm64-wheel-${{ matrix.python-version }}
100+
path: dist/*.whl
101+
102+
build-macos-x86_64:
103+
runs-on: macos-15-intel
104+
strategy:
105+
matrix:
106+
python-version: ['3.13']
107+
steps:
108+
- uses: actions/checkout@v5
109+
- uses: actions/setup-python@v5
110+
with:
111+
python-version: ${{ matrix.python-version }}
112+
cache: 'pip'
113+
- name: Cache Bazel binary
114+
uses: actions/cache@v4
115+
with:
116+
path: |
117+
~/bin/bazel
118+
~/.local/bin/bazel
119+
key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.bazelversion') }}
120+
- name: Install bazel
121+
run: ./ci/run_ci.sh install_bazel
122+
- name: Build wheel
123+
run: ./ci/deploy.sh build_pyfory
124+
shell: bash
125+
env:
126+
MACOSX_DEPLOYMENT_TARGET: "11.0"
127+
PYFORY_WHEEL_PLAT: macosx_11_0_x86_64
128+
- name: Install and verify wheel
129+
shell: bash
130+
run: |
131+
python -m pip install --upgrade pip
132+
pip install dist/*.whl
133+
python -c "import pyfory; print(pyfory.__version__)"
134+
- name: Upload wheel artifact
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: pyfory-macos-x86_64-wheel-${{ matrix.python-version }}
138+
path: dist/*.whl
139+
140+
merge-macos-universal2:
141+
runs-on: macos-15
142+
needs: [build-macos-arm64, build-macos-x86_64]
143+
strategy:
144+
matrix:
145+
python-version: ['3.13']
146+
steps:
147+
- uses: actions/setup-python@v5
148+
with:
149+
python-version: ${{ matrix.python-version }}
150+
- name: Install wheel tooling
151+
run: python -m pip install --upgrade pip wheel
152+
- name: Download arch wheels
153+
uses: actions/download-artifact@v5
154+
with:
155+
pattern: pyfory-macos-*-wheel-${{ matrix.python-version }}
156+
path: artifacts
157+
merge-multiple: true
158+
- name: Build universal2 wheel
159+
shell: bash
160+
run: |
161+
set -euo pipefail
162+
mkdir -p unpacked dist
163+
ARM_WHL=$(ls artifacts/*arm64*.whl | head -n1)
164+
X86_WHL=$(ls artifacts/*x86_64*.whl | head -n1)
165+
python -m wheel unpack "$ARM_WHL" -d unpacked/arm64
166+
python -m wheel unpack "$X86_WHL" -d unpacked/x86_64
167+
ARM_DIR=$(ls -d unpacked/arm64/pyfory-*)
168+
X86_DIR=$(ls -d unpacked/x86_64/pyfory-*)
169+
UNIVERSAL_DIR="unpacked/pyfory-universal2"
170+
cp -R "$ARM_DIR" "$UNIVERSAL_DIR"
171+
for so in pyfory/buffer.so pyfory/serialization.so pyfory/format/_format.so pyfory/lib/mmh3/mmh3.so; do
172+
lipo -create "$ARM_DIR/$so" "$X86_DIR/$so" -output "$UNIVERSAL_DIR/$so"
173+
done
174+
WHEEL_FILE=$(ls "$UNIVERSAL_DIR"/pyfory-*.dist-info/WHEEL)
175+
sed -i '' -e 's/macosx_11_0_arm64/macosx_11_0_universal2/g' \
176+
-e 's/macosx_11_0_x86_64/macosx_11_0_universal2/g' \
177+
"$WHEEL_FILE"
178+
python -m wheel pack "$UNIVERSAL_DIR" -d dist
179+
- name: Verify universal2 binaries
180+
shell: bash
181+
run: |
182+
set -euo pipefail
183+
mkdir -p verify
184+
for whl in dist/*.whl; do
185+
python -m wheel unpack "$whl" -d verify
186+
done
187+
VERIFY_DIR=$(ls -d verify/pyfory-*)
188+
WHEEL_FILE=$(ls "$VERIFY_DIR"/pyfory-*.dist-info/WHEEL)
189+
grep -q "macosx_11_0_universal2" "$WHEEL_FILE"
190+
for so in pyfory/buffer.so pyfory/serialization.so pyfory/format/_format.so pyfory/lib/mmh3/mmh3.so; do
191+
echo "$so: $(lipo -archs "$VERIFY_DIR/$so")"
192+
done
193+
- name: Upload universal2 wheel
194+
uses: actions/upload-artifact@v4
195+
with:
196+
name: pyfory-wheels-native-macos-universal2-${{ matrix.python-version }}
67197
path: dist/*.whl

0 commit comments

Comments
 (0)