ci: added python #12
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
name: Python | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
linux: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
target: [x86_64] | |
python-version: ['3.12'] | |
runs-on: ${{ matrix.os }} | |
env: | |
working-directory: ./bindings/python | |
defaults: | |
run: | |
working-directory: ${{ env.working-directory }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: install rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: PyO3/maturin-action@v1 | |
with: | |
command: build | |
manylinux: auto | |
working-directory: ${{ env.working-directory }} | |
rust-toolchain: stable | |
sccache: 'true' | |
args: --release --out dist --find-interpreter | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.os }} | |
path: ${{ env.working-directory }}/dist | |
- name: Ruff Check | |
shell: bash | |
run: | | |
set -e | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt && pip install -r requirements-dev.txt | |
ruff check limbo tests | |
- name: Run Pytest | |
shell: bash | |
run: | | |
set -e | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt && pip install -r requirements-dev.txt | |
pip install -e . | |
pytest | |
macos: | |
strategy: | |
matrix: | |
os: [macos-latest] | |
target: [x86_64] | |
python-version: ['3.12'] | |
runs-on: ${{ matrix.os }} | |
env: | |
working-directory: ./bindings/python | |
defaults: | |
run: | |
working-directory: ${{ env.working-directory }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: install rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: PyO3/maturin-action@v1 | |
with: | |
command: build | |
manylinux: auto | |
working-directory: ${{ env.working-directory }} | |
rust-toolchain: stable | |
sccache: 'true' | |
args: --release --out dist --find-interpreter | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.os }} | |
path: ${{ env.working-directory }}/dist | |
- name: Ruff Check | |
shell: bash | |
run: | | |
set -e | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt && pip install -r requirements-dev.txt | |
ruff check limbo tests | |
- name: Run Pytest | |
shell: bash | |
run: | | |
set -e | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt && pip install -r requirements-dev.txt | |
pip install -e . | |
pytest |