1010env :
1111 MIN_PYTHON_VERSION : " 3.9"
1212
13-
1413defaults :
1514 run :
1615 # Prevents windows runners from running on powershell
@@ -20,27 +19,23 @@ jobs:
2019 lint :
2120 runs-on : ubuntu-latest
2221 steps :
23- - uses : actions/checkout@v5
24- - name : Set up Python
25- uses : actions/setup-python@v5
26- with :
27- python-version : " ${{ env.MIN_PYTHON_VERSION }}"
28- - name : Set up rust toolchain
29- uses : dtolnay/rust-toolchain@stable
30- - name : Set up rustfmt
31- run : rustup component add rustfmt
22+ - uses : actions/checkout@v5
23+ - name : Set up Python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : " ${{ env.MIN_PYTHON_VERSION }}"
27+ - name : Set up rust toolchain
28+ uses : dtolnay/rust-toolchain@stable
29+ - name : Set up rustfmt
30+ run : rustup component add rustfmt
3231
33- # Maturin requires a venv to be activated, that's why we have to create one here
34- - name : Create virtualenv
35- run : |
36- python -m venv .venv
37- source .venv/bin/activate
38- make install-test-requirements
32+ - name : install uv
33+ uses : astral-sh/setup-uv@v6
3934
40- - name : Lint
41- run : |
42- source .venv/bin/activate
43- make lint
35+ - name : Install dependencies and lint
36+ run : |
37+ make install
38+ make lint
4439
4540 check-docs :
4641 runs-on : ubuntu-latest
@@ -52,18 +47,11 @@ jobs:
5247 python-version : " 3.11"
5348 - name : Set up rust toolchain
5449 uses : dtolnay/rust-toolchain@stable
55- - run : |
56- git config user.name github-actions
57- git config user.email github-actions@github.com
58-
59- # venv required by maturin
60- python3 -m venv .venv
61- source .venv/bin/activate
62-
63- make install-test-requirements
64- make install-doc-requirements
65- # Required for pdoc to be able to import the sources
66- make dev-install
50+ - name : install uv
51+ uses : astral-sh/setup-uv@v6
52+ - name : Check documentation
53+ run : |
54+ make install
6755 make doc
6856
6957 # GitHub provides only x86_64 runners, so we cannot test on arm architecture
@@ -74,29 +62,21 @@ jobs:
7462 python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
7563 os : ["ubuntu-latest", "macos-14", "windows-latest"]
7664 steps :
77- - uses : actions/checkout@v5
78- - name : Set up Python
79- uses : actions/setup-python@v5
80- with :
81- python-version : ${{ matrix.python-version }}
82- - name : Set up rust toolchain
83- uses : dtolnay/rust-toolchain@stable
84-
85- # Maturin requires a venv to be activated, that's why we have to create one here
86- - name : Create virtualenv
87- env :
88- BIN : ${{ matrix.os == 'windows-latest' && 'Scripts' || 'bin' }}
89- run : |
90- python -m venv .venv
91- echo "${{ github.workspace }}/.venv/${{ env.BIN }}" >> $GITHUB_PATH
65+ - uses : actions/checkout@v5
66+ - name : Set up Python
67+ uses : actions/setup-python@v5
68+ with :
69+ python-version : ${{ matrix.python-version }}
70+ - name : Set up rust toolchain
71+ uses : dtolnay/rust-toolchain@stable
9272
93- - name : Install dependencies
94- run : |
95- echo "PATH IS $PATH"
96- make install-test-requirements
73+ - name : install uv
74+ uses : astral-sh/setup-uv@v6
9775
98- - name : Test
99- run : make test-ci
76+ - name : Install dependencies and test
77+ run : |
78+ make install
79+ make test
10080
10181 check-wheel-build :
10282 runs-on : ${{ matrix.os }}
@@ -111,28 +91,28 @@ jobs:
11191 - os : windows-latest
11292 architecture : aarch64
11393 steps :
114- - uses : actions/checkout@v5
115- - uses : dtolnay/rust-toolchain@stable
116- - name : Set Rust target
117- id : target
118- if : matrix.os != 'windows-latest'
119- run : |
120- TARGET=${{ matrix.os == 'macos-14' && (matrix.architecture == 'aarch64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin') || (matrix.architecture == 'aarch64' && 'aarch64-unknown-linux-gnu' || null) }}
121- echo "target=$TARGET" >> $GITHUB_OUTPUT
122-
123- - name : build (fast)
124- uses : PyO3/maturin-action@v1
125- with :
126- manylinux : auto
127- command : build
128- args : " -o dist"
129- target : ${{ steps.target.outputs.target }}
94+ - uses : actions/checkout@v5
95+ - uses : dtolnay/rust-toolchain@stable
96+ - name : Set Rust target
97+ id : target
98+ if : matrix.os != 'windows-latest'
99+ run : |
100+ TARGET=${{ matrix.os == 'macos-14' && (matrix.architecture == 'aarch64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin') || (matrix.architecture == 'aarch64' && 'aarch64-unknown-linux-gnu' || null) }}
101+ echo "target=$TARGET" >> $GITHUB_OUTPUT
102+
103+ - name : build (fast)
104+ uses : PyO3/maturin-action@v1
105+ with :
106+ manylinux : auto
107+ command : build
108+ args : " -o dist"
109+ target : ${{ steps.target.outputs.target }}
130110
131- - name : Upload wheels
132- uses : actions/upload-artifact@v4
133- with :
134- name : " wheels-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ matrix.architecture }}"
135- path : dist
111+ - name : Upload wheels
112+ uses : actions/upload-artifact@v4
113+ with :
114+ name : " wheels-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ matrix.architecture }}"
115+ path : dist
136116
137117 check-sdist-build :
138118 runs-on : " ubuntu-latest"
0 commit comments