diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b05fe140f..4f91bcd17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -389,6 +389,7 @@ jobs: - name: Run Docker-in-Docker Test env: TARGET: aarch64-unknown-linux-gnu + IMAGE: 'ghcr.io/cross-rs/cross/aarch64-unknown-linux-gnu:main' run: ./ci/test-docker-in-docker.sh shell: bash diff --git a/ci/test-cross-image.sh b/ci/test-cross-image.sh index b1a970e29..a591ba684 100755 --- a/ci/test-cross-image.sh +++ b/ci/test-cross-image.sh @@ -20,7 +20,7 @@ fi main() { - docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET}_IMAGE" \ + docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \ -v /var/run/docker.sock:/var/run/docker.sock \ "${CROSS_TARGET_CROSS_IMAGE}" sh -c ' #!/usr/bin/env sh diff --git a/ci/test-docker-in-docker.sh b/ci/test-docker-in-docker.sh index 3057c68d8..c9a33c021 100755 --- a/ci/test-docker-in-docker.sh +++ b/ci/test-docker-in-docker.sh @@ -10,6 +10,11 @@ if [[ -z "${TARGET}" ]]; then export TARGET="aarch64-unknown-linux-gnu" fi +if [[ "${IMAGE}" ]]; then + # shellcheck disable=SC2140 + export "CROSS_TARGET_${TARGET//-/_}_IMAGE"="${IMAGE}" +fi + source=$(dirname "${BASH_SOURCE[0]}") source=$(realpath "${source}") home=$(dirname "${source}") @@ -18,6 +23,7 @@ main() { docker run -v "${home}":"${home}" -w "${home}" \ --rm -e TARGET -e RUSTFLAGS -e RUST_TEST_THREADS \ -e LLVM_PROFILE_FILE -e CARGO_INCREMENTAL \ + -e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \ -v /var/run/docker.sock:/var/run/docker.sock \ docker:18.09-dind sh -c ' #!/usr/bin/env sh