-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgarden.yaml
73 lines (67 loc) · 2.26 KB
/
garden.yaml
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
# Use "cargo install garden-tools" to install garden (https://gitlab.com/garden-rs/garden).
# Usage:
# garden grow ptex # One-time setup: clone dependencies.
# garden build all # Build ptex-sys and ptex.
# garden build # Build ptex only.
# garden check # Run checks and tests.
# garden test # Run tests.
# garden dev # Build, check and test everything.
# garden watch # Build, check and test whenever files are saved.
# garden doc # Build documentation.
variables:
jobs: $ nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 8
libdir: $ PKG_CONFIG_PATH=${GARDEN_ROOT}/ptex/dist/share/pkgconfig pkg-config --variable=libdir ptex
commands:
dev: |
garden ${GARDEN_CMD_VERBOSE} build all
garden ${GARDEN_CMD_VERBOSE} check
doc: cargo doc --document-private-items --workspace "$@"
watch: cargo watch --shell 'garden build all && garden check'
trees:
ptex:
description: Ptex texture-mapping system
url: "https://github.com/wdas/ptex.git"
commands:
build: make -j ${jobs} prefix="${TREE_PATH}/dist" install
test: make -j ${jobs} test
ptex-bind:
description: Rust bindings for Ptex
url: "[email protected]:vfx-rs/ptex-bind.git"
path: ${GARDEN_CONFIG_DIR}
environment:
LD_LIBRARY_PATH: ${libdir}
PKG_CONFIG_PATH: ${TREE_PATH}/ptex/dist/share/pkgconfig
commands:
audit: |
if type cargo-audit >/dev/null 2>&1
then
cargo audit "$@"
fi
build: cargo build --workspace "$@"
test: cargo test --workspace -- "$@"
expand: cargo expand "$@"
check: |
cargo clippy -- -D warnings
cargo fmt --all --check
check>:
- test
- audit
fix: cargo clippy --all --fix "$@" -- -D warnings
fmt: cargo fmt --all "$@"
publish: |
cd ./ptex-sys
cargo publish "$@"
cd ..
cargo publish "$@"
remotes:
davvid: [email protected]:davvid/ptex-bind.git
ratmice: [email protected]:ratmice/ptex-bind.git
ptex-sys:
description: Low-level sys bindings to the C++ Ptex library
commands:
# garden fmt ptex-sys
fmt: clang-format -i src/ptex-sys.h
groups:
all:
- ptex
- ptex-bind