Skip to content

Commit

Permalink
ci: merge Python workflow into release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Aug 19, 2024
1 parent a24682a commit ffd444a
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 163 deletions.
163 changes: 0 additions & 163 deletions .github/workflows/python.yml

This file was deleted.

155 changes: 155 additions & 0 deletions .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,158 @@ jobs:
working-directory: editors/vscode
env:
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}

pypi_build_linux:
needs: ["wait_for_ci"]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- x86
- x86_64
steps:
- uses: actions/checkout@v4
- if: matrix.target == 'x86_64'
name: Build wheels (static openssl)
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --features vendored-openssl
sccache: "true"
manylinux: auto
before-script-linux: |
yum install -y perl-IPC-Cmd
- if: matrix.target == 'x86'
name: Build wheels (shared openssl)
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: "true"
manylinux: auto
before-script-linux: |
yum install -y openssl-devel
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-${{ matrix.target }}
path: dist

pypi_build_windows:
needs: ["wait_for_ci"]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target:
- x64
- x86
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-${{ matrix.target }}
path: dist

pypi_build_macos:
needs: ["wait_for_ci"]
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64
- x86_64
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-${{ matrix.target }}
path: dist

pypi_build_sdist:
needs: ["wait_for_ci"]
runs-on: ubuntu-latest
steps:
- 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@v4
with:
name: wheels-${{ github.job }}
path: dist

pypi_merge_wheels:
name: Merge PyPI wheels
runs-on: ubuntu-latest
needs:
- pypi_build_linux
- pypi_build_windows
- pypi_build_macos
- pypi_build_sdist
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: wheels
- uses: actions/upload-artifact@v4
with:
name: wheels
path: wheels

pypi_test_taplo_cli:
needs: pypi_merge_wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheels
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install taplo --no-index --find-links wheels/
- run: taplo help

pypi_publish_taplo_cli:
name: Release
runs-on: ubuntu-latest
needs: pypi_test_taplo_cli
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels/*

0 comments on commit ffd444a

Please sign in to comment.