2020 if : github.repository_owner == 'Samsung'
2121 strategy :
2222 matrix :
23- python-version : [ 'python3 .10', 'python3 .11', 'python3 .12' ]
23+ python-version : [ '3 .10', '3 .11', '3 .12' ]
2424 arch : [ 'x86_64', 'aarch64' ]
2525 include :
2626 - arch : x86_64
3535 image : ${{ matrix.image }}
3636 env :
3737 BUILD_TYPE : release
38- OPTIONS : " -DENABLE_TEST=OFF -DBUILD_ARMCOMPUTE=OFF"
39- DEV_TAG : " "
38+ OPTIONS : " -DBUILD_ARMCOMPUTE=OFF"
39+ # Set env to decide package name: refer runtime/infra/python/wheel_target_hook.py
40+ PLATFORM : ${{ matrix.arch }}
41+ GLIBC_VERSION : " 2.28"
4042
4143 steps :
4244 - name : Checkout
@@ -50,11 +52,11 @@ jobs:
5052 restore-keys : |
5153 external-onert-jammy-
5254
53- - name : Install venv for python version
54- run : |
55- ${{ matrix.python-version }} -m venv ./venv
56- source ./venv/bin/activate
57- pip3 install -U setuptools wheel
55+ - name : Install uv
56+ uses : astral-sh/setup-uv@v7
57+ with :
58+ version : " 0.9.10 "
59+ python-version : " ${{ matrix.python-version }} "
5860
5961 # For flatc build
6062 - name : Install glibc-static
6365
6466 - name : Build
6567 run : |
66- source ./venv/bin/activate
68+ uv venv --seed --python "${{ matrix.python-version }}"
69+ source .venv/bin/activate
6770 make -f Makefile.template configure build install
6871
6972 # Pre-release build
@@ -73,23 +76,17 @@ jobs:
7376 - name : Pre-release packaging
7477 if : github.event.inputs.official == 'false' || github.event_name == 'pull_request' || github.ref_name == 'master'
7578 run : |
76- source ./venv/bin/activate
77- cd runtime/infra/python
78- python3 setup.py bdist_wheel --plat-name manylinux_2_28_${{ matrix.arch }} egg_info --tag-build "dev$(date -u "+%y%m%d")"
79+ uv version "$(uv version --short --project runtime)-dev$(date -u "+%y%m%d")" --project runtime --python "${{ matrix.python-version }}"
7980
80- # Allow official release on release branch only
81- - name : Release packaging
82- if : github.event.inputs.official == 'true' && startsWith(github.ref_name, 'release/')
81+ - name : Build package
8382 run : |
84- source ./venv/bin/activate
85- cd runtime/infra/python
86- python3 setup.py bdist_wheel --plat-name manylinux_2_28_${{ matrix.arch }} egg_info
83+ uv build --wheel --project runtime --python "${{ matrix.python-version }}"
8784
8885 - name : Upload artifacts
8986 uses : actions/upload-artifact@v4
9087 with :
91- name : onert-wheel-${{ matrix.python-version }}-${{ matrix.arch }}
92- path : runtime/infra/python/ dist/*.whl
88+ name : onert-wheel-python ${{ matrix.python-version }}-${{ matrix.arch }}
89+ path : runtime/dist/*.whl
9390
9491 publish-to-pypi :
9592 needs : [ build ]
0 commit comments