Skip to content

Commit e225eae

Browse files
committed
test cross image with pre-building
1 parent 4825336 commit e225eae

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ci/test-cross-image.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
3535
cd "${td}"
3636
cross run --target "${TARGET}"
3737
'
38+
td="$(mkcargotemp -d)"
39+
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
40+
echo '# Cross.toml
41+
[target.'${TARGET}']
42+
pre-build = ["exit 0"]
43+
' > Cross.toml
44+
cd "${td}"
45+
docker run --rm -e TARGET -e CROSS_CONTAINER_IN_CONTAINER=1 -e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
46+
-v /var/run/docker.sock:/var/run/docker.sock \
47+
-v .:/mount -w /mount
48+
"${CROSS_TARGET_CROSS_IMAGE}" cross build
3849
}
3950

4051
main "${@}"

0 commit comments

Comments
 (0)