mirror of
https://github.com/microsoft/setup-msbuild.git
synced 2024-11-10 05:51:07 +07:00
Adding arm64 detection
This commit is contained in:
parent
0b44c6745b
commit
1bba226ea3
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -40,10 +40,18 @@ jobs:
|
|||||||
vs-prerelease: true
|
vs-prerelease: true
|
||||||
msbuild-architecture: 'x64'
|
msbuild-architecture: 'x64'
|
||||||
|
|
||||||
|
- name: Setup MSBuild (arm64)
|
||||||
|
id: setup_msbuild_path_arm
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
vs-prerelease: true
|
||||||
|
msbuild-architecture: 'arm64'
|
||||||
|
|
||||||
- name: echo msbuild path
|
- name: echo msbuild path
|
||||||
run: |
|
run: |
|
||||||
echo "vswhere-path: ${{ steps.setup_msbuild_explicit.outputs.msbuildPath }}"
|
echo "vswhere-path: ${{ steps.setup_msbuild_explicit.outputs.msbuildPath }}"
|
||||||
echo "PATH: ${{ steps.setup_msbuild_path.outputs.msbuildPath }}"
|
echo "PATH: ${{ steps.setup_msbuild_path.outputs.msbuildPath }}"
|
||||||
|
echo "ARM PATH: ${{ steps.setup_msbuild_path_arm.outputs.msbuildPath }}"
|
||||||
echo "Fallback: ${{ steps.setup_msbuild_fallback.outputs.msbuildPath }}"
|
echo "Fallback: ${{ steps.setup_msbuild_fallback.outputs.msbuildPath }}"
|
||||||
|
|
||||||
- name: echo MSBuild
|
- name: echo MSBuild
|
||||||
|
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -1701,9 +1701,9 @@ function run() {
|
|||||||
stdout: (data) => {
|
stdout: (data) => {
|
||||||
const installationPath = data.toString().trim();
|
const installationPath = data.toString().trim();
|
||||||
core.debug(`Found installation path: ${installationPath}`);
|
core.debug(`Found installation path: ${installationPath}`);
|
||||||
// x64 only exists in one possible location, so no fallback probing
|
// x64 and arm64 only exist in one possible location, so no fallback probing
|
||||||
if (MSBUILD_ARCH === "x64") {
|
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
|
||||||
let toolPath = path.join(installationPath, 'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe');
|
let toolPath = path.join(installationPath, 'MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe');
|
||||||
core.debug(`Checking for path: ${toolPath}`);
|
core.debug(`Checking for path: ${toolPath}`);
|
||||||
if (!fs.existsSync(toolPath)) {
|
if (!fs.existsSync(toolPath)) {
|
||||||
return;
|
return;
|
||||||
|
@ -71,12 +71,12 @@ async function run(): Promise<void> {
|
|||||||
const installationPath = data.toString().trim()
|
const installationPath = data.toString().trim()
|
||||||
core.debug(`Found installation path: ${installationPath}`)
|
core.debug(`Found installation path: ${installationPath}`)
|
||||||
|
|
||||||
// x64 only exists in one possible location, so no fallback probing
|
// x64 and arm64 only exist in one possible location, so no fallback probing
|
||||||
if (MSBUILD_ARCH === "x64") {
|
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
|
||||||
let toolPath = path.join(
|
let toolPath = path.join(
|
||||||
installationPath,
|
installationPath,
|
||||||
'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe'
|
'MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe'
|
||||||
);
|
)
|
||||||
core.debug(`Checking for path: ${toolPath}`)
|
core.debug(`Checking for path: ${toolPath}`)
|
||||||
if (!fs.existsSync(toolPath)) {
|
if (!fs.existsSync(toolPath)) {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user