Skip to content

Commit e814ca5

Browse files
authored
Added tvos-sim support (#951)
1 parent ab7de26 commit e814ca5

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,42 @@ jobs:
9595
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --release
9696
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --features parallel
9797

98-
# This is separate from the matrix above because there is no prebuilt rust-std component for the target.
98+
# This is separate from the matrix above because there is no prebuilt rust-std component for these targets.
9999
check-tvos:
100-
name: Test aarch64-apple-tvos
101-
runs-on: macos-latest
100+
name: Test build-std
101+
runs-on: ${{ matrix.os }}
102+
strategy:
103+
matrix:
104+
build: [aarch64-tvos, aarch64-tvos-sim, x86_64-tvos]
105+
include:
106+
- build: aarch64-tvos
107+
os: macos-latest
108+
rust: nightly
109+
target: aarch64-apple-tvos
110+
no_run: --no-run
111+
- build: aarch64-tvos-sim
112+
os: macos-latest
113+
rust: nightly
114+
target: aarch64-apple-tvos-sim
115+
no_run: --no-run
116+
- build: x86_64-tvos
117+
os: macos-latest
118+
rust: nightly
119+
target: x86_64-apple-tvos
120+
no_run: --no-run
102121
steps:
103122
- uses: actions/checkout@v4
104123
- name: Install Rust (rustup)
105124
run: |
106125
set -euxo pipefail
107-
rustup toolchain install nightly --no-self-update --profile minimal
108-
rustup component add rust-src --toolchain nightly
109-
rustup default nightly
126+
rustup toolchain install ${{ matrix.rust }} --no-self-update --profile minimal
127+
rustup component add rust-src --toolchain ${{ matrix.rust }}
128+
rustup default ${{ matrix.rust }}
110129
shell: bash
111130
- uses: Swatinem/rust-cache@v2
112-
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos
113-
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --release
114-
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --features parallel
131+
- run: cargo test -Z build-std=std ${{ matrix.no_run }} --workspace --target ${{ matrix.target }}
132+
- run: cargo test -Z build-std=std ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --release
133+
- run: cargo test -Z build-std=std ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --features parallel
115134

116135
cuda:
117136
name: Test CUDA support

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ impl Build {
19291929
.into(),
19301930
);
19311931
}
1932-
} else if target.contains("x86_64-apple-tvos") {
1932+
} else if target.contains("tvos-sim") || target.contains("x86_64-apple-tvos") {
19331933
if let Some(arch) =
19341934
map_darwin_target_from_rust_to_compiler_architecture(target)
19351935
{

0 commit comments

Comments
 (0)