garden: consolidate configuration into a single the top-level file

This commit is contained in:
David Aguilar 2024-12-09 21:31:05 -08:00 committed by arcayr
parent f6900ce9fe
commit 478ae92e41
No known key found for this signature in database
3 changed files with 59 additions and 102 deletions

59
garden.yaml Normal file
View file

@ -0,0 +1,59 @@
# Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
#
# usage:
# garden build
# garden test
# garden check
# garden fmt
# garden fix
commands:
bench: cargo bench "$@"
build: cargo build --all-targets ${workspace} ${release} "$@"
check>:
- check/clippy
- check/fmt
- build
- test
- doc
check/clippy: cargo clippy --all-targets ${workspace} ${release} -- -D warnings
check/fmt: cargo fmt --check
doc: cargo doc ${workspace} --all-features
fix: cargo clippy --all-targets ${workspace} --fix "$@" -- -D warnings
fmt: cargo fmt
test: |
cargo test ${release}
cargo test ${release} --doc
watch: cargo watch --shell "garden check"
variables:
workspace: ""
# Debug build: garden build -D release=''
release: "--release"
environment:
RUSTDOCFLAGS: "-D warnings"
trees:
saphyr-workspace:
description: Saphyr tools and libraries
path: ${GARDEN_CONFIG_DIR}
url: "git@github.com:saphyr-rs/saphyr.git"
variables:
workspace: "--workspace"
remotes:
yaml-test-suite: https://github.com/yaml/yaml-test-suite
saphyr:
description: |
The high-level saphyr crate provides quick-and-easy YAML importing,
exporting and object manipulation.
parser:
description: Fully-compliant YAML 1.2 parser
bench:
description: Benchmarking utilities
bench/tools/gen_large_yaml:
description: Generate large YAML files
bench/tools/bench_compare:
description: Compare benchmarks
fuzz:
description: Fuzz testing tools

View file

@ -1,62 +0,0 @@
# Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
#
# usage:
# garden build
# garden test
# garden check
# garden fmt
# garden fix
commands:
bench: cargo bench "$@"
build: cargo build "$@"
check>:
- check/clippy
- check/fmt
- build
- test
- check/profile
check/clippy: cargo clippy --all-targets "$@" -- -D warnings
check/fmt: cargo fmt --check
check/profile: |
cargo build \
--profile=release-lto \
--package gen_large_yaml \
--bin gen_large_yaml \
--manifest-path tools/gen_large_yaml/Cargo.toml
clean: cargo clean "$@"
coverage: cargo kcov "$@"
doc: cargo doc --no-deps --package yaml-rust2 "$@"
ethi/bench: |
cargo build --release --all-targets
cd ../Yaml-rust && cargo build --release --all-targets
cd ../libfyaml/build && ninja
cargo bench_compare run_bench
fix: cargo clippy --all-targets --fix "$@" -- -D warnings
fmt: cargo fmt "$@"
test: cargo test "$@"
update: cargo update "$@"
watch: cargo watch --shell "garden check"
trees:
yaml-rust2:
description: A pure Rust YAML implementation
path: ${GARDEN_CONFIG_DIR}
url: "git@github.com:Ethiraric/yaml-rust2.git"
remotes:
davvid: "git@github.com:davvid/yaml-rust2.git"
yaml-rust: "git@github.com:chyh1990/yaml-rust.git"
gitconfig:
# Access yaml-rust2 pull requests as yaml-rust2/pull/*
remote.yaml-rust2.url: "git@github.com:Ethiraric/yaml-rust2.git"
remote.yaml-rust2.fetch:
- "+refs/pull/*/head:refs/remotes/yaml-rust2/pull/*"
# Access yaml-rust pull requests as yaml-rust/pull/*
remote.yaml-rust.fetch:
- "+refs/heads/*:refs/remotes/yaml-rust/*"
- "+refs/pull/*/head:refs/remotes/yaml-rust/pull/*"
yaml-test-suite:
description: Comprehensive, language independent Test Suite for YAML
path: tests/yaml-test-suite
url: https://github.com/yaml/yaml-test-suite

View file

@ -1,40 +0,0 @@
# Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
#
# usage:
# garden build
# garden test
# garden check
# garden fmt
# garden fix
commands:
build: |
cargo build --all-targets --release
cargo build --all-targets
check>:
- check/clippy
- check/fmt
- build
- test
- doc
check/clippy: |
cargo clippy --all-targets --release -- -D warnings
cargo clippy --all-targets -- -D warnings
check/fmt: cargo fmt --check
doc: cargo doc --all-features
fix: cargo clippy --all-targets --fix -- -D warnings
fmt: cargo fmt
test: |
cargo test
cargo test --release
cargo test --doc
watch: cargo watch --shell "garden check"
environment:
RUSTDOCFLAGS: "-D warnings"
trees:
saphyr:
description: A pure Rust YAML implementation
path: ${GARDEN_CONFIG_DIR}
url: "git@github.com:saphyr-rs/saphyr.git"