Skip to content

Commit 50dd405

Browse files
committed
build: dependency groups and Ninja
1 parent 4ab79ad commit 50dd405

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/test.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
- name: Setup Python
2525
uses: actions/setup-python@v5
2626
with:
27-
python-version: "3.13"
27+
python-version-file: pyproject.toml
28+
29+
- name: Setup Developer Prompt
30+
uses: ilammy/msvc-dev-cmd@v1
2831

2932
- name: Build
3033
env:
@@ -33,13 +36,13 @@ jobs:
3336
python -m venv .venv
3437
.venv\Scripts\Activate.ps1
3538
python -m pip install --upgrade pip
36-
pip install '.[test]' -v `
37-
-C verbose=1 `
39+
pip install . -v `
3840
-C override=cmake.args+=["--toolchain=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"]
3941
4042
- name: Test
4143
run: |
4244
.venv\Scripts\Activate.ps1
45+
pip install --group test
4346
pytest test
4447
4548
build_macos:
@@ -65,7 +68,7 @@ jobs:
6568
- name: Setup Python
6669
uses: actions/setup-python@v5
6770
with:
68-
python-version: "3.13"
71+
python-version-file: pyproject.toml
6972

7073
- name: Build
7174
env:
@@ -76,14 +79,14 @@ jobs:
7679
python -m venv .venv
7780
. .venv/bin/activate
7881
pip install --upgrade pip
79-
pip install '.[test]' -v \
80-
-C verbose=1=1 \
82+
pip install . -v \
8183
-C override=cmake.options.VELOCEM_BOOTSTRAP_VCPKG="ON" \
8284
-C override=cmake.options.VCPKG_OSX_DEPLOYMENT_TARGET=\"13.3\"
8385
8486
- name: Test
8587
run: |
8688
. .venv/bin/activate
89+
pip install --group test
8790
pytest test
8891
8992
build_linux:
@@ -104,7 +107,7 @@ jobs:
104107
- name: Setup Python
105108
uses: actions/setup-python@v5
106109
with:
107-
python-version: "3.13"
110+
python-version-file: pyproject.toml
108111

109112
- name: Build
110113
env:
@@ -113,11 +116,11 @@ jobs:
113116
python -m venv .venv
114117
. .venv/bin/activate
115118
pip install --upgrade pip
116-
pip install '.[test]' -v \
117-
-C verbose=1 \
119+
pip install . -v \
118120
-C override=cmake.args+=\["--toolchain=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"\]
119121
120122
- name: Test
121123
run: |
122124
. .venv/bin/activate
125+
pip install --group test
123126
pytest test

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ classifiers = [
1919
urls = { "Documentation" = "https://github.com/nickelpro/velocem" }
2020
dependencies = []
2121

22-
[project.optional-dependencies]
22+
[dependency-groups]
2323
test = ["pytest", "nanoroute"]
2424

2525
[build-system]
@@ -35,8 +35,7 @@ include = ["CMakeLists.txt", "vcpkg.json", "src", "vcpkg"]
3535
[tool.py-build-cmake.cmake]
3636
minimum_version = "3.25"
3737
config = "Release"
38-
build_type = "Release"
39-
build_args = ["-j"]
38+
generator = "Ninja"
4039

4140
[tool.py-build-cmake.linux.cmake.options]
4241
"VCPKG_TARGET_TRIPLET:STRING" = "x64-linux-release-lto"

0 commit comments

Comments
 (0)