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 build all && garden 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
ptex-bind:
description: Rust bindings for Ptex
url: "git@github.com:vfx-rs/ptex-bind.git"
path: ${GARDEN_CONFIG_DIR}
environment:
LD_LIBRARY_PATH: ${libdir}
PKG_CONFIG_PATH: ${GARDEN_ROOT}/ptex/dist/share/pkgconfig
commands:
audit: cargo audit "$@"
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: git@github.com:davvid/ptex-bind.git
ratmice: git@github.com:ratmice/ptex-bind.git
groups:
all:
- ptex
- ptex-bind