Skip to content

Commit fa16aa3

Browse files
aidanfnvslangbot
andauthored
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 #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>
1 parent cd7da79 commit fa16aa3

1 file changed

Lines changed: 42 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,47 @@ jobs:
4040
}
4141
- {
4242
os: windows,
43+
platform: x86_64,
44+
arch: amd64,
4345
runs-on: ["Windows", "self-hosted", "GCP-T4"],
4446
compiler: cl,
4547
}
46-
- { os: macos, runs-on: macos-latest, compiler: clang }
48+
- {
49+
os: windows,
50+
platform: aarch64,
51+
arch: amd64_arm64,
52+
runs-on: ["Windows", "self-hosted", "GCP-T4"],
53+
compiler: cl,
54+
}
55+
- {
56+
os: macos,
57+
platform: x86_64,
58+
arch: x86_64,
59+
runs-on: macos-latest,
60+
compiler: clang,
61+
}
62+
- {
63+
os: macos,
64+
platform: aarch64,
65+
arch: arm64,
66+
runs-on: macos-latest,
67+
compiler: clang,
68+
}
4769

4870
- { build-slang-llvm: false }
4971
- { os: linux, platform: x86_64, build-slang-llvm: true }
50-
- { os: windows, platform: x86_64, build-slang-llvm: true }
51-
- { os: macos, platform: aarch64, build-slang-llvm: true }
72+
- {
73+
os: windows,
74+
platform: x86_64,
75+
arch: amd64,
76+
build-slang-llvm: true,
77+
}
78+
- {
79+
os: macos,
80+
platform: aarch64,
81+
arch: arm64,
82+
build-slang-llvm: true,
83+
}
5284
fail-fast: false
5385
runs-on: ${{ matrix.runs-on }}
5486
container: ${{ matrix.image || '' }}
@@ -78,11 +110,16 @@ jobs:
78110
mkdir build-platform-generators
79111
cmake --install build --config Release --component generators --prefix build-platform-generators
80112
81-
- name: Setup Windows dev tools for host and target architecture
113+
- name: Setup Windows dev tools for target architecture
82114
if: matrix.os == 'windows'
83115
uses: ilammy/msvc-dev-cmd@v1
84116
with:
85-
arch: ${{ matrix.platform == 'aarch64' && 'amd64_arm64' || 'amd64' }}
117+
arch: ${{ matrix.arch }}
118+
119+
- name: Setup macOS dev tools for target architecture
120+
if: matrix.os == 'macos'
121+
run: |
122+
echo "CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}" >> "$GITHUB_ENV"
86123
87124
- name: Build Slang
88125
run: |

0 commit comments

Comments
 (0)