File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
35
35
cd "${td}"
36
36
cross run --target "${TARGET}"
37
37
'
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
38
49
}
39
50
40
51
main " ${@ } "
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ ci_dir=$(realpath "${ci_dir}")
23
23
. " ${ci_dir} " /shared.sh
24
24
25
25
main () {
26
- docker run -v " ${PROJECT_HOME} " :" ${PROJECT_HOME} " -w " ${PROJECT_HOME} " \
27
- --rm -e TARGET -e RUSTFLAGS -e RUST_TEST_THREADS \
26
+ docker run --platform linux/amd64 - v " ${PROJECT_HOME} " :" ${PROJECT_HOME} " -w " ${PROJECT_HOME} " \
27
+ --rm -e TARGET -e TARGET_UPPER -e RUSTFLAGS -e RUST_TEST_THREADS \
28
28
-e LLVM_PROFILE_FILE -e CARGO_INCREMENTAL \
29
29
-e " CROSS_TARGET_${TARGET_UPPER// -/ _} _IMAGE" \
30
30
-v /var/run/docker.sock:/var/run/docker.sock \
@@ -55,10 +55,14 @@ git clone --depth 1 https://github.com/cross-rs/test-workspace "${td}"
55
55
cd "${td}"
56
56
cross build --target "${TARGET}" --workspace \
57
57
--manifest-path="./workspace/Cargo.toml" --verbose
58
+ eval CROSS_TARGET_${TARGET_UPPER//-/_}_PRE_BUILD="exit" cross build --target "${TARGET}" --workspace \
59
+ --manifest-path="./workspace/Cargo.toml" --verbose
58
60
cd workspace
59
61
cross build --target "${TARGET}" --workspace --verbose
62
+ eval CROSS_TARGET_${TARGET_UPPER//-/_}_PRE_BUILD="exit" cross build --target "${TARGET}" --workspace --verbose
60
63
cd binary
61
64
cross run --target "${TARGET}" --verbose
65
+ eval CROSS_TARGET_${TARGET_UPPER//-/_}_PRE_BUILD="exit" cross run --target "${TARGET}" --verbose
62
66
'
63
67
}
64
68
You can’t perform that action at this time.
0 commit comments