Skip to content

Commit

Permalink
Add ruff --help smoketest after building
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed May 5, 2023
1 parent e93f378 commit 5ad1315
Showing 1 changed file with 55 additions and 42 deletions.
97 changes: 55 additions & 42 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ jobs:
with:
target: x86_64
args: --release --out dist --sdist
- name: "Install built wheel - x86_64"
- name: "Test wheel - x86_64"
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
ruff --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -68,9 +69,10 @@ jobs:
uses: PyO3/maturin-action@v1
with:
args: --release --universal2 --out dist
- name: "Install built wheel - universal2"
- name: "Test wheel - universal2"
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall
ruff --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -113,11 +115,12 @@ jobs:
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
- name: "Install built wheel"
- name: "Test wheel"
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
python -m pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
ruff --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -158,10 +161,11 @@ jobs:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
- name: "Install built wheel"
- name: "Test wheel"
if: ${{ startsWith(matrix.target, 'x86_64') }}
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
ruff --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand All @@ -187,6 +191,7 @@ jobs:
platform:
- target: aarch64-unknown-linux-gnu
arch: aarch64
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=3
- target: armv7-unknown-linux-gnueabihf
arch: armv7
- target: s390x-unknown-linux-gnu
Expand All @@ -195,6 +200,7 @@ jobs:
arch: ppc64le
- target: powerpc64-unknown-linux-gnu
arch: ppc64

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -207,10 +213,11 @@ jobs:
with:
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --out dist
- uses: uraimo/run-on-arch-action@v2
if: matrix.platform.arch != 'ppc64'
name: Install built wheel
name: Test wheel
with:
arch: ${{ matrix.platform.arch }}
distro: ubuntu20.04
Expand All @@ -221,6 +228,7 @@ jobs:
pip3 install -U pip
run: |
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
ruff --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -260,7 +268,7 @@ jobs:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --out dist
- name: "Install built wheel"
- name: "Test wheel"
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
with:
Expand All @@ -269,6 +277,7 @@ jobs:
run: |
apk add py3-pip
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links /io/dist/ --force-reinstall
ruff --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand All @@ -294,8 +303,10 @@ jobs:
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=3
- target: armv7-unknown-linux-musleabihf
arch: armv7

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -309,8 +320,9 @@ jobs:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --out dist
docker-options: ${{ matrix.platform.maturin_docker_options }}
- uses: uraimo/run-on-arch-action@v2
name: Install built wheel
name: Test wheel
with:
arch: ${{ matrix.platform.arch }}
distro: alpine_latest
Expand All @@ -319,6 +331,7 @@ jobs:
apk add py3-pip
run: |
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
ruff check --help
- name: "Upload wheels"
uses: actions/upload-artifact@v3
with:
Expand All @@ -337,38 +350,38 @@ jobs:
*.tar.gz
*.sha256
release:
name: Release
runs-on: ubuntu-latest
needs:
- macos-universal
- macos-x86_64
- windows
- linux
- linux-cross
- musllinux
- musllinux-cross
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/setup-python@v4
- name: "Publish to PyPi"
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.RUFF_TOKEN }}
run: |
pip install --upgrade twine
twine upload --skip-existing *
- name: "Update pre-commit mirror"
run: |
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.RUFF_PRE_COMMIT_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/charliermarsh/ruff-pre-commit/dispatches --data '{"event_type": "pypi_release"}'
- uses: actions/download-artifact@v3
with:
name: binaries
path: binaries
- name: Release
uses: softprops/action-gh-release@v1
with:
files: binaries/*
# release:
# name: Release
# runs-on: ubuntu-latest
# needs:
# - macos-universal
# - macos-x86_64
# - windows
# - linux
# - linux-cross
# - musllinux
# - musllinux-cross
# if: "startsWith(github.ref, 'refs/tags/')"
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: wheels
# - uses: actions/setup-python@v4
# - name: "Publish to PyPi"
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.RUFF_TOKEN }}
# run: |
# pip install --upgrade twine
# twine upload --skip-existing *
# - name: "Update pre-commit mirror"
# run: |
# curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.RUFF_PRE_COMMIT_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/charliermarsh/ruff-pre-commit/dispatches --data '{"event_type": "pypi_release"}'
# - uses: actions/download-artifact@v3
# with:
# name: binaries
# path: binaries
# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# files: binaries/*

0 comments on commit 5ad1315

Please sign in to comment.