Compare commits

...

9 Commits
v1.1 ... arm64

Author SHA1 Message Date
cc48120b57 Merge branch 'master' into arm64 2022-11-13 08:08:00 -07:00
645e3f7313 Modifying version and readme notes [skip ci] 2022-11-13 08:01:59 -07:00
1ccd12233c Fixing formatting on string arg [skip ci] 2022-11-07 17:16:50 -07:00
750ad4a08c Dedupe IDs [skip ci] 2022-11-07 17:13:28 -07:00
8c3da926c2 Dedupe IDs [skip ci] 2022-11-07 17:05:30 -07:00
e0b9f539d1 Adding arm64 tester [skip ci] 2022-11-07 17:03:36 -07:00
e38c2fa359 modifying tester [skip ci] 2022-11-07 16:55:30 -07:00
1bba226ea3 Adding arm64 detection 2022-11-07 16:54:38 -07:00
0b44c6745b Merge pull request #94 from microsoft/v1.1.3
Fixes #93 [skip ci]
2022-10-12 16:19:33 -07:00
5 changed files with 29 additions and 10 deletions

View File

@ -10,6 +10,14 @@ on:
- dev
paths-ignore:
- '*.md'
workflow_dispatch:
branches:
- dev
- arm64
- master
paths-ignore:
- '*.md'
jobs:
build:
@ -34,16 +42,27 @@ jobs:
PATH: ''
- name: Setup MSBuild (x64)
id: setup_msbuild_path
if: always()
id: setup_msbuild_path_x64
uses: ./
with:
vs-prerelease: true
msbuild-architecture: 'x64'
- name: Setup MSBuild (arm64)
if: always()
id: setup_msbuild_path_arm
uses: ./
with:
vs-prerelease: true
msbuild-architecture: 'arm64'
- name: echo msbuild path
run: |
echo "vswhere-path: ${{ steps.setup_msbuild_explicit.outputs.msbuildPath }}"
echo "PATH: ${{ steps.setup_msbuild_path.outputs.msbuildPath }}"
echo "ARM PATH: ${{ steps.setup_msbuild_path_arm.outputs.msbuildPath }}"
echo "ARM PATH: ${{ steps.setup_msbuild_path_x64.outputs.msbuildPath }}"
echo "Fallback: ${{ steps.setup_msbuild_fallback.outputs.msbuildPath }}"
- name: echo MSBuild

View File

@ -39,7 +39,7 @@ If you need your Actions runner to target a pre-release version of Visual Studio
```
### Specifying MSBuild architecture (optional)
By default the action will use the x86 architecture for MSBuild, but it is possible to target the x64 versions instead. Simply add the `msbuild-architecture` input. Valid input values are `x86` (default) and `x64`.
By default the action will use the x86 architecture for MSBuild, but it is possible to target the x64 versions instead. Simply add the `msbuild-architecture` input. Valid input values are `x86` (default), `x64`, and `arm64`. Note that the success of these will rely on the runner OS.
```yml
- name: Add msbuild to PATH

6
dist/index.js vendored
View File

@ -1701,9 +1701,9 @@ function run() {
stdout: (data) => {
const installationPath = data.toString().trim();
core.debug(`Found installation path: ${installationPath}`);
// x64 only exists in one possible location, so no fallback probing
if (MSBUILD_ARCH === "x64") {
let toolPath = path.join(installationPath, 'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe');
// x64 and arm64 only exist in one possible location, so no fallback probing
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
let toolPath = path.join(installationPath, `MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`);
core.debug(`Checking for path: ${toolPath}`);
if (!fs.existsSync(toolPath)) {
return;

View File

@ -1,6 +1,6 @@
{
"name": "setup-msbuild",
"version": "1.1.3",
"version": "1.2.0",
"private": true,
"description": "Helps set up specific MSBuild tool into PATH for later usage.",
"main": "lib/main.js",

View File

@ -71,12 +71,12 @@ async function run(): Promise<void> {
const installationPath = data.toString().trim()
core.debug(`Found installation path: ${installationPath}`)
// x64 only exists in one possible location, so no fallback probing
if (MSBUILD_ARCH === "x64") {
// x64 and arm64 only exist in one possible location, so no fallback probing
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
let toolPath = path.join(
installationPath,
'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe'
);
`MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`
)
core.debug(`Checking for path: ${toolPath}`)
if (!fs.existsSync(toolPath)) {
return