forked from ashvardanian/SimSIMD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename wheels.yml to build_wheels.yml
- Loading branch information
1 parent
6f45817
commit 18a1400
Showing
2 changed files
with
77 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on manylinux2014 | ||
runs-on: ubuntu-latest # You still need an Ubuntu base for Docker | ||
services: | ||
docker: | ||
image: docker://quay.io/pypa/manylinux2014_x86_64 | ||
options: --user root | ||
container: | ||
image: quay.io/pypa/manylinux2014_x86_64 # Ensuring the Manylinux2014 image is active | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, 3.10] # Designate the Python versions your app supports | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Build manylinux2014 wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: cp3?-manylinux_x86_64 # Explicitly stating that this job would be building only for target: CPython 3.x on manylinux2014 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.python-version }}-${{ github.run_number }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks all CIBW artifacts into dist/ | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
# To test: repository-url: https://test.pypi.org/legacy/ |
This file was deleted.
Oops, something went wrong.