Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for real #926

Merged
merged 1 commit into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ jobs:
run: ./ci/test-cross-image.sh
env:
TARGET: 'aarch64-unknown-linux-gnu'
IMAGE: 'ghcr.io/cross-rs/cross/aarch64-unknown-linux-gnu:main'
IMAGE: 'ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main'
shell: bash

- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -389,7 +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'
IMAGE: 'ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main'
run: ./ci/test-docker-in-docker.sh
shell: bash

Expand Down
7 changes: 5 additions & 2 deletions ci/test-cross-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ set -eo pipefail
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
# ^^subst is not supported on macOS bash (bash <4)
# shellcheck disable=SC2155
export TARGET_UPPER=$(echo "$TARGET" | awk '{print toupper($0)}')

if [[ "${IMAGE}" ]]; then
# shellcheck disable=SC2140
export "CROSS_TARGET_${TARGET//-/_}_IMAGE"="${IMAGE}"
export "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE"="${IMAGE}"
fi

if [[ -z "${CROSS_TARGET_CROSS_IMAGE}" ]]; then
Expand All @@ -20,7 +23,7 @@ fi

main() {

docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \
docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
-v /var/run/docker.sock:/var/run/docker.sock \
"${CROSS_TARGET_CROSS_IMAGE}" sh -c '
#!/usr/bin/env sh
Expand Down
7 changes: 5 additions & 2 deletions ci/test-docker-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ set -eo pipefail
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
# ^^subst is not supported on macOS bash (bash <4)
# shellcheck disable=SC2155
export TARGET_UPPER=$(echo "$TARGET" | awk '{print toupper($0)}')

if [[ "${IMAGE}" ]]; then
# shellcheck disable=SC2140
export "CROSS_TARGET_${TARGET//-/_}_IMAGE"="${IMAGE}"
export "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE"="${IMAGE}"
fi

source=$(dirname "${BASH_SOURCE[0]}")
Expand All @@ -23,7 +26,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" \
-e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
-v /var/run/docker.sock:/var/run/docker.sock \
docker:18.09-dind sh -c '
#!/usr/bin/env sh
Expand Down