Skip to content

Commit

Permalink
🔧 update ci for pypy across OSs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Sep 20, 2023
1 parent 9ee4d7b commit 61594ea
Showing 1 changed file with 54 additions and 4 deletions.
58 changes: 54 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,47 @@ permissions:
contents: read

jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install pre-commit
name: Install pre-commit
- run: pre-commit run --all
name: Run pre-commit checks

test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python_version: ['3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: --interpreter ${{ matrix.python_version }}
sccache: 'true'
manylinux: auto
command: develop
- run: pip install pytest
name: Install pytest
- run: pytest tests/
name: Run tests

linux:
runs-on: ubuntu-latest
needs:
- test
- lint
strategy:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
Expand All @@ -43,21 +82,25 @@ jobs:
path: dist

windows:
needs:
- test
- lint
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
python_version: ['3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
args: --release --out dist --interpreter ${{ matrix.python_version }}
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
Expand All @@ -66,20 +109,24 @@ jobs:
path: dist

macos:
needs:
- test
- lint
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
python_version: ['3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ matrix.python_version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
args: --release --out dist --interpreter ${{ matrix.python_version }}
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
Expand All @@ -88,6 +135,9 @@ jobs:
path: dist

sdist:
needs:
- test
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 61594ea

Please sign in to comment.