.f0rge/ci/steps/03_check.sh 1.3 KiB 35 lines Raw
1 #!/bin/sh2 # 03_check: the workspace builds and tests, and each bundle builds and tests in3 # its own workspace. D19.4 set -eu5 6 root=$(cd "$(dirname "$0")/../../.." && pwd)7 target=${CARGO_TARGET_DIR:-$root/target}8 case "$target" in9     /*) ;;10     *) target=$root/$target ;;11 esac12 13 cargo check --workspace14 # The server integration test invokes the operator CLI from the target dir.15 CARGO_TARGET_DIR=$target cargo build --bin inf3r16 # The conformance runner starts the real bundle binaries, so build them before17 # the workspace test asks it to judge the mock.18 for manifest in plugins/*/*/Cargo.toml; do19     CARGO_TARGET_DIR=$target cargo build --manifest-path "$manifest"20 done21 CARGO_TARGET_DIR=$target cargo test --workspace22 for manifest in plugins/*/*/Cargo.toml; do23     CARGO_TARGET_DIR=$target cargo check --manifest-path "$manifest"24     dir=${manifest%/Cargo.toml}25     case "$dir" in26         plugins/mock/*|plugins/toy/*|plugins/echo/*)27             CARGO_TARGET_DIR=$target cargo test --manifest-path "$manifest"28             ;;29         *)30             # An external engine is never executed on the CI host. Its tests31             # run only through the container gate; compiling it is safe.32             printf '03_check: %s is an external engine; host tests stay off\n' "$dir"33             ;;34     esac35 done