-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathjustfile
More file actions
123 lines (98 loc) · 4.41 KB
/
justfile
File metadata and controls
123 lines (98 loc) · 4.41 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
spellcheck *args:
cargo spellcheck --code 1 {{ args }}
typos
test *args:
cargo nextest run --workspace --exclude rustsat-pyapi --features=_test {{ args }}
test-external-solver *args:
echo "RS_EXT_SOLVER=$RS_EXT_SOLVER"
cargo nextest run -p rustsat --test external_solver --verbose {{ args }} -- --ignored
[env("CARGO_BUILD_TARGET_DIR", "target/tests")]
[env("CFLAGS", "-fsanitize=address")]
[env("CXXFLAGS", "-fsanitize=address")]
[env("RUSTFLAGS", "-Zsanitizer=address")]
test-asan *args:
CARGO_BUILD_TARGET=$(rustc -vV | sed -n 's|host: ||p') cargo nextest run --workspace --exclude rustsat-pyapi --features=_test {{ args }}
[env("CARGO_BUILD_TARGET_DIR", "target/tests")]
[env("CFLAGS", "-fsanitize=address")]
[env("CXXFLAGS", "-fsanitize=address")]
[env("RUSTFLAGS", "-Zsanitizer=address")]
test-external-solver-asan *args:
echo "RS_EXT_SOLVER=$RS_EXT_SOLVER"
CARGO_BUILD_TARGET=$(rustc -vV | sed -n 's|host: ||p') cargo nextest run -p rustsat --test external_solver --verbose {{ args }} -- --ignored
doc-tests *args:
cargo test --workspace --exclude rustsat-capi --exclude rustsat-pyapi --features=_test --doc {{ args }}
[env("CARGO_BUILD_TARGET_DIR", "target/clippy")]
clippy *args:
cargo clippy --workspace --all-targets --features=_test {{ args }} -- -Dwarnings
gen *args:
cargo run -p rustsat-codegen -- {{ args }}
readmes *args:
cargo rdme {{ args }}
# keep-sorted start
cargo rdme --workspace-project pigeons {{ args }}
cargo rdme --workspace-project rustsat-batsat {{ args }}
cargo rdme --workspace-project rustsat-cadical {{ args }}
cargo rdme --workspace-project rustsat-capi {{ args }}
cargo rdme --workspace-project rustsat-glucose {{ args }}
cargo rdme --workspace-project rustsat-ipasir {{ args }}
cargo rdme --workspace-project rustsat-kissat {{ args }}
cargo rdme --workspace-project rustsat-minisat {{ args }}
cargo rdme --workspace-project rustsat-pyapi {{ args }}
cargo rdme --workspace-project rustsat-tools {{ args }}
# keep-sorted end
pyapi cmd *args:
maturin {{ cmd }} -m pyapi/Cargo.toml {{ args }}
pyapi-build-install: (pyapi "build")
pip install --no-index --find-links target/wheels/ rustsat
docs *args:
cargo doc -Zunstable-options -Zrustdoc-scrape-examples --workspace --features=_docs {{ args }}
test-each-feature *args:
cargo hack nextest run --each-feature {{ args }}
feature-powerset *args:
cargo hack nextest run -p rustsat --feature-powerset --depth 2 --exclude-features bench {{ args }}
semver-checks:
nix develop '.#semverChecks' --command cargo semver-checks --workspace --exclude rustsat-cadical
nix develop '.#semverChecks' --command cargo semver-checks -p rustsat-cadical --default-features
kani:
cargo kani
precommit: gen spellcheck (readmes "--check")
prepush: clippy test
subtree tree cmd ref:
#!/usr/bin/env -S bash -euo pipefail
declare -A prefixes
prefixes=(
["minisat"]="minisat/vendor"
["glucose"]="glucose/vendor"
["cadical"]="cadical/vendor"
["kissat"]="kissat/vendor"
)
declare -A repos
repos=(
["minisat"]="git@github.com:chrjabs/minisat.git"
["glucose"]="git@github.com:chrjabs/glucose.git"
["cadical"]="git@github.com:arminbiere/cadical.git"
["kissat"]="git@github.com:arminbiere/kissat.git"
)
case {{ cmd }} in
pull)
echo "Pulling subtree {{ tree }} from ref {{ ref }}"
git subtree pull --prefix "${prefixes[{{ tree }}]}" "${repos[{{ tree }}]}" {{ ref }} --squash -m "chore({{ tree }}): update subtree to {{ ref }}"
;;
push)
echo "Pushing subtree {{ tree }} from ref {{ ref }}"
git subtree push --prefix "${prefixes[{{ tree }}]}" "${repos[{{ tree }}]}" {{ ref }}
;;
*)
2>&1 echo "Unknown command {{ cmd }}"
2>&1 echo "Usage: subtree <tree> <command> <ref>"
exit 1
esac
coverage *args:
cargo llvm-cov --no-report nextest --workspace --exclude rustsat-pyapi --features=_test
cargo llvm-cov --no-report --doc --workspace --exclude rustsat-ipasir --features=_test
cargo llvm-cov report --doctests --html {{ args }}
miri *args:
MIRIFLAGS=-Zmiri-disable-isolation cargo miri nextest run {{ args }}
all-miri *args: (miri "--workspace --exclude rustsat-pyapi --features=_test" args)
deny *args:
cargo deny --exclude-unpublished --exclude-dev check {{ args }}