Skip to content

Commit 66c0633

Browse files
Merge #926
926: fix for real r=Alexhuszagh a=Emilgardis - make env var uppercase Co-authored-by: Emil Gardström <[email protected]>
2 parents 3d6a52a + ac862da commit 66c0633

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ jobs:
307307
run: ./ci/test-cross-image.sh
308308
env:
309309
TARGET: 'aarch64-unknown-linux-gnu'
310-
IMAGE: 'ghcr.io/cross-rs/cross/aarch64-unknown-linux-gnu:main'
310+
IMAGE: 'ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main'
311311
shell: bash
312312

313313
- name: Login to GitHub Container Registry
@@ -389,7 +389,7 @@ jobs:
389389
- name: Run Docker-in-Docker Test
390390
env:
391391
TARGET: aarch64-unknown-linux-gnu
392-
IMAGE: 'ghcr.io/cross-rs/cross/aarch64-unknown-linux-gnu:main'
392+
IMAGE: 'ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main'
393393
run: ./ci/test-docker-in-docker.sh
394394
shell: bash
395395

ci/test-cross-image.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ set -eo pipefail
77
if [[ -z "${TARGET}" ]]; then
88
export TARGET="aarch64-unknown-linux-gnu"
99
fi
10+
# ^^subst is not supported on macOS bash (bash <4)
11+
# shellcheck disable=SC2155
12+
export TARGET_UPPER=$(echo "$TARGET" | awk '{print toupper($0)}')
1013

1114
if [[ "${IMAGE}" ]]; then
1215
# shellcheck disable=SC2140
13-
export "CROSS_TARGET_${TARGET//-/_}_IMAGE"="${IMAGE}"
16+
export "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE"="${IMAGE}"
1417
fi
1518

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

2124
main() {
2225

23-
docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \
26+
docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
2427
-v /var/run/docker.sock:/var/run/docker.sock \
2528
"${CROSS_TARGET_CROSS_IMAGE}" sh -c '
2629
#!/usr/bin/env sh

ci/test-docker-in-docker.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ set -eo pipefail
99
if [[ -z "${TARGET}" ]]; then
1010
export TARGET="aarch64-unknown-linux-gnu"
1111
fi
12+
# ^^subst is not supported on macOS bash (bash <4)
13+
# shellcheck disable=SC2155
14+
export TARGET_UPPER=$(echo "$TARGET" | awk '{print toupper($0)}')
1215

1316
if [[ "${IMAGE}" ]]; then
1417
# shellcheck disable=SC2140
15-
export "CROSS_TARGET_${TARGET//-/_}_IMAGE"="${IMAGE}"
18+
export "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE"="${IMAGE}"
1619
fi
1720

1821
source=$(dirname "${BASH_SOURCE[0]}")
@@ -23,7 +26,7 @@ main() {
2326
docker run -v "${home}":"${home}" -w "${home}" \
2427
--rm -e TARGET -e RUSTFLAGS -e RUST_TEST_THREADS \
2528
-e LLVM_PROFILE_FILE -e CARGO_INCREMENTAL \
26-
-e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \
29+
-e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
2730
-v /var/run/docker.sock:/var/run/docker.sock \
2831
docker:18.09-dind sh -c '
2932
#!/usr/bin/env sh

0 commit comments

Comments
 (0)