Skip to content

Commit

Permalink
Update workspace tests
Browse files Browse the repository at this point in the history
Ensure we build the entire workspace using the `--workspace` flag both with and without the manifest path, and also ensure we build the binary with all our workspace dependencies.
  • Loading branch information
Alexhuszagh authored Jun 7, 2022
1 parent 4232a2a commit 12b4727
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ function retry {
return ${exit_code}
}

workspace_test() {
cross build --target "${TARGET}" --workspace "${@}"
cross run --target "${TARGET}" -p binary "${@}"
cross run --target "${TARGET}" --bin dependencies \
--features=dependencies "${@}"
}

main() {
local td=

Expand Down Expand Up @@ -142,9 +149,9 @@ EOF
https://github.com/cross-rs/test-workspace "${td}"

pushd "${td}"
cross run --target "${TARGET}" -p binary --manifest-path="./workspace/Cargo.toml"
TARGET="${TARGET}" workspace_test --manifest-path="./workspace/Cargo.toml"
pushd "workspace"
cross run --target "${TARGET}" -p binary
TARGET="${TARGET}" workspace_test
pushd "binary"
cross run --target "${TARGET}"
popd
Expand Down

0 comments on commit 12b4727

Please sign in to comment.