Repository navigation
55 lines (49 loc) · 1.67 KB
/
Copy pathpython.yaml
File metadata and controls
55 lines (49 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Python extension
on:
push:
paths:
- 'py/**'
- '.github/workflows/python.yaml'
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14", "3.15" ]
os: [ ubuntu-latest, macos-latest, windows-latest, windows-11-arm ]
exclude:
# Official Windows ARM64 Python installers started in Python 3.11.
- os: windows-11-arm
python-version: "3.10"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ runner.arch == 'ARM64' && 'arm64' || 'x64' }}
- name: Test Python - Windows
if: runner.os == 'Windows'
run: |
pip install virtualenv
virtualenv venv; venv\Scripts\activate.ps1
pwd
python -m pip install --upgrade pip maturin>=1.7.8
python -m pip install pytest
maturin develop --manifest-path py/Cargo.toml --features=test_proto2-module,test_proto3-module
pytest py
# Non-windows
- name: Test Python - Non-Windows
if: runner.os != 'Windows'
run: |
pip install virtualenv
virtualenv venv; source venv/bin/activate
python -m pip install --upgrade pip maturin>=1.7.8
python -m pip install pytest
maturin develop --manifest-path py/Cargo.toml --features=test_proto2-module,test_proto3-module
pytest py