From 4c5ffc772320847cca413cd02f888c5bb2d07c53 Mon Sep 17 00:00:00 2001 From: ilammy Date: Thu, 30 Dec 2021 20:03:28 +0900 Subject: [PATCH] ci: Don't run tests when targeting iOS Even if "cargo test --target ${arch}-apple-ios" cross-compiles tests, it's not possible to actually run them on the host macOS, as that's a different execution environment. Although, I guess, we could try only building tests with "--no-run", GitHub Actions do not make it easy to construct command lines based on matrix parameters. Thus it's easier to disable these steps, and the following commit adds a "--no-run" step with "--target". --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1af234c7..e97239ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,11 +152,11 @@ jobs: - name: Set LIBCLANG_PATH if: startsWith(matrix.os, 'windows') run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - - if: startsWith(matrix.os, 'windows') + - if: "startsWith(matrix.os, 'windows') && !contains(matrix.target, 'ios')" # CI's Windows doesn't have require root certs run: cargo test --workspace --exclude tokio-boring --exclude hyper-boring name: Run tests (Windows) - - if: "!startsWith(matrix.os, 'windows')" + - if: "!startsWith(matrix.os, 'windows') && !contains(matrix.target, 'ios')" run: cargo test name: Run tests (not Windows)