Skip to content

Commit

Permalink
Added tvos-sim support (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEverson authored Feb 20, 2024
1 parent ab7de26 commit e814ca5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
37 changes: 28 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,42 @@ jobs:
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --release
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --features parallel

# This is separate from the matrix above because there is no prebuilt rust-std component for the target.
# This is separate from the matrix above because there is no prebuilt rust-std component for these targets.
check-tvos:
name: Test aarch64-apple-tvos
runs-on: macos-latest
name: Test build-std
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [aarch64-tvos, aarch64-tvos-sim, x86_64-tvos]
include:
- build: aarch64-tvos
os: macos-latest
rust: nightly
target: aarch64-apple-tvos
no_run: --no-run
- build: aarch64-tvos-sim
os: macos-latest
rust: nightly
target: aarch64-apple-tvos-sim
no_run: --no-run
- build: x86_64-tvos
os: macos-latest
rust: nightly
target: x86_64-apple-tvos
no_run: --no-run
steps:
- uses: actions/checkout@v4
- name: Install Rust (rustup)
run: |
set -euxo pipefail
rustup toolchain install nightly --no-self-update --profile minimal
rustup component add rust-src --toolchain nightly
rustup default nightly
rustup toolchain install ${{ matrix.rust }} --no-self-update --profile minimal
rustup component add rust-src --toolchain ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
shell: bash
- uses: Swatinem/rust-cache@v2
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --release
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --features parallel
- run: cargo test -Z build-std=std ${{ matrix.no_run }} --workspace --target ${{ matrix.target }}
- run: cargo test -Z build-std=std ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --release
- run: cargo test -Z build-std=std ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --features parallel

cuda:
name: Test CUDA support
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ impl Build {
.into(),
);
}
} else if target.contains("x86_64-apple-tvos") {
} else if target.contains("tvos-sim") || target.contains("x86_64-apple-tvos") {
if let Some(arch) =
map_darwin_target_from_rust_to_compiler_architecture(target)
{
Expand Down

0 comments on commit e814ca5

Please sign in to comment.