From 561dce772fed55a73f474b2e3f79c43981ea084f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 24 Feb 2025 10:57:57 +0100 Subject: [PATCH] sanity-check for HOST_TARGET --- src/tools/miri/ci/ci.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index 5583030b490a..3327ad17c44e 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -euo pipefail +set -eu function begingroup { echo "::group::$@" @@ -11,6 +11,17 @@ function endgroup { echo "::endgroup" } +begingroup "Sanity-check environment" + +# Ensure the HOST_TARGET is what it should be. +if ! rustc -vV | grep -q "^host: $HOST_TARGET\$"; then + echo "This runner should be using host target $HOST_TARGET but rustc disagrees:" + rustc -vV + exit 1 +fi + +endgroup + begingroup "Building Miri" # Global configuration