File: justfile

package info (click to toggle)
rust-cradle 0.2.2-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 364 kB
  • sloc: makefile: 2; php: 1
file content (55 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download
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
ci: test build doc clippy fmt context-integration-tests run-examples forbidden-words render-readme-check

build:
  cargo build --all-targets --all-features --workspace

test +pattern="":
  cargo test {{ pattern }}

test-lib-fast +pattern="":
  cargo test --lib {{ pattern }}

context-integration-tests:
  cargo run --features "test_executables" --bin context_integration_tests

doc +args="":
  cargo doc --workspace {{args}}

clippy:
  cargo clippy --all-targets --all-features --workspace

fmt:
  cargo fmt --all -- --check

run-examples:
  cargo run --example readme

render-readme:
  php README.php > README.md

render-readme-check:
  #!/usr/bin/env bash
  diff <(php README.php) README.md

forbidden-words:
  ! grep -rni \
    'dbg!\|fixme\|todo\|#\[ignore\]' \
    src tests examples
  @echo No forbidden words found

all-rustc-versions *args="ci":
  #!/usr/bin/env bash
  set -eu

  export RUSTFLAGS="--deny warnings"

  # install yq with: pip3 install yq
  versions=$(cat .github/workflows/ci.yaml \
    | yq -r '.jobs.all.strategy.matrix.rust | sort | join(" ")' \
    ;)
  for RUSTUP_TOOLCHAIN in $versions
  do
    export RUSTUP_TOOLCHAIN
    cargo version
    just {{ args }}
  done