From 058215518f486983d64f1eded7b481f63ec7fe67 Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Wed, 14 Feb 2024 08:56:13 -0700 Subject: [PATCH 1/7] Updated to use correct simulator setup --- src/lib.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 215e5d932..ab8a7d0ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1927,7 +1927,7 @@ impl Build { .into(), ); } - } else if target.contains("x86_64-apple-tvos") { + } else if target.contains("tvos-sim") { if let Some(arch) = map_darwin_target_from_rust_to_compiler_architecture(target) { @@ -1946,21 +1946,6 @@ impl Build { .into(), ); } - } else if target.contains("aarch64-apple-tvos") { - if let Some(arch) = - map_darwin_target_from_rust_to_compiler_architecture(target) - { - let sdk_details = - apple_os_sdk_parts(AppleOs::TvOs, &AppleArchSpec::Device("")); - let deployment_target = self.apple_deployment_version( - AppleOs::TvOs, - None, - &sdk_details.sdk, - ); - cmd.args.push( - format!("--target={}-apple-tvos{}", arch, deployment_target).into(), - ); - } } else if target.starts_with("riscv64gc-") { cmd.args.push( format!("--target={}", target.replace("riscv64gc", "riscv64")).into(), From f3b1afdb1c182f0c16b11c08d55a398cca552d7a Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Wed, 14 Feb 2024 09:06:43 -0700 Subject: [PATCH 2/7] added back x86_64 a sim --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ab8a7d0ee..a35779e17 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1927,7 +1927,7 @@ impl Build { .into(), ); } - } else if target.contains("tvos-sim") { + } 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) { From e4c1f51cd96dc1c339f063c1d5667dd16eb65084 Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Fri, 16 Feb 2024 13:46:13 -0700 Subject: [PATCH 3/7] Added tvOS sim test --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3695332f8..8ce9f5b23 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,6 +113,24 @@ jobs: - 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 + # This is separate from the matrix above because there is no prebuilt rust-std component for the target. + check-tvos-sim: + name: Test aarch64-apple-tvos-sim + runs-on: macos-latest + 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 + shell: bash + - uses: Swatinem/rust-cache@v2 + - run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos-sim + - run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos-sim --release + - run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos-sim --features parallel + cuda: name: Test CUDA support runs-on: ubuntu-20.04 From 32650dcf5726da0fac058f2defef3fbef3752912 Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Fri, 16 Feb 2024 13:58:29 -0700 Subject: [PATCH 4/7] fixed format issue --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 91cf8c96f..96cf96d33 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1929,7 +1929,7 @@ impl Build { .into(), ); } - } else if target.contains("tvos-sim") || 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) { From 0c4695a45319da0c8b818ec3c4360b1b79f7b544 Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Tue, 20 Feb 2024 07:19:19 -0700 Subject: [PATCH 5/7] Added back tvOS condition --- src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 96cf96d33..edb941b25 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1948,6 +1948,21 @@ impl Build { .into(), ); } + } else if target.contains("aarch64-apple-tvos") { + if let Some(arch) = + map_darwin_target_from_rust_to_compiler_architecture(target) + { + let sdk_details = + apple_os_sdk_parts(AppleOs::TvOs, &AppleArchSpec::Device("")); + let deployment_target = self.apple_deployment_version( + AppleOs::TvOs, + None, + &sdk_details.sdk, + ); + cmd.args.push( + format!("--target={}-apple-tvos{}", arch, deployment_target).into(), + ); + } } else if target.starts_with("riscv64gc-") { cmd.args.push( format!("--target={}", target.replace("riscv64gc", "riscv64")).into(), From bb6a04e859c141d96846bd02921c16bbf9b1dd4d Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Tue, 20 Feb 2024 07:42:29 -0700 Subject: [PATCH 6/7] updated CI to have matrix for all -Z build-std targets --- .github/workflows/main.yml | 55 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ce9f5b23..7961613a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,41 +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 - 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 - 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 - - # This is separate from the matrix above because there is no prebuilt rust-std component for the target. - check-tvos-sim: - name: Test aarch64-apple-tvos-sim - runs-on: macos-latest + name: Test build-std + runs-on: ${{ matrix.os }} + strategy: + matrix: + build: [nightly, macos, aarch64-macos] + include: + - build: aarch64-tvos + os: macos-latest + rust: nightly + target: aarch64-apple-tvos + no_run: --no-run + - build: aarch64-ios + 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-sim - - run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos-sim --release - - run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos-sim --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 From 294040a85f2259a5114d8d25f9f7033e62c1147f Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Tue, 20 Feb 2024 07:51:45 -0700 Subject: [PATCH 7/7] fixing issue with ci build --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7961613a9..653c6d12a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,14 +101,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: [nightly, macos, aarch64-macos] + 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-ios + - build: aarch64-tvos-sim os: macos-latest rust: nightly target: aarch64-apple-tvos-sim