-
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.
chore(release): update release workflow
- Loading branch information
Showing
1 changed file
with
59 additions
and
54 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 |
---|---|---|
|
@@ -59,60 +59,65 @@ jobs: | |
version=$(poetry version | awk '{ print $2 }') && | ||
poetry version $version.dev.$(date +%s) | ||
# build_wheels_linux: | ||
# name: "${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}" | ||
# runs-on: ${{ matrix.os }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# os: [ubuntu-latest] | ||
# cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
# cibw_archs: ["x86_64"] | ||
|
||
# steps: | ||
# - name: Check out repository | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
# - name: Set up QEMU | ||
# if: matrix.cibw_archs != 'x86_64' | ||
# uses: docker/setup-qemu-action@v2 | ||
# with: | ||
# platforms: all | ||
|
||
# - name: Set up python 3.11 | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.11" | ||
|
||
# - name: Install poetry | ||
# uses: snok/install-poetry@v1 | ||
# with: | ||
# virtualenvs-create: false | ||
# virtualenvs-in-project: false | ||
|
||
# - name: Build wheels | ||
# uses: pypa/[email protected] | ||
# env: | ||
# CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
# CIBW_ARCHS: ${{ matrix.cibw_archs }} | ||
# CIBW_BUILD: ${{ matrix.cibw_build }} | ||
# CIBW_SKIP: "*musllinux*" | ||
|
||
# - uses: actions/upload-artifact@v3 | ||
# with: | ||
# path: wheelhouse/*.whl | ||
build_wheels_linux: | ||
name: "${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}" | ||
runs-on: ${{ matrix.os }} | ||
needs: ["release"] | ||
if: needs.release.check-version.outputs.tag | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
cibw_archs: ["x86_64"] | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU | ||
if: matrix.cibw_archs != 'x86_64' | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
|
||
- name: Set up python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: false | ||
virtualenvs-in-project: false | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
CIBW_ARCHS: ${{ matrix.cibw_archs }} | ||
CIBW_BUILD: ${{ matrix.cibw_build }} | ||
CIBW_SKIP: "*musllinux*" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
build_wheels_macos: | ||
name: "${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}" | ||
runs-on: ${{ matrix.os }} | ||
needs: ["release"] | ||
if: needs.release.check-version.outputs.tag | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest] | ||
# cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
cibw_build: ["cp39-*"] | ||
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
cibw_archs: ["x86_64"] | ||
env: | ||
SYSTEM_VERSION_COMPAT: 0 # https://github.com/actions/setup-python/issues/469#issuecomment-1192522949 | ||
|
@@ -122,10 +127,10 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up python 3.12 | ||
- name: Set up python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
python-version: "3.10" | ||
|
||
- name: Install poetry | ||
uses: snok/install-poetry@v1 | ||
|
@@ -161,11 +166,12 @@ jobs: | |
build_wheels_macos_arm64: | ||
name: "${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}" | ||
runs-on: ${{ matrix.os }} | ||
needs: ["release"] | ||
if: needs.release.check-version.outputs.tag | ||
strategy: | ||
matrix: | ||
os: [macos-latest] | ||
# cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
cibw_build: ["cp39-*"] | ||
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
cibw_archs: ["arm64"] | ||
|
||
steps: | ||
|
@@ -176,7 +182,7 @@ jobs: | |
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
python-version: "3.10" | ||
|
||
- name: Configure Homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
@@ -227,7 +233,6 @@ jobs: | |
path: ./wheelhouse/*.whl | ||
|
||
upload_to_pypi: | ||
# needs: ["release", "build_wheels_linux"] | ||
needs: ["release", "build_wheels_macos_arm64", "build_wheels_macos"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -255,7 +260,7 @@ jobs: | |
- name: Publish the release notes | ||
uses: release-drafter/[email protected] | ||
with: | ||
publish: ${{ steps.check-version.outputs.tag != '' }} | ||
tag: ${{ steps.check-version.outputs.tag }} | ||
publish: ${{ needs.release.check-version.outputs.tag != '' }} | ||
tag: ${{ needs.release.check-version.outputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |