-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
51 lines (44 loc) · 2.31 KB
/
Copy pathjustfile
File metadata and controls
51 lines (44 loc) · 2.31 KB
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
# Thin task dispatcher across the three implementation subtrees. Each recipe
# just cd's into its own subtree and calls that language's native tool --
# this file has no build-graph or caching logic of its own, and isn't meant
# to. conformance/ and ts/ each own their own build/test/lint via turbo (see
# their own turbo.json files), so their recipes here just invoke that; rust/
# owns its own via cargo (see rust/Cargo.toml).
default:
@just --list
# Build every subtree, if it exists.
build:
cd conformance && pnpm turbo run _build
@if [ -d rust ]; then cd rust && cargo build; else echo "rust/ does not exist yet"; fi
cd ts && pnpm turbo run _build
# Test every subtree, if it exists.
test:
cd conformance && pnpm turbo run _test
@if [ -d rust ]; then cd rust && cargo test; else echo "rust/ does not exist yet"; fi
cd ts && pnpm turbo run _test
# Lint every subtree, if it exists.
lint:
cd conformance && pnpm turbo run _lint
@if [ -d rust ]; then cd rust && cargo clippy --all-targets -- -D warnings && cargo fmt --check; else echo "rust/ does not exist yet"; fi
cd ts && pnpm turbo run _lint
# Typecheck ts/ (conformance/'s own typecheck already runs as part of `just conformance`;
# rust/ has none separate from `cargo build`/`cargo clippy`). CI's ts/ Verify job runs this
# between lint and build -- a type error caught only here, not by build or test, is exactly
# what this recipe exists to catch locally before pushing.
typecheck:
cd ts && pnpm turbo run _typecheck
# Regenerate spec/protocol.cddl and validate it against an RFC 8610 parser.
spec:
cd spec && ./generate.sh
cd spec && npx --yes cddl@0.21.1 validate protocol.cddl
# Regenerate conformance/'s golden vectors, typecheck, and verify every
# vector round-trips through cbor2. turbo owns the build/generate/test/
# typecheck task graph and caching within conformance/ itself. Each
# implementation's own conformance-check additionally runs against these same
# vector files -- rust/'s once it exists, ts/'s (via @exadev/wire-mesh-core)
# already.
conformance:
cd conformance && pnpm install
cd conformance && pnpm turbo run _generate _test _typecheck _lint
@if [ -d rust ]; then cd rust && cargo run --bin conformance-check; else echo "rust/ does not exist yet"; fi
cd ts && pnpm install && pnpm conformance-check