Skip to content

Commit 4a7a3fa

Browse files
committed
Try setting Python version correctly
1 parent ec731bd commit 4a7a3fa

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

.github/workflows/main.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest, macos-latest, windows-latest]
23-
python-version: ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13"]
23+
python-version: [py37, py38, py39, py311, py312, py313]
2424

2525
steps:
2626
- uses: actions/checkout@v4
2727

2828
- uses: prefix-dev/[email protected]
29+
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
2930
with:
3031
cache: false
32+
environments: >-
33+
${{ matrix.python-version }}
3134
3235
- name: Run build
33-
run: pixi run build
36+
run: pixi run -e ${{ matrix.python-version }} build
3437

35-
- name: Run tests
36-
run: pixi run test
38+
- name: Run test
39+
run: pixi run -e ${{ matrix.python-version }} test

pixi.toml

+24
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
66
[dependencies]
77
python = ">=3.7"
88

9+
[feature.py37.dependencies]
10+
python = "3.7.*"
11+
[feature.py38.dependencies]
12+
python = "3.8.*"
13+
[feature.py39.dependencies]
14+
python = "3.9.*"
15+
[feature.py310.dependencies]
16+
python = "3.10.*"
17+
[feature.py311.dependencies]
18+
python = "3.11.*"
19+
[feature.py312.dependencies]
20+
python = "3.12.*"
21+
[feature.py313.dependencies]
22+
python = "3.13.*"
23+
24+
[environments]
25+
py37 = ["py37"]
26+
py38 = ["py38"]
27+
py39 = ["py39"]
28+
py310 = ["py310"]
29+
py311 = ["py311"]
30+
py312 = ["py312"]
31+
py313 = ["py313"]
32+
933
# Build dependencies
1034
cmake = "*"
1135
cxx-compiler = "*"

0 commit comments

Comments
 (0)