From 309c4736ad1052f815d9dad9240d10516f7dc2d9 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 7 Mar 2024 15:28:47 +0000 Subject: [PATCH] Disable cross on x86_64 targets --- .github/workflows/rust.yml | 2 -- ci/run.sh | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 80e3fba8a..197c2f3fc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,8 +43,6 @@ jobs: - env: TARGET: ${{ matrix.target }} CHANNEL: ${{ matrix.channel }} - CROSS: ${{ matrix.target != 'x86_64-unknown-linux-gnu' && '1' || '0' }} - NO_STD: ${{ matrix.target == 'thumbv6m-none-eabi' && '1' || '0' }} run: sh ci/run.sh strategy: matrix: diff --git a/ci/run.sh b/ci/run.sh index d5fd72b21..a55fa5cec 100644 --- a/ci/run.sh +++ b/ci/run.sh @@ -4,6 +4,21 @@ set -ex : "${TARGET?The TARGET environment variable must be set.}" +case "${TARGET}" in + x86_64-unknown-linux-gnu|x86_64-apple-darwin|x86_64-pc-windows-msvc) + CROSS=0 + NO_STD=0 + ;; + thumbv6m-none-eabi) + CROSS=1 + NO_STD=1 + ;; + *) + CROSS=1 + NO_STD=0 + ;; +esac + CARGO=cargo if [ "${CROSS}" = "1" ]; then export CARGO_NET_RETRY=5