Skip to content

Commit

Permalink
ci: add lint and test steps
Browse files Browse the repository at this point in the history
  • Loading branch information
u8slvn committed Feb 4, 2024
1 parent d573dc4 commit c3b9f40
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# This file is autogenerated by maturin v1.4.0
# To update, run
#
# maturin generate-ci github
#
name: CI

on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
Expand All @@ -19,83 +12,122 @@ permissions:
contents: read

jobs:
quality:
name: Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install pre-commit
run: python -m pip install pre-commit

- name: Check quality
run: make lint

- name: Check tests
run: make test

linux:
name: Build linux
runs-on: ubuntu-latest
needs: [quality]
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
path: dist

windows:
name: Build windows
runs-on: windows-latest
needs: [quality]
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
path: dist

macos:
name: Build macos
runs-on: macos-latest
needs: [quality]
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
path: dist

sdist:
name: Build sdist
runs-on: ubuntu-latest
needs: [quality]
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:
Expand All @@ -111,6 +143,7 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: wheels

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
Expand Down

0 comments on commit c3b9f40

Please sign in to comment.