-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
32 lines (29 loc) · 1.3 KB
/
Justfile
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
# Build for std/no_std, with/without features
build:
cargo build
cargo build --all-features
cargo build --target thumbv6m-none-eabi
cargo build --target thumbv6m-none-eabi --features bincode,borsh,postcard,rkyv,rkyv-safe,serde
cargo build --target i686-unknown-linux-gnu
cargo build --target i686-unknown-linux-gnu --features bincode,bitcode,borsh,postcard,rkyv,rkyv-safe,serde
# Check for std/no_std, with/without features
check:
cargo check
cargo check --all-features
cargo check --target thumbv6m-none-eabi
cargo check --target thumbv6m-none-eabi --features bincode,borsh,postcard,rkyv,rkyv-safe,serde
cargo check --target i686-unknown-linux-gnu
cargo check --target i686-unknown-linux-gnu --features bincode,bitcode,borsh,bytemuck,postcard,rkyv,rkyv-safe,serde
# Unit tests with/without features, and Kani model checking
test:
cargo test
cargo test --all-features
# Build & test for randomly selected features
random:
#!/usr/bin/env bash
FEATURES=('arbitrary' 'bincode' 'bitcode' 'borsh' 'bytemuck' 'postcard' 'proptest' 'rkyv' 'rkyv-safe' 'serde' 'speedy')
NUM_SELECTED=$(shuf -i 2-${#FEATURES[@]} -n 1)
SELECTED=$(shuf -e ${FEATURES[@]} -n $NUM_SELECTED | paste -sd, -)
echo "Randomly selected '$SELECTED'"
cargo build --features $SELECTED
cargo test --features $SELECTED