-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/cargo/openssl-0.10.66
- Loading branch information
Showing
57 changed files
with
2,494 additions
and
1,158 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
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
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 |
---|---|---|
@@ -1,130 +1,217 @@ | ||
name: "[av2] Release" | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
target: [x86_64, x86, aarch64] | ||
platform: | ||
- runner: ubuntu-22.04 | ||
target: x86_64 | ||
- runner: ubuntu-22.04 | ||
target: x86 | ||
- runner: ubuntu-22.04 | ||
target: aarch64 | ||
# - runner: ubuntu-22.04 | ||
# target: armv7 | ||
# - runner: ubuntu-22.04 | ||
# target: ppc64le | ||
python_version: | ||
["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
python-version: ${{ matrix.python_version }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: "true" | ||
sccache: 'true' | ||
manylinux: auto | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
name: wheels-${{ matrix.python_version }}-linux-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
# windows: | ||
# runs-on: windows-latest | ||
# musllinux: | ||
# runs-on: ${{ matrix.platform.runner }} | ||
# strategy: | ||
# matrix: | ||
# target: [x64, x86] | ||
# platform: | ||
# - runner: ubuntu-22.04 | ||
# target: x86_64 | ||
# - runner: ubuntu-22.04 | ||
# target: x86 | ||
# - runner: ubuntu-22.04 | ||
# target: aarch64 | ||
# - runner: ubuntu-22.04 | ||
# target: armv7 | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-python@v4 | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: "3.10" | ||
# architecture: ${{ matrix.target }} | ||
# python-version: 3.x | ||
# - name: Build wheels | ||
# uses: PyO3/maturin-action@v1 | ||
# with: | ||
# target: ${{ matrix.target }} | ||
# target: ${{ matrix.platform.target }} | ||
# args: --release --out dist --find-interpreter | ||
# sccache: "true" | ||
# sccache: 'true' | ||
# manylinux: musllinux_1_2 | ||
# - name: Upload wheels | ||
# uses: actions/upload-artifact@v3 | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: wheels | ||
# name: wheels-musllinux-${{ matrix.platform.target }} | ||
# path: dist | ||
|
||
windows: | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- runner: windows-latest | ||
target: x64 | ||
- runner: windows-latest | ||
target: x86 | ||
python_version: | ||
["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
manylinux: auto | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.python_version }}-windows-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
macos: | ||
runs-on: macos-latest | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
target: [x86_64, aarch64] | ||
platform: | ||
- runner: macos-13 | ||
target: x86_64 | ||
- runner: macos-14 | ||
target: aarch64 | ||
python_version: | ||
["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
python-version: ${{ matrix.python_version }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: "true" | ||
sccache: 'true' | ||
manylinux: auto | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
name: wheels-${{ matrix.python_version }}-macos-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
sdist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Build sdist | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
command: sdist | ||
args: --out dist | ||
- name: Upload sdist | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
name: wheels-sdist | ||
path: dist | ||
|
||
# test_release: | ||
# name: Test release. | ||
# needs: [linux, windows, macos, sdist] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: wheels | ||
# path: dist | ||
# - name: Publish distribution 📦 to Test PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
# repository-url: https://test.pypi.org/legacy/ | ||
test_release: | ||
name: Test Release | ||
runs-on: ubuntu-latest | ||
environment: release | ||
needs: [linux, macos, windows, sdist] | ||
permissions: | ||
# Use to sign the release artifacts | ||
id-token: write | ||
# Used to upload release artifacts | ||
contents: write | ||
# Used to generate artifact attestation | ||
attestations: write | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- name: Generate artifact attestation | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-path: 'wheels-*/*' | ||
# - name: Display structure of downloaded files | ||
# run: ls -R | ||
- name: Create 'wheels' directory | ||
run: mkdir -p wheels | ||
- name: Copy wheels artifacts | ||
run: | | ||
find wheels-* -type f -name "*.whl" -exec cp {} wheels/ \; | ||
- name: Publish package distributions to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: wheels/ | ||
skip-existing: true | ||
verbose: true | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [linux, macos, sdist] | ||
environment: release | ||
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | ||
needs: [linux, macos, windows, sdist] | ||
permissions: | ||
# Use to sign the release artifacts | ||
id-token: write | ||
# Used to upload release artifacts | ||
contents: write | ||
# Used to generate artifact attestation | ||
attestations: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
- name: Generate artifact attestation | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
name: wheels | ||
- name: Publish to PyPI | ||
uses: PyO3/maturin-action@v1 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
subject-path: 'wheels-*/*' | ||
- name: Create 'wheels' directory | ||
run: mkdir -p wheels | ||
- name: Copy wheels artifacts | ||
run: | | ||
find wheels-* -type f -name "*.whl" -exec cp {} wheels/ \; | ||
- name: Publish package distributions to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
command: upload | ||
args: --skip-existing * | ||
packages-dir: wheels/ | ||
verbose: true |
Oops, something went wrong.