Merge pull request #2 from benzlokzik/ci-update #14
Workflow file for this run
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 is for `maturin v0.14.15` | |
# To update, run | |
# | |
# maturin init | |
# | |
on: | |
push: | |
branches: | |
- main | |
- master | |
tags: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist --find-interpreter | |
sccache: 'true' | |
manylinux: auto | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels-linux-${{ matrix.target }} | |
path: dist | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
target: [x64, x86] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: ${{ matrix.target }} | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist --find-interpreter | |
sccache: 'true' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels-windows-${{ matrix.target }} | |
path: dist | |
macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: [x86_64, aarch64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist --find-interpreter | |
sccache: 'true' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels-macos-${{ matrix.target }} | |
path: dist | |
sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build sdist | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: sdist | |
args: --out dist | |
- name: Upload sdist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sdist | |
path: dist | |
release: | |
name: Draft GitHub Release | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
needs: [linux, windows, macos, sdist] | |
steps: | |
- name: Download Linux wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels-linux-x86_64 | |
path: ./dist-linux-x86_64 | |
- name: Download Windows wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels-windows-x64 | |
path: ./dist-windows-x64 | |
- name: Download MacOS wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels-macos-x86_64 | |
path: ./dist-macos-x86_64 | |
- name: Download sdist | |
uses: actions/download-artifact@v3 | |
with: | |
name: sdist | |
path: ./dist-sdist | |
- name: Create Draft Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: | | |
./dist-linux-x86_64/* | |
./dist-windows-x64/* | |
./dist-macos-x86_64/* | |
./dist-sdist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |