| 1 | #!/bin/bash |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | # Supported dependencies |
| 6 | DEPENDENCIES="arbitrary approx bytemuck encase mint rand rkyv serde speedy zerocopy debug-glam-assert" |
| 7 | |
| 8 | # Set of features to build & test. |
| 9 | FEATURE_SETS=( |
| 10 | # std |
| 11 | "std" |
| 12 | "std $DEPENDENCIES" |
| 13 | "std $DEPENDENCIES bytecheck" |
| 14 | "std scalar-math $DEPENDENCIES" |
| 15 | "std cuda" |
| 16 | "std scalar-math cuda" |
| 17 | "std libm" |
| 18 | "std scalar-math libm" |
| 19 | # no_std |
| 20 | "libm" |
| 21 | "libm scalar-math $DEPENDENCIES" |
| 22 | ) |
| 23 | |
| 24 | rustc --version |
| 25 | |
| 26 | for features in "${FEATURE_SETS[@]}" |
| 27 | do |
| 28 | : |
| 29 | cargo build --tests --no-default-features --features="$features" |
| 30 | cargo test --no-default-features --features="$features" |
| 31 | done |
| 32 | |
| 33 | RUSTFLAGS='-C target-feature=+fma' cargo check |
| 34 | |
| 35 | cargo check -p glam-no_std |