Skip to content

使用 clippy 修正一些代码风格;升级、精简依赖 (#129) #226

使用 clippy 修正一些代码风格;升级、精简依赖 (#129)

使用 clippy 修正一些代码风格;升级、精简依赖 (#129) #226

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
# linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# with:
# manylinux: auto
# command: build
# container: ghcr.io/biliup/manylinux2014-cross:x86_64
# args: --release --sdist -o dist -m crates/stream-gears/Cargo.toml --find-interpreter
## - name: aarch64
## uses: messense/maturin-action@v1
## with:
## target: aarch64-unknown-linux-gnu
## command: build
## args: --release --sdist -o dist -m crates/stream-gears/Cargo.toml --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
# linux-cross:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python:
# - '3.7'
# - '3.8'
# - '3.9'
# - '3.10'
# target: [aarch64, armv7, s390x, ppc64le]
# include:
# - python: pypy3.7
# target: aarch64
# - python: pypy3.8
# target: aarch64
# - python: pypy3.9
# target: aarch64
# steps:
# - uses: actions/checkout@v2
# - name: Build Wheels
# uses: messense/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# manylinux: auto
# args: -i ${{ matrix.python }} --release --out dist -m crates/stream-gears/Cargo.toml
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
# windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# with:
# command: build
# args: --release -o dist -m crates/stream-gears/Cargo.toml --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
#
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# with:
# command: build
# args: --release -o dist --universal2 -m crates/stream-gears/Cargo.toml --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
build:
name: build on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
target: [x86_64, aarch64]
manylinux: [auto]
include:
- os: ubuntu
target: x86_64
container: ghcr.io/biliup/manylinux2014-cross:x86_64
- os: windows
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: windows
target: i686
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: macos
target: aarch64
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: ubuntu
target: i686
container: ghcr.io/biliup/manylinux2014-cross:i686
- os: ubuntu
target: aarch64
manylinux: 2_28 # FIXME: look https://github.com/briansmith/ring/issues/1728
- os: ubuntu
target: armv7
interpreter: 3.7 3.8 3.9 3.10 3.11
# musllinux
- os: ubuntu
target: x86_64
manylinux: musllinux_1_1
- os: ubuntu
target: aarch64
manylinux: musllinux_1_1
- os: ubuntu
target: ppc64le
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: ubuntu
target: s390x
interpreter: 3.7 3.8 3.9 3.10 3.11
exclude:
# Windows on arm64 only supports Python 3.11+
- os: windows
target: aarch64
# FIXME: look https://github.com/briansmith/ring/issues/1728
- os: ubuntu
target: aarch64
manylinux: auto
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
- name: build sdist
if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }}
uses: messense/maturin-action@v1
with:
command: sdist
args: --out dist -m crates/stream-gears/Cargo.toml
rust-toolchain: stable
- name: build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
container: ${{ matrix.container }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 pypy3.7 pypy3.8 pypy3.9' }} -m crates/stream-gears/Cargo.toml
rust-toolchain: stable
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/py-')"
# needs: [ macos, windows, linux ]
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *