Skip to content

Commit dacd8e4

Browse files
ENH: Add 'start' and additional tasks to Pixi manifest
* Separate tasks out in Pixi manifest to allow for running build, testing, and install tasks separately. Add canonical 'start' task to build and install software. Add 'test' task that will do a clean build and run ctests. * Update task name from 'build' to 'test' in README. * Remove 'rm' of build directory from 'build' task to allow for potentially skipping files that do not need to be regenerated and to give user slightly more control.
1 parent 2bdf9dc commit dacd8e4

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ export PATH="/root/.pixi/bin:$PATH"
332332
cd user/
333333
git clone git@github.com:prashjha/PeriDEM.git
334334
cd PeriDEM/
335-
pixi run build
335+
pixi run test
336336
```
337337

338338
### Future plans

pixi.toml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ name = "PeriDEM"
44
platforms = ["linux-64", "osx-arm64"]
55
version = "v0.2.1"
66

7-
# Currently can't install, only build?
8-
# c.f. https://github.com/prashjha/PeriDEM/blob/8f73cbd12fbf8d483bb46670661f9f2641d03c37/README.md?plain=1#L264
97
[tasks.build]
8+
description = "Build PeriDEM from local source"
109
cmd = """
11-
rm -rf build && \
1210
cmake -DEnable_Documentation=OFF \
1311
-DEnable_Tests=ON \
1412
-DEnable_High_Load_Tests=OFF \
@@ -20,10 +18,25 @@ cmake -DEnable_Documentation=OFF \
2018
-S . \
2119
-B build && \
2220
cmake build -LH && \
23-
cmake --build build --clean-first --parallel "$(nproc --ignore=2)" && \
24-
ctest --verbose --test-dir build/
21+
cmake --build build --clean-first --parallel "$(nproc --ignore=2)"
2522
"""
2623

24+
[tasks.ctest]
25+
description = "Run tests with ctest"
26+
cmd = "ctest --verbose --test-dir ./build/"
27+
28+
[tasks.install-peridem]
29+
description = "Install PeriDEM under CMAKE_INSTALL_PREFIX defined in build"
30+
cmd = "cmake --install build"
31+
32+
[tasks.start]
33+
description = "Build and install PeriDEM"
34+
depends-on = ["build", "install-peridem"]
35+
36+
[tasks.test]
37+
description = "Do a clean build of PeriDEM and run ctest tests"
38+
depends-on = ["build", "ctest"]
39+
2740
[dependencies]
2841
cxx-compiler = ">=1.11.0,<2"
2942
cmake = ">=4.2.1,<5"

0 commit comments

Comments
 (0)