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".
This commit is contained in:
ilammy 2021-12-30 20:03:28 +09:00 committed by Joshua Nelson
parent 76ba5429d7
commit 4c5ffc7723
1 changed files with 2 additions and 2 deletions

View File

@ -152,11 +152,11 @@ jobs:
- name: Set LIBCLANG_PATH - name: Set LIBCLANG_PATH
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV 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 # CI's Windows doesn't have require root certs
run: cargo test --workspace --exclude tokio-boring --exclude hyper-boring run: cargo test --workspace --exclude tokio-boring --exclude hyper-boring
name: Run tests (Windows) name: Run tests (Windows)
- if: "!startsWith(matrix.os, 'windows')" - if: "!startsWith(matrix.os, 'windows') && !contains(matrix.target, 'ios')"
run: cargo test run: cargo test
name: Run tests (not Windows) name: Run tests (not Windows)