summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraidanfnv <aidanf@nvidia.com>2025-10-01 15:58:40 -0700
committerGitHub <noreply@github.com>2025-10-01 22:58:40 +0000
commitfa16aa3e93cdbca2301eceb6e47d23036315002f (patch)
tree206e483327932aa361cfccd01f1145229641dcab
parentcd7da79f50f2b8fb9bca797131585ff1b85698f6 (diff)
Re-add macOS cross-compile setup to release workflow (#8583)
For #8564 Similar to #8580, this re-adds the cross-compile target setup step for macOS releases that was erroneously removed in https://github.com/shader-slang/slang/pull/8470, which made x86_64 releases build aarch64 binaries. It also simplifies the workflow logic a bit by adding a separate `arch` variable to the release matrix, which refers to the target architecture in the manner that the setup requires, so that we do not have to replace the string `"aarch64"` with `"arm64"` in setting `CMAKE_OSX_ARCHITECTURES` for native aarch64 macOS builds and do not have to conditionally set the MSVC `arch` to `amd64_arm64` for Windows cross-compilation. --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
-rw-r--r--.github/workflows/release.yml47
1 files changed, 42 insertions, 5 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7ac61be65..9218408df 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -40,15 +40,47 @@ jobs:
}
- {
os: windows,
+ platform: x86_64,
+ arch: amd64,
runs-on: ["Windows", "self-hosted", "GCP-T4"],
compiler: cl,
}
- - { os: macos, runs-on: macos-latest, compiler: clang }
+ - {
+ os: windows,
+ platform: aarch64,
+ arch: amd64_arm64,
+ runs-on: ["Windows", "self-hosted", "GCP-T4"],
+ compiler: cl,
+ }
+ - {
+ os: macos,
+ platform: x86_64,
+ arch: x86_64,
+ runs-on: macos-latest,
+ compiler: clang,
+ }
+ - {
+ os: macos,
+ platform: aarch64,
+ arch: arm64,
+ runs-on: macos-latest,
+ compiler: clang,
+ }
- { build-slang-llvm: false }
- { os: linux, platform: x86_64, build-slang-llvm: true }
- - { os: windows, platform: x86_64, build-slang-llvm: true }
- - { os: macos, platform: aarch64, build-slang-llvm: true }
+ - {
+ os: windows,
+ platform: x86_64,
+ arch: amd64,
+ build-slang-llvm: true,
+ }
+ - {
+ os: macos,
+ platform: aarch64,
+ arch: arm64,
+ build-slang-llvm: true,
+ }
fail-fast: false
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.image || '' }}
@@ -78,11 +110,16 @@ jobs:
mkdir build-platform-generators
cmake --install build --config Release --component generators --prefix build-platform-generators
- - name: Setup Windows dev tools for host and target architecture
+ - name: Setup Windows dev tools for target architecture
if: matrix.os == 'windows'
uses: ilammy/msvc-dev-cmd@v1
with:
- arch: ${{ matrix.platform == 'aarch64' && 'amd64_arm64' || 'amd64' }}
+ arch: ${{ matrix.arch }}
+
+ - name: Setup macOS dev tools for target architecture
+ if: matrix.os == 'macos'
+ run: |
+ echo "CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}" >> "$GITHUB_ENV"
- name: Build Slang
run: |