| 1 |
[config] |
| 2 |
default_to_workspace = false |
| 3 |
|
| 4 |
[env] |
| 5 |
FUZZ_RUNS = 1000 |
| 6 |
|
| 7 |
[tasks.build] |
| 8 |
command = "cargo" |
| 9 |
args = ["build"] |
| 10 |
|
| 11 |
[tasks.format] |
| 12 |
workspace = true |
| 13 |
install_crate = "rustfmt" |
| 14 |
command = "cargo" |
| 15 |
args = ["fmt", "--", "--emit=files"] |
| 16 |
|
| 17 |
[tasks.clippy] |
| 18 |
workspace = true |
| 19 |
install_crate = "clippy" |
| 20 |
command = "cargo" |
| 21 |
args = ["clippy"] |
| 22 |
|
| 23 |
[tasks.outdated] |
| 24 |
install_crate = "cargo-outdated" |
| 25 |
command = "cargo" |
| 26 |
args = ["outdated", "-R"] |
| 27 |
|
| 28 |
[tasks.bench] |
| 29 |
toolchain = "nightly" |
| 30 |
command = "cargo" |
| 31 |
args = ["bench", "${@}"] |
| 32 |
|
| 33 |
[tasks.bench-maths] |
| 34 |
toolchain = "nightly" |
| 35 |
command = "cargo" |
| 36 |
args = ["bench", "--features", "maths", "${@}"] |
| 37 |
|
| 38 |
[tasks.bench-legacy] |
| 39 |
toolchain = "nightly" |
| 40 |
command = "cargo" |
| 41 |
args = ["bench", "--no-default-features", "--features", "serde,std,legacy-ops", "${@}"] |
| 42 |
|
| 43 |
[tasks.benchcmp] |
| 44 |
dependencies = [ |
| 45 |
"benchcmp-legacy", |
| 46 |
"benchcmp-default" |
| 47 |
] |
| 48 |
install_crate = "benchcmp" |
| 49 |
command = "cargo" |
| 50 |
args = ["benchcmp", "target/legacy.bench", "target/default.bench"] |
| 51 |
|
| 52 |
[tasks.benchcmp-default] |
| 53 |
script = "cargo +nightly bench > target/default.bench" |
| 54 |
|
| 55 |
[tasks.benchcmp-legacy] |
| 56 |
script = "cargo +nightly bench --no-default-features --features serde,std,legacy-ops > target/legacy.bench" |
| 57 |
|
| 58 |
[tasks.coverage] |
| 59 |
dependencies = ["codecov-clean"] |
| 60 |
env = { "CARGO_INCREMENTAL" = "0", "RUSTFLAGS" = "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort", "RUSTDOCFLAGS" = "-Cpanic=abort" } |
| 61 |
run_task = "codecov-grcov" |
| 62 |
|
| 63 |
[tasks.codecov-grcov] |
| 64 |
dependencies = ["codecov-build", "codecov-test"] |
| 65 |
command = "grcov" |
| 66 |
args = [".", "-s", ".", "--binary-path", "./target/debug/", "-t", "html", "--branch", "--ignore-not-existing", "-o", "./target/debug/coverage/"] |
| 67 |
|
| 68 |
[tasks.codecov-open] |
| 69 |
command = "open" |
| 70 |
args = [ "./target/debug/coverage/index.html" ] |
| 71 |
|
| 72 |
[tasks.codecov-clean] |
| 73 |
toolchain = "nightly" |
| 74 |
command = "cargo" |
| 75 |
args = [ "clean" ] |
| 76 |
|
| 77 |
[tasks.codecov-build] |
| 78 |
toolchain = "nightly" |
| 79 |
command = "cargo" |
| 80 |
args = [ "build", "-p", "rust_decimal", "--features=default" ] |
| 81 |
|
| 82 |
[tasks.codecov-test] |
| 83 |
toolchain = "nightly" |
| 84 |
command = "cargo" |
| 85 |
args = [ "test", "-p", "rust_decimal", "--features=default" ] |
| 86 |
|
| 87 |
# Always test no-std with std tests |
| 88 |
[tasks.test] |
| 89 |
dependencies = ["test-no-std"] |
| 90 |
command = "cargo" |
| 91 |
args = ["test"] |
| 92 |
|
| 93 |
[tasks.fuzz] |
| 94 |
dependencies = [ |
| 95 |
"fuzz-arithmetic", |
| 96 |
"fuzz-constructors" |
| 97 |
] |
| 98 |
|
| 99 |
[tasks.fuzz-arithmetic] |
| 100 |
toolchain = "nightly" |
| 101 |
install_crate = "cargo-fuzz" |
| 102 |
command = "cargo" |
| 103 |
args = ["fuzz", "run", "arithmetic", "--", "-runs=${FUZZ_RUNS}"] |
| 104 |
|
| 105 |
[tasks.fuzz-constructors] |
| 106 |
toolchain = "nightly" |
| 107 |
install_crate = "cargo-fuzz" |
| 108 |
command = "cargo" |
| 109 |
args = ["fuzz", "run", "constructors", "--", "-runs=${FUZZ_RUNS}"] |
| 110 |
|
| 111 |
[tasks.test-all] |
| 112 |
dependencies = [ |
| 113 |
"test-no-std", |
| 114 |
"test-default", |
| 115 |
"test-legacy-ops", |
| 116 |
"test-maths", |
| 117 |
"test-misc", |
| 118 |
"test-db", |
| 119 |
"test-rocket-traits", |
| 120 |
"test-serde", |
| 121 |
"test-macros" |
| 122 |
] |
| 123 |
|
| 124 |
[tasks.test-db] |
| 125 |
dependencies = [ |
| 126 |
"test-db-mysql-all", |
| 127 |
"test-db-postgres-all" |
| 128 |
] |
| 129 |
|
| 130 |
[tasks.test-serde] |
| 131 |
dependencies = [ |
| 132 |
"test-serde-float", |
| 133 |
"test-serde-str", |
| 134 |
"test-serde-str-float", |
| 135 |
"test-serde-arbitrary-precision", |
| 136 |
"test-serde-arbitrary-precision-float", |
| 137 |
"test-serde-with-arbitrary-precision", |
| 138 |
"test-serde-with-float", |
| 139 |
"test-serde-with-str", |
| 140 |
] |
| 141 |
|
| 142 |
[tasks.test-macros] |
| 143 |
workspace = true |
| 144 |
|
| 145 |
[tasks.test-no-std] |
| 146 |
command = "cargo" |
| 147 |
args = ["test", "--no-default-features"] |
| 148 |
|
| 149 |
[tasks.test-default] |
| 150 |
command = "cargo" |
| 151 |
args = ["test", "--workspace", "--features=default"] |
| 152 |
|
| 153 |
[tasks.test-legacy-ops] |
| 154 |
command = "cargo" |
| 155 |
args = ["test", "--workspace", "--features=legacy-ops"] |
| 156 |
|
| 157 |
[tasks.test-maths] |
| 158 |
dependencies = [ |
| 159 |
"test-maths-default", |
| 160 |
"test-maths-legacy", |
| 161 |
"test-maths-nopanic", |
| 162 |
] |
| 163 |
|
| 164 |
[tasks.test-maths-default] |
| 165 |
command = "cargo" |
| 166 |
args = ["test", "--workspace", "--no-default-features", "--features=maths", "maths", "--", "--skip", "generated"] |
| 167 |
|
| 168 |
[tasks.test-maths-legacy] |
| 169 |
command = "cargo" |
| 170 |
args = ["test", "--workspace", "--no-default-features", "--features=maths,legacy-ops", "maths", "--", "--skip", "generated"] |
| 171 |
|
| 172 |
[tasks.test-maths-nopanic] |
| 173 |
command = "cargo" |
| 174 |
args = ["test", "--workspace", "--no-default-features", "--features=maths-nopanic", "maths", "--", "--skip", "generated"] |
| 175 |
|
| 176 |
[tasks.test-misc] |
| 177 |
dependencies = [ |
| 178 |
"test-rust-fuzz", |
| 179 |
"test-borsh", |
| 180 |
"test-rkyv" |
| 181 |
] |
| 182 |
|
| 183 |
[tasks.test-rust-fuzz] |
| 184 |
command = "cargo" |
| 185 |
args = ["test", "--workspace", "--no-default-features", "--features=rust-fuzz", "rust_fuzz", "--", "--skip", "generated"] |
| 186 |
|
| 187 |
[tasks.test-db-diesel] |
| 188 |
dependencies = [ |
| 189 |
"test-db-diesel1-mysql", |
| 190 |
"test-db-diesel1-postgres", |
| 191 |
"test-db-diesel2-mysql", |
| 192 |
"test-db-diesel2-postgres", |
| 193 |
] |
| 194 |
|
| 195 |
[tasks.test-db-mysql-all] |
| 196 |
dependencies = [ |
| 197 |
"test-db-diesel1-mysql", |
| 198 |
"test-db-diesel2-mysql", |
| 199 |
] |
| 200 |
|
| 201 |
[tasks.test-db-diesel1-mysql] |
| 202 |
command = "cargo" |
| 203 |
args = ["test", "--workspace", "--tests", "--features=db-diesel1-mysql", "mysql", "--", "--skip", "generated"] |
| 204 |
|
| 205 |
[tasks.test-db-diesel2-mysql] |
| 206 |
command = "cargo" |
| 207 |
args = ["test", "--workspace", "--tests", "--features=db-diesel2-mysql", "mysql", "--", "--skip", "generated"] |
| 208 |
|
| 209 |
[tasks.test-db-postgres-all] |
| 210 |
dependencies = [ |
| 211 |
"test-db-postgres", |
| 212 |
"test-db-tokio-postgres", |
| 213 |
"test-db-diesel1-postgres", |
| 214 |
"test-db-diesel2-postgres" |
| 215 |
] |
| 216 |
|
| 217 |
[tasks.test-db-postgres] |
| 218 |
command = "cargo" |
| 219 |
args = ["test", "--workspace", "--tests", "--features=db-postgres", "postgres", "--", "--skip", "generated"] |
| 220 |
|
| 221 |
[tasks.test-db-tokio-postgres] |
| 222 |
command = "cargo" |
| 223 |
args = ["test", "--workspace", "--tests", "--features=db-tokio-postgres", "postgres", "--", "--skip", "generated"] |
| 224 |
|
| 225 |
[tasks.test-db-diesel1-postgres] |
| 226 |
command = "cargo" |
| 227 |
args = ["test", "--workspace", "--tests", "--features=db-diesel1-postgres", "postgres", "--", "--skip", "generated"] |
| 228 |
|
| 229 |
[tasks.test-db-diesel2-postgres] |
| 230 |
command = "cargo" |
| 231 |
args = ["test", "--workspace", "--tests", "--features=db-diesel2-postgres", "postgres", "--", "--skip", "generated"] |
| 232 |
|
| 233 |
[tasks.test-rocket-traits] |
| 234 |
command = "cargo" |
| 235 |
args = ["test", "--workspace", "--features=rocket-traits"] |
| 236 |
|
| 237 |
[tasks.test-serde-float] |
| 238 |
command = "cargo" |
| 239 |
args = ["test", "--workspace", "--tests", "--features=serde-float", "serde", "--", "--skip", "generated"] |
| 240 |
|
| 241 |
[tasks.test-serde-str] |
| 242 |
command = "cargo" |
| 243 |
args = ["test", "--workspace", "--tests", "--features=serde-str", "serde", "--", "--skip", "generated"] |
| 244 |
|
| 245 |
[tasks.test-serde-str-float] |
| 246 |
command = "cargo" |
| 247 |
args = ["test", "--workspace", "--tests", "--features=serde-str,serde-float", "serde", "--", "--skip", "generated"] |
| 248 |
|
| 249 |
[tasks.test-serde-arbitrary-precision] |
| 250 |
command = "cargo" |
| 251 |
args = ["test", "--workspace", "--tests", "--features=serde-arbitrary-precision", "serde", "--", "--skip", "generated"] |
| 252 |
|
| 253 |
[tasks.test-serde-arbitrary-precision-float] |
| 254 |
command = "cargo" |
| 255 |
args = ["test", "--workspace", "--tests", "--features=serde-arbitrary-precision,serde-float", "serde", "--", "--skip", "generated"] |
| 256 |
|
| 257 |
[tasks.test-serde-with-arbitrary-precision] |
| 258 |
command = "cargo" |
| 259 |
args = ["test", "--workspace", "--tests", "--features=serde-with-arbitrary-precision", "serde", "--", "--skip", "generated"] |
| 260 |
|
| 261 |
[tasks.test-serde-with-float] |
| 262 |
command = "cargo" |
| 263 |
args = ["test", "--workspace", "--tests", "--features=serde-with-float", "serde", "--", "--skip", "generated"] |
| 264 |
|
| 265 |
[tasks.test-serde-with-str] |
| 266 |
command = "cargo" |
| 267 |
args = ["test", "--workspace", "--tests", "--features=serde-with-str", "serde", "--", "--skip", "generated"] |
| 268 |
|
| 269 |
[tasks.test-borsh] |
| 270 |
command = "cargo" |
| 271 |
args = ["test", "--workspace", "--features=borsh", "--", "--skip", "generated"] |
| 272 |
|
| 273 |
[tasks.test-rkyv] |
| 274 |
command = "cargo" |
| 275 |
args = ["test", "--workspace", "--features=rkyv", "--features=rkyv-safe", "--", "--skip", "generated"] |
| 276 |
|
| 277 |
[tasks.test-rand] |
| 278 |
command = "cargo" |
| 279 |
args = ["test", "--workspace", "--features=rand", "--", "--skip", "generated"] |
| 280 |
|