-
-
Notifications
You must be signed in to change notification settings - Fork 39
74 lines (64 loc) · 1.97 KB
/
mrml-python-main.yml
File metadata and controls
74 lines (64 loc) · 1.97 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: mrml-python
on:
push:
branches:
- main
paths:
- ".github/workflows/mrml-python-main.yml"
- "Cargo.lock"
- "Cargo.toml"
- "packages/mrml-core/**"
- "packages/mrml-python/**"
pull_request:
paths:
- ".github/workflows/mrml-python-main.yml"
- "Cargo.lock"
- "Cargo.toml"
- "packages/mrml-core/**"
- "packages/mrml-python/**"
workflow_dispatch:
permissions:
contents: read
jobs:
testing:
strategy:
matrix:
platform-os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10", "3.13"]
runs-on: ${{ matrix.platform-os }}
steps:
- uses: actions/checkout@v6
- name: setup python
if: matrix.python-version != '3.13' || matrix.platform-os != 'ubuntu-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
# Use deadsnakes until https://github.com/actions/setup-python/issues/771 is closed
- name: setup python
if: matrix.python-version == '3.13' && matrix.platform-os == 'ubuntu-latest'
uses: deadsnakes/action@v3.2.0
with:
python-version: ${{ matrix.python-version }}
nogil: true
- uses: dtolnay/rust-toolchain@stable
- name: init python venv
if: matrix.platform-os != 'windows-latest'
run: |
pip install --upgrade pip
python3 -m venv env
source env/bin/activate
python3 -m pip install pytest maturin
maturin develop
python3 -m pytest
working-directory: packages/mrml-python
- name: init python venv
if: matrix.platform-os == 'windows-latest'
shell: pwsh
run: |
pip install --upgrade pip
python3 -m venv env
env\Scripts\Activate.ps1
python3 -m pip install pytest maturin
maturin develop
working-directory: packages/mrml-python