Make push button linux distribution (#1476)

* try again

* try again

* try again

* try again

* try again

* try again

* try again

* try again

* .circleci/config.yml

* one more fix

* nit
This commit is contained in:
Awni Hannun 2024-10-14 06:21:44 -07:00 committed by GitHub
parent bf6ec92216
commit b54a70ec2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,9 @@ parameters:
test_release: test_release:
type: boolean type: boolean
default: false default: false
linux_release:
type: boolean
default: false
jobs: jobs:
linux_build_and_test: linux_build_and_test:
@ -208,7 +211,7 @@ jobs:
- store_artifacts: - store_artifacts:
path: dist/ path: dist/
build_linux_test_release: build_linux_release:
parameters: parameters:
python_version: python_version:
type: string type: string
@ -243,6 +246,7 @@ jobs:
pip install auditwheel pip install auditwheel
pip install patchelf pip install patchelf
pip install build pip install build
pip install twine
<< parameters.extra_env >> \ << parameters.extra_env >> \
CMAKE_BUILD_PARALLEL_LEVEL=`nproc` \ CMAKE_BUILD_PARALLEL_LEVEL=`nproc` \
pip install . -v pip install . -v
@ -253,6 +257,11 @@ jobs:
python -m build --wheel python -m build --wheel
auditwheel show dist/* auditwheel show dist/*
auditwheel repair dist/* --plat manylinux_2_31_x86_64 auditwheel repair dist/* --plat manylinux_2_31_x86_64
- run:
name: Upload package
command: |
source env/bin/activate
twine upload wheelhouse/*
- store_artifacts: - store_artifacts:
path: wheelhouse/ path: wheelhouse/
@ -335,9 +344,9 @@ workflows:
when: when:
and: and:
- equal: [ main, << pipeline.git.branch >> ] - equal: [ main, << pipeline.git.branch >> ]
- << pipeline.parameters.test_release >> - << pipeline.parameters.linux_release >>
jobs: jobs:
- build_linux_test_release: - build_linux_release:
matrix: matrix:
parameters: parameters:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]