From 980ab698a1c61540db1175b3b9ee439b211f620d Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Thu, 24 Oct 2024 17:17:10 +0530 Subject: [PATCH 01/26] [Agent] Support for Windows ARM-64 --- .azure-pipelines/pipeline.yml | 23 +++++++++++++++++++++++ README.md | 2 ++ assets.json | 6 ++++++ releaseNote.md | 9 +++++++++ src/Common.props | 4 ++++ src/Misc/InstallAgentPackage.template.xml | 10 ++++++++++ src/Misc/Publish.template.ps1 | 4 ++++ src/Misc/UpdateAgentPackage.template.xml | 10 ++++++++++ src/Test/L0/ConstantGenerationL0.cs | 1 + src/dev.sh | 3 ++- src/dir.proj | 10 +++++----- 11 files changed, 76 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/pipeline.yml b/.azure-pipelines/pipeline.yml index cdb2d004ce..a02718a345 100644 --- a/.azure-pipelines/pipeline.yml +++ b/.azure-pipelines/pipeline.yml @@ -42,6 +42,9 @@ parameters: - name: win_x86 type: boolean default: true +- name: win_arm64 + type: boolean + default: true - name: linux_x64 type: boolean default: true @@ -182,6 +185,26 @@ extends: publishArtifacts: ${{ parameters.publishArtifacts }} buildAlternatePackage: ${{ parameters.buildAlternatePackage }} targetFramework: ${{ parameters.targetFramework }} + + # Windows (ARM) + - ${{ if parameters.win_arm64 }}: + - template: /.azure-pipelines/build-jobs.yml@self + parameters: + jobName: build_windows_arm64 + displayName: Windows (ARM64) + pool: + name: 1ES-ABTT-Shared-ARM-64-Pool + image: abtt-windows-2022_arm64 + os: windows + os: win + arch: x64 + branch: ${{ parameters.branch }} + unitTests: ${{ parameters.test }} + functionalTests: ${{ parameters.test }} + sign: ${{ parameters.sign }} + publishArtifacts: ${{ parameters.publishArtifacts }} + buildAlternatePackage: ${{ parameters.buildAlternatePackage }} + targetFramework: ${{ parameters.targetFramework }} # Linux (x64) - ${{ if parameters.linux_x64 }}: diff --git a/README.md b/README.md index be37a52a33..9caee7bf6c 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Written for .NET Core in C#. |---|:-----:| |![Win-x64](docs/res/win_med.png) **Windows x64**|[![Build & Test][win-x64-build-badge]][build]| |![Win-x86](docs/res/win_med.png) **Windows x86**|[![Build & Test][win-x86-build-badge]][build]| +|![Win-arm64](docs/res/win_med.png) **Windows ARM64**|[![Build & Test][win-arm64-build-badge]][build]| |![macOS](docs/res/apple_med.png) **macOS**|[![Build & Test][macOS-build-badge]][build]| |![Linux-x64](docs/res/linux_med.png) **Linux x64**|[![Build & Test][linux-x64-build-badge]][build]| |![Linux-arm](docs/res/linux_med.png) **Linux ARM**|[![Build & Test][linux-arm-build-badge]][build]| @@ -27,6 +28,7 @@ Written for .NET Core in C#. [win-x64-build-badge]: https://mseng.visualstudio.com/pipelinetools/_apis/build/status/VSTS.Agent/azure-pipelines-agent.ci?branchName=master&jobname=Windows%20(x64) [win-x86-build-badge]: https://mseng.visualstudio.com/pipelinetools/_apis/build/status/VSTS.Agent/azure-pipelines-agent.ci?branchName=master&jobname=Windows%20(x86) +[win-arm64-build-badge]: https://mseng.visualstudio.com/pipelinetools/_apis/build/status/VSTS.Agent/azure-pipelines-agent.ci?branchName=master&jobname=Windows%20(arm64) [macOS-build-badge]: https://mseng.visualstudio.com/pipelinetools/_apis/build/status/VSTS.Agent/azure-pipelines-agent.ci?branchName=master&jobname=macOS%20(x64) [linux-x64-build-badge]: https://mseng.visualstudio.com/pipelinetools/_apis/build/status/VSTS.Agent/azure-pipelines-agent.ci?branchName=master&jobname=Linux%20(x64) [linux-arm-build-badge]: https://mseng.visualstudio.com/pipelinetools/_apis/build/status/VSTS.Agent/azure-pipelines-agent.ci?branchName=master&jobname=Linux%20(ARM) diff --git a/assets.json b/assets.json index de0750d57f..7b33ab6e69 100644 --- a/assets.json +++ b/assets.json @@ -23,6 +23,12 @@ "version": "", "downloadUrl": "https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x86-.zip" }, + { + "name": "pipelines-agent-win-arm64-.zip", + "platform": "win-arm64", + "version": "", + "downloadUrl": "https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-arm64-.zip" + }, { "name": "vsts-agent-osx-x64-.tar.gz", "platform": "osx-x64", diff --git a/releaseNote.md b/releaseNote.md index 49ef82ef32..0108c6cc8f 100644 --- a/releaseNote.md +++ b/releaseNote.md @@ -5,6 +5,7 @@ | -------------- | ------- | ------- | | Windows x64 | [vsts-agent-win-x64-.zip](https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-x64-.zip) | | | Windows x86 | [vsts-agent-win-x86-.zip](https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-x86-.zip) | | +| Windows ARM64 | [vsts-agent-win-arm64-.zip](https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-arm64-.zip) | | | macOS x64 | [vsts-agent-osx-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-osx-x64-.tar.gz) | | | macOS ARM64 | [vsts-agent-osx-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-osx-arm64-.tar.gz) | | | Linux x64 | [vsts-agent-linux-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-linux-x64-.tar.gz) | | @@ -29,6 +30,13 @@ C:\> mkdir myagent && cd myagent C:\myagent> Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$HOME\Downloads\vsts-agent-win-x86-.zip", "$PWD") ``` +## Windows ARM64 + +``` bash +C:\> mkdir myagent && cd myagent +C:\myagent> Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$HOME\Downloads\vsts-agent-win-arm64-.zip", "$PWD") +``` + ## macOS x64 ``` bash @@ -91,6 +99,7 @@ See [notes](docs/node6.md) on Node version support for more details. | ----------- | ------- | ------- | | Windows x64 | [pipelines-agent-win-x64-.zip](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x64-.zip) | | | Windows x86 | [pipelines-agent-win-x86-.zip](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x86-.zip) | | +| Windows ARM64 | [pipelines-agent-win-arm64-.zip](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-arm64-.zip) | | | macOS x64 | [pipelines-agent-osx-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-osx-x64-.tar.gz) | | | macOS ARM64 | [pipelines-agent-osx-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-osx-arm64-.tar.gz) | | | Linux x64 | [pipelines-agent-linux-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-linux-x64-.tar.gz) | | diff --git a/src/Common.props b/src/Common.props index 8b1b645a91..d3fbcb13ae 100644 --- a/src/Common.props +++ b/src/Common.props @@ -38,6 +38,9 @@ X86 + + X64 + X64 @@ -65,6 +68,7 @@ win-x64 win-x86 + win-arm64 diff --git a/src/Misc/InstallAgentPackage.template.xml b/src/Misc/InstallAgentPackage.template.xml index 4c60a4f9bf..1581c8bae8 100644 --- a/src/Misc/InstallAgentPackage.template.xml +++ b/src/Misc/InstallAgentPackage.template.xml @@ -73,6 +73,16 @@ + + + + + + + + + + diff --git a/src/Misc/Publish.template.ps1 b/src/Misc/Publish.template.ps1 index 5d71b86336..64caf44c99 100644 --- a/src/Misc/Publish.template.ps1 +++ b/src/Misc/Publish.template.ps1 @@ -8,6 +8,8 @@ if ($pwd -notlike '*tfsgheus20') { Add-DistributedTaskPackage -PackageType agent -Platform win-x86 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-x86-.zip -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename vsts-agent-win-x86-.zip + Add-DistributedTaskPackage -PackageType agent -Platform win-arm64 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-arm64-.zip -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename vsts-agent-win-arm64-.zip + Add-DistributedTaskPackage -PackageType agent -Platform osx-x64 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//vsts-agent-osx-x64-.tar.gz -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename vsts-agent-osx-x64-.tar.gz Add-DistributedTaskPackage -PackageType agent -Platform linux-x64 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//vsts-agent-linux-x64-.tar.gz -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename vsts-agent-linux-x64-.tar.gz @@ -28,6 +30,8 @@ if ($pwd -notlike '*tfsgheus20') { Add-DistributedTaskPackage -PackageType pipelines-agent -Platform win-x86 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x86-.zip -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename pipelines-agent-win-x86-.zip + Add-DistributedTaskPackage -PackageType pipelines-agent -Platform win-arm64 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-arm64-.zip -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename pipelines-agent-win-arm64-.zip + Add-DistributedTaskPackage -PackageType pipelines-agent -Platform osx-x64 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//pipelines-agent-osx-x64-.tar.gz -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename pipelines-agent-osx-x64-.tar.gz Add-DistributedTaskPackage -PackageType pipelines-agent -Platform linux-x64 -Version -DownloadUrl https://vstsagentpackage.azureedge.net/agent//pipelines-agent-linux-x64-.tar.gz -HashValue -InfoUrl https://go.microsoft.com/fwlink/?LinkId=798199 -Filename pipelines-agent-linux-x64-.tar.gz diff --git a/src/Misc/UpdateAgentPackage.template.xml b/src/Misc/UpdateAgentPackage.template.xml index 571c07e99b..108af9ec1f 100644 --- a/src/Misc/UpdateAgentPackage.template.xml +++ b/src/Misc/UpdateAgentPackage.template.xml @@ -42,6 +42,11 @@ + + + + + @@ -77,5 +82,10 @@ + + + + + diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs index 64d2f3a085..9d46b838b1 100644 --- a/src/Test/L0/ConstantGenerationL0.cs +++ b/src/Test/L0/ConstantGenerationL0.cs @@ -17,6 +17,7 @@ public void BuildConstantGenerateSucceed() { "win-x64", "win-x86", + "win-arm64", "linux-x64", "linux-arm", "linux-arm64", diff --git a/src/dev.sh b/src/dev.sh index d292ac5106..c41dbc496c 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -118,7 +118,8 @@ function detect_platform_and_runtime_id() { DETECTED_RUNTIME_ID='win-x64' if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then DETECTED_RUNTIME_ID='win-x86' - fi + elif [[ "$PROCESSOR_ARCHITECTURE" == 'ARM64' ]]; then + DETECTED_RUNTIME_ID='win-arm64' elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then DETECTED_RUNTIME_ID="linux-x64" if command -v uname >/dev/null; then diff --git a/src/dir.proj b/src/dir.proj index af6cfc142b..af4987bece 100644 --- a/src/dir.proj +++ b/src/dir.proj @@ -74,7 +74,7 @@ SkipNonExistentProjects="false" StopOnFirstFailure="true" Properties="Configuration=$(BUILDCONFIG);PackageRuntime=$(PackageRuntime);Version=$(AgentVersion);RuntimeIdentifier=$(PackageRuntime);PublishDir=$(LayoutRoot)/bin;TreatWarningsAsErrors=$(TreatWarningsAsErrors)" /> - + @@ -110,10 +110,10 @@ - - - - + + + + From de59d5dd2a3d1d73483e79034fed2133b3d5ff6f Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Thu, 24 Oct 2024 17:30:51 +0530 Subject: [PATCH 02/26] Fixed syntax error in dev.sh script --- src/dev.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dev.sh b/src/dev.sh index c41dbc496c..6171adae19 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -120,6 +120,7 @@ function detect_platform_and_runtime_id() { DETECTED_RUNTIME_ID='win-x86' elif [[ "$PROCESSOR_ARCHITECTURE" == 'ARM64' ]]; then DETECTED_RUNTIME_ID='win-arm64' + if elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then DETECTED_RUNTIME_ID="linux-x64" if command -v uname >/dev/null; then From f51ada3a8baf113d987d5e5422bdafc65a91d362 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Thu, 24 Oct 2024 17:38:47 +0530 Subject: [PATCH 03/26] Fixed syntax error in dev.sh script --- src/dev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev.sh b/src/dev.sh index 6171adae19..10b183194b 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -120,7 +120,7 @@ function detect_platform_and_runtime_id() { DETECTED_RUNTIME_ID='win-x86' elif [[ "$PROCESSOR_ARCHITECTURE" == 'ARM64' ]]; then DETECTED_RUNTIME_ID='win-arm64' - if + fi elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then DETECTED_RUNTIME_ID="linux-x64" if command -v uname >/dev/null; then From acfe1e0232e11ec35f9c2afd9509b878d4d272d0 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 30 Oct 2024 16:44:38 +0530 Subject: [PATCH 04/26] Added Arch Echo --- src/dev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev.sh b/src/dev.sh index 10b183194b..49f61d701a 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -113,7 +113,7 @@ function detect_platform_and_runtime_id() { if [[ ($(uname) == "Linux") || ($(uname) == "Darwin") ]]; then CURRENT_PLATFORM=$(uname | awk '{print tolower($0)}') fi - + echo "ARCH ###: $PROCESSOR_ARCHITECTURE" if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then DETECTED_RUNTIME_ID='win-x64' if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then From 2167bccef94d656d58c7733177eece0cc94a6164 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 30 Oct 2024 16:53:28 +0530 Subject: [PATCH 05/26] Added AMD64 Check --- src/Common.props | 5 +++-- src/dev.sh | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Common.props b/src/Common.props index d3fbcb13ae..65272f7b98 100644 --- a/src/Common.props +++ b/src/Common.props @@ -33,13 +33,13 @@ - X64 + ARM64 X86 - X64 + ARM64 @@ -69,6 +69,7 @@ win-x64 win-x86 win-arm64 + win-arm64 diff --git a/src/dev.sh b/src/dev.sh index 49f61d701a..70dd3a4768 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -113,13 +113,16 @@ function detect_platform_and_runtime_id() { if [[ ($(uname) == "Linux") || ($(uname) == "Darwin") ]]; then CURRENT_PLATFORM=$(uname | awk '{print tolower($0)}') fi - echo "ARCH ###: $PROCESSOR_ARCHITECTURE" + + echo "Detected Process Arch: $PROCESSOR_ARCHITECTURE" if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then DETECTED_RUNTIME_ID='win-x64' if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then DETECTED_RUNTIME_ID='win-x86' elif [[ "$PROCESSOR_ARCHITECTURE" == 'ARM64' ]]; then DETECTED_RUNTIME_ID='win-arm64' + elif [[ "$PROCESSOR_ARCHITECTURE" == 'AMD64' ]]; then + DETECTED_RUNTIME_ID='win-arm64' fi elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then DETECTED_RUNTIME_ID="linux-x64" From 497b90d37bd8da3ef59ca88783865d656e8d5541 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 30 Oct 2024 16:54:59 +0530 Subject: [PATCH 06/26] Added win-arm64 to _VALID_RIDS --- src/dev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev.sh b/src/dev.sh index 70dd3a4768..6a0b6b3946 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -375,7 +375,7 @@ else RUNTIME_ID=$DETECTED_RUNTIME_ID fi -_VALID_RIDS='linux-x64:linux-arm:linux-arm64:linux-musl-x64:linux-musl-arm64:osx-x64:osx-arm64:win-x64:win-x86' +_VALID_RIDS='linux-x64:linux-arm:linux-arm64:linux-musl-x64:linux-musl-arm64:osx-x64:osx-arm64:win-x64:win-x86:win-arm64' if [[ ":$_VALID_RIDS:" != *:$RUNTIME_ID:* ]]; then failed "must specify a valid target runtime ID (one of: $_VALID_RIDS)" fi From 6ca38addf615442f5a1bc4f258847cffed9df87a Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 30 Oct 2024 17:00:02 +0530 Subject: [PATCH 07/26] Added win-arm64 to tool installer --- src/Misc/externals.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 01c984ff77..da362ad80d 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -154,12 +154,12 @@ function acquireExternalTool() { fi fi } - -if [[ "$PACKAGERUNTIME" == "win-x"* ]]; then +# TODO: Check external tools for ARM-64 +if [[ "$PACKAGERUNTIME" == "win-x"* || "$PACKAGERUNTIME" == "win-arm64" ]]; then # Download external tools for Windows. BIT="32" - if [[ "$PACKAGERUNTIME" == "win-x64" ]]; then + if [[ "$PACKAGERUNTIME" == "win-x64" || "$PACKAGERUNTIME" == "win-arm64" ]]; then BIT="64" acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy From 5fc891fc23893023fa63227649cad01ba51f1ee8 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Thu, 7 Nov 2024 14:27:09 +0530 Subject: [PATCH 08/26] Fixed Dependencies --- src/Misc/externals.sh | 55 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index da362ad80d..5e6dae20d8 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -10,14 +10,22 @@ INCLUDE_NODE10=${INCLUDE_NODE10:-true} CONTAINER_URL=https://vstsagenttools.blob.core.windows.net/tools NODE_URL=https://nodejs.org/dist +NODE_UNOFFICIAL_URL=https://unofficial-builds.nodejs.org/download/release + if [[ "$PACKAGERUNTIME" == "linux-musl-x64" ]]; then NODE_URL=https://unofficial-builds.nodejs.org/download/release INCLUDE_NODE6=false fi +if [[ "$PACKAGERUNTIME" == "win-arm64" ]]; then + INCLUDE_NODE6=false + INCLUDE_NODE10=false; +fi + NODE_VERSION="6.17.1" NODE10_VERSION="10.24.1" NODE16_VERSION="16.20.2" +NODE16_WIN_ARM64_VERSION="16.9.1" NODE20_VERSION="20.17.0" MINGIT_VERSION="2.47.0.2" LFS_VERSION="3.4.0" @@ -154,13 +162,16 @@ function acquireExternalTool() { fi fi } + +echo "PACKAGE RUNTIME: $PACKAGERUNTIME" + # TODO: Check external tools for ARM-64 -if [[ "$PACKAGERUNTIME" == "win-x"* || "$PACKAGERUNTIME" == "win-arm64" ]]; then +if [[ "$PACKAGERUNTIME" == "win-x"* ]]; then # Download external tools for Windows. BIT="32" - if [[ "$PACKAGERUNTIME" == "win-x64" || "$PACKAGERUNTIME" == "win-arm64" ]]; then - BIT="64" + if [[ "$PACKAGERUNTIME" == "win-x64" ]]; then + BIT="64" # QQ: Why are these tools being installed for Win 64 only? acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy acquireExternalTool "$CONTAINER_URL/vstshost/m122_887c6659_binding_redirect_patched/vstshost.zip" vstshost @@ -187,6 +198,44 @@ if [[ "$PACKAGERUNTIME" == "win-x"* || "$PACKAGERUNTIME" == "win-arm64" ]]; then acquireExternalTool "${NODE_URL}/v${NODE16_VERSION}/${PACKAGERUNTIME}/node.lib" node16/bin acquireExternalTool "${NODE_URL}/v${NODE20_VERSION}/${PACKAGERUNTIME}/node.exe" node20_1/bin acquireExternalTool "${NODE_URL}/v${NODE20_VERSION}/${PACKAGERUNTIME}/node.lib" node20_1/bin +elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]]; then + # Download external tools for Windows. + + BIT="32" + if [[ "$PACKAGERUNTIME" == "win-arm64" ]]; then + BIT="64" + + acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy # Unavailable for Win ARM 64 - https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf#download-the-azcopy-portable-binary + acquireExternalTool "$CONTAINER_URL/vstshost/m122_887c6659_binding_redirect_patched/vstshost.zip" vstshost # Custom package. Will the same work for Win ARM 64? + acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" vstsom # Custom package. Will the same work for Win ARM 64? + fi + + acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git # Unavailable for Win ARM 64 - https://github.com/git-for-windows/git/releases + acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/x${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" # AVAILABLE FOR WINDOWS ARM 64 - https://github.com/git-lfs/git-lfs/releases?utm_source=gitlfs_site&utm_medium=releases_link&utm_campaign=gitlfs + acquireExternalTool "$CONTAINER_URL/pdbstr/1/pdbstr.zip" pdbstr # Where was this exe sourced from? I see that it ships with Windows + acquireExternalTool "$CONTAINER_URL/symstore/1/symstore.zip" symstore # Shipped with Debugging Tools for Windows (https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/) - https://learn.microsoft.com/en-us/windows/win32/debug/using-symstore + # Requires installation of Debugging Tools for Windows and taking the symstore from Debuggers\Arm64 + # https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-arm64#getting-arm--debugging-tools-for-windows + acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf + acquireExternalTool "$CONTAINER_URL/vswhere/2_8_4/vswhere.zip" vswhere + acquireExternalTool "https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe" nuget + + if [[ "$INCLUDE_NODE6" == "true" ]]; then + acquireExternalTool "${NODE_URL}/v${NODE_VERSION}/${PACKAGERUNTIME}/node.exe" node/bin # Not available for Windows ARM + acquireExternalTool "${NODE_URL}/v${NODE_VERSION}/${PACKAGERUNTIME}/node.lib" node/bin # Not available for Windows ARM + fi + if [[ "$INCLUDE_NODE10" == "true" ]]; then + acquireExternalTool "${NODE_URL}/v${NODE10_VERSION}/${PACKAGERUNTIME}/node.exe" node10/bin # Not available for Windows ARM + acquireExternalTool "${NODE_URL}/v${NODE10_VERSION}/${PACKAGERUNTIME}/node.lib" node10/bin # Not available for Windows ARM + fi + + # Unofficial distribution of Node contains Node 16 for Windows ARM + acquireExternalTool "${NODE_UNOFFICIAL_URL}/v${NODE16_WIN_ARM64_VERSION}/${PACKAGERUNTIME}/node.exe" node16/bin + acquireExternalTool "${NODE_UNOFFICIAL_URL}/v${NODE16_WIN_ARM64_VERSION}/${PACKAGERUNTIME}/node.lib" node16/bin + + # Official distribution of Node contains Node 20 for Windows ARM + acquireExternalTool "${NODE_URL}/v${NODE20_VERSION}/${PACKAGERUNTIME}/node.exe" node20_1/bin + acquireExternalTool "${NODE_URL}/v${NODE20_VERSION}/${PACKAGERUNTIME}/node.lib" node20_1/bin else # Download external tools for Linux and OSX. From 7136fb764fcd3f169a0518914fc69df5e69418d1 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Fri, 8 Nov 2024 18:01:34 +0530 Subject: [PATCH 09/26] Fixed Dependencies --- src/Misc/externals.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 5e6dae20d8..b42481e1a8 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -199,24 +199,22 @@ if [[ "$PACKAGERUNTIME" == "win-x"* ]]; then acquireExternalTool "${NODE_URL}/v${NODE20_VERSION}/${PACKAGERUNTIME}/node.exe" node20_1/bin acquireExternalTool "${NODE_URL}/v${NODE20_VERSION}/${PACKAGERUNTIME}/node.lib" node20_1/bin elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]]; then - # Download external tools for Windows. + # Download external tools for Windows ARM BIT="32" if [[ "$PACKAGERUNTIME" == "win-arm64" ]]; then BIT="64" - acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy # Unavailable for Win ARM 64 - https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf#download-the-azcopy-portable-binary + # acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy # Unavailable for Win ARM 64 - https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf#download-the-azcopy-portable-binary acquireExternalTool "$CONTAINER_URL/vstshost/m122_887c6659_binding_redirect_patched/vstshost.zip" vstshost # Custom package. Will the same work for Win ARM 64? acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" vstsom # Custom package. Will the same work for Win ARM 64? fi acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git # Unavailable for Win ARM 64 - https://github.com/git-for-windows/git/releases - acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/x${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" # AVAILABLE FOR WINDOWS ARM 64 - https://github.com/git-lfs/git-lfs/releases?utm_source=gitlfs_site&utm_medium=releases_link&utm_campaign=gitlfs - acquireExternalTool "$CONTAINER_URL/pdbstr/1/pdbstr.zip" pdbstr # Where was this exe sourced from? I see that it ships with Windows - acquireExternalTool "$CONTAINER_URL/symstore/1/symstore.zip" symstore # Shipped with Debugging Tools for Windows (https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/) - https://learn.microsoft.com/en-us/windows/win32/debug/using-symstore - # Requires installation of Debugging Tools for Windows and taking the symstore from Debuggers\Arm64 - # https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-arm64#getting-arm--debugging-tools-for-windows - acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf + acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm{BIT}/git-lfs.exe" "git/mingw${BIT}/bin" + acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm{BIT}/1/pdbstr.zip" pdbstr + acquireExternalTool "$CONTAINER_URL/symstore/win-arm{BIT}/1/symstore.zip" symstore + acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf # Custom package. Will the same work for Win ARM 64? acquireExternalTool "$CONTAINER_URL/vswhere/2_8_4/vswhere.zip" vswhere acquireExternalTool "https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe" nuget From 6a506197a07739dd304f5aecd45dc66ad38ad9c5 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 10:29:52 +0530 Subject: [PATCH 10/26] Fixed Externals.sh --- src/Misc/externals.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index b42481e1a8..f4ff2fb294 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -211,9 +211,9 @@ elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]]; fi acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git # Unavailable for Win ARM 64 - https://github.com/git-for-windows/git/releases - acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm{BIT}/git-lfs.exe" "git/mingw${BIT}/bin" - acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm{BIT}/1/pdbstr.zip" pdbstr - acquireExternalTool "$CONTAINER_URL/symstore/win-arm{BIT}/1/symstore.zip" symstore + acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" + acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm${BIT}/1/pdbstr.zip" pdbstr + acquireExternalTool "$CONTAINER_URL/symstore/win-arm${BIT}/1/symstore.zip" symstore acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf # Custom package. Will the same work for Win ARM 64? acquireExternalTool "$CONTAINER_URL/vswhere/2_8_4/vswhere.zip" vswhere acquireExternalTool "https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe" nuget From c6106e3efd33e0a2a09d7ec3fd09da1772796b14 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 10:36:45 +0530 Subject: [PATCH 11/26] Fixed Externals.sh --- src/Misc/externals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index f4ff2fb294..7ad674ac1c 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -211,7 +211,7 @@ elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]]; fi acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git # Unavailable for Win ARM 64 - https://github.com/git-for-windows/git/releases - acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" + acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm${BIT}/1/pdbstr.zip" pdbstr acquireExternalTool "$CONTAINER_URL/symstore/win-arm${BIT}/1/symstore.zip" symstore acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf # Custom package. Will the same work for Win ARM 64? From a6356feb5d9dd5e94b67b00b478dc09f870cda82 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 16:51:01 +0530 Subject: [PATCH 12/26] Fixed Build --- .azure-pipelines/pipeline.yml | 6 +++--- assets.json | 6 ++++++ src/Misc/externals.sh | 4 +--- src/dir.proj | 6 +++--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.azure-pipelines/pipeline.yml b/.azure-pipelines/pipeline.yml index a02718a345..b92f7df1e6 100644 --- a/.azure-pipelines/pipeline.yml +++ b/.azure-pipelines/pipeline.yml @@ -193,11 +193,11 @@ extends: jobName: build_windows_arm64 displayName: Windows (ARM64) pool: - name: 1ES-ABTT-Shared-ARM-64-Pool - image: abtt-windows-2022_arm64 + name: 1ES-ABTT-Shared-Pool + image: abtt-windows-2022 os: windows os: win - arch: x64 + arch: arm64 branch: ${{ parameters.branch }} unitTests: ${{ parameters.test }} functionalTests: ${{ parameters.test }} diff --git a/assets.json b/assets.json index 7b33ab6e69..c8c2f1f21e 100644 --- a/assets.json +++ b/assets.json @@ -23,6 +23,12 @@ "version": "", "downloadUrl": "https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x86-.zip" }, + { + "name": "vsts-agent-win-arm64-.zip", + "platform": "win-arm64", + "version": "", + "downloadUrl": "https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-arm64-.zip" + }, { "name": "pipelines-agent-win-arm64-.zip", "platform": "win-arm64", diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 7ad674ac1c..90a614fe6a 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -165,14 +165,12 @@ function acquireExternalTool() { echo "PACKAGE RUNTIME: $PACKAGERUNTIME" -# TODO: Check external tools for ARM-64 if [[ "$PACKAGERUNTIME" == "win-x"* ]]; then # Download external tools for Windows. BIT="32" if [[ "$PACKAGERUNTIME" == "win-x64" ]]; then - BIT="64" # QQ: Why are these tools being installed for Win 64 only? - + BIT="64" acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy acquireExternalTool "$CONTAINER_URL/vstshost/m122_887c6659_binding_redirect_patched/vstshost.zip" vstshost acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" vstsom diff --git a/src/dir.proj b/src/dir.proj index af4987bece..0359166c82 100644 --- a/src/dir.proj +++ b/src/dir.proj @@ -111,9 +111,9 @@ - - - + + + From 5c6ca3431b93f239064398f0f6b511bb8082a58a Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 17:01:22 +0530 Subject: [PATCH 13/26] Fixed Externals.sh --- src/Misc/externals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 90a614fe6a..f1958d6495 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -209,7 +209,7 @@ elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]]; fi acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git # Unavailable for Win ARM 64 - https://github.com/git-for-windows/git/releases - acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" + acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm${BIT}/1/pdbstr.zip" pdbstr acquireExternalTool "$CONTAINER_URL/symstore/win-arm${BIT}/1/symstore.zip" symstore acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf # Custom package. Will the same work for Win ARM 64? From ede1a41e432582e8e3c93ed555ca26ba80bf89be Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 17:33:59 +0530 Subject: [PATCH 14/26] Fixed Build --- .azure-pipelines/build-job.yml | 2 +- src/Common.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/build-job.yml b/.azure-pipelines/build-job.yml index 02c5233de2..e9ef638b9a 100644 --- a/.azure-pipelines/build-job.yml +++ b/.azure-pipelines/build-job.yml @@ -149,7 +149,7 @@ jobs: ) # 1ES images used on the ARM pool doesn't contain unzip tool, so we need to install it before starting the build - - ${{ if and(eq(parameters.arch, 'arm64'), ne(parameters.os, 'osx')) }}: + - ${{ if and(eq(parameters.arch, 'arm64'), ne(parameters.os, 'osx')), ne(parameters.os, 'win')) }}: - script: sudo dnf -y update && sudo dnf -y install unzip displayName: Install unzip retryCountOnTaskFailure: 5 diff --git a/src/Common.props b/src/Common.props index 65272f7b98..c06d984779 100644 --- a/src/Common.props +++ b/src/Common.props @@ -38,7 +38,7 @@ X86 - + ARM64 From 3d744a6a6031f03026cedae435ab31ed99e65b39 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 17:42:41 +0530 Subject: [PATCH 15/26] Fixed Build --- .azure-pipelines/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/build-job.yml b/.azure-pipelines/build-job.yml index e9ef638b9a..76d4b4977f 100644 --- a/.azure-pipelines/build-job.yml +++ b/.azure-pipelines/build-job.yml @@ -149,7 +149,7 @@ jobs: ) # 1ES images used on the ARM pool doesn't contain unzip tool, so we need to install it before starting the build - - ${{ if and(eq(parameters.arch, 'arm64'), ne(parameters.os, 'osx')), ne(parameters.os, 'win')) }}: + - ${{ if and(eq(parameters.arch, 'arm64'), ne(parameters.os, 'osx'), ne(parameters.os, 'win')) }}: - script: sudo dnf -y update && sudo dnf -y install unzip displayName: Install unzip retryCountOnTaskFailure: 5 From 9efe33cbe09ce0ee09746a258b1ce225ca99e431 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 11 Nov 2024 18:04:02 +0530 Subject: [PATCH 16/26] Fixed Build --- src/dir.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dir.proj b/src/dir.proj index 0359166c82..d4368522f4 100644 --- a/src/dir.proj +++ b/src/dir.proj @@ -110,7 +110,7 @@ - + From 928f4af2efdc7b97f203b56273db64698bf8117a Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 13 Nov 2024 15:59:42 +0530 Subject: [PATCH 17/26] Fixed Build --- src/Common.props | 4 ++-- src/dev.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Common.props b/src/Common.props index c06d984779..04ef54c319 100644 --- a/src/Common.props +++ b/src/Common.props @@ -33,7 +33,7 @@ - ARM64 + X64 X86 @@ -69,7 +69,7 @@ win-x64 win-x86 win-arm64 - win-arm64 + diff --git a/src/dev.sh b/src/dev.sh index 6a0b6b3946..66f44e7aa2 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -121,8 +121,8 @@ function detect_platform_and_runtime_id() { DETECTED_RUNTIME_ID='win-x86' elif [[ "$PROCESSOR_ARCHITECTURE" == 'ARM64' ]]; then DETECTED_RUNTIME_ID='win-arm64' - elif [[ "$PROCESSOR_ARCHITECTURE" == 'AMD64' ]]; then - DETECTED_RUNTIME_ID='win-arm64' +## elif [[ "$PROCESSOR_ARCHITECTURE" == 'AMD64' ]]; then +## DETECTED_RUNTIME_ID='win-arm64' fi elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then DETECTED_RUNTIME_ID="linux-x64" From cf01df2c46e70c9fe2c02b2f78b3f6218d67e536 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 13 Nov 2024 17:01:20 +0530 Subject: [PATCH 18/26] Fixed Build --- src/dev.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dev.sh b/src/dev.sh index 66f44e7aa2..04ed136c43 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -91,6 +91,11 @@ function restore_sdk_and_runtime() { dotnet_windows_dir=${dotnet_windows_dir:0:1}:${dotnet_windows_dir:1} local architecture architecture=$(echo "$RUNTIME_ID" | cut -d "-" -f2) + + # We compile on an x64 machine, even when targeting ARM64. Thereby we are installing the x64 version of .NET instead of the arm64 version. + if [[ "$architecture" == "arm64" ]]; then + architecture="x64" + fi printf "\nInstalling SDK...\n" powershell -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& \"${DOTNET_INSTALL_SCRIPT_PATH}\" -Version ${DOTNET_SDK_VERSION} -InstallDir \"${dotnet_windows_dir}\" -Architecture ${architecture} -NoPath; exit \$LastExitCode;" || checkRC "${DOTNET_INSTALL_SCRIPT_NAME} (SDK)" From be2edc96a8ac320d224786b214e46faeb762b5fa Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 13 Nov 2024 18:28:06 +0530 Subject: [PATCH 19/26] Install .NET for ARM for Unit Tests --- .azure-pipelines/build-job.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.azure-pipelines/build-job.yml b/.azure-pipelines/build-job.yml index 76d4b4977f..00ef61ffbc 100644 --- a/.azure-pipelines/build-job.yml +++ b/.azure-pipelines/build-job.yml @@ -188,6 +188,15 @@ jobs: installationPath: 'C:\Program Files (x86)\dotnet' env: PROCESSOR_ARCHITECTURE: x86 + - ${{ if and(eq(parameters.os, 'win'), eq(parameters.arch, 'arm64')) }}: + - task: UseDotNet@2 + displayName: Install .NET Core 6 Runtime + inputs: + version: '6.0.x' + packageType: 'runtime' + installationPath: 'C:\Program Files (x86)\dotnet' + env: + PROCESSOR_ARCHITECTURE: arm64 - script: ${{ variables.devCommand }} testl0 $(targetFramework) Debug ${{ parameters.os }}-${{ parameters.arch }} workingDirectory: src displayName: Unit tests @@ -202,6 +211,13 @@ jobs: version: '6.0.424' packageType: sdk performMultiLevelLookup: true + - ${{ if and(eq(parameters.os, 'win'), eq(parameters.arch, 'arm64')) }}: + - task: UseDotNet@2 + displayName: Install .NET Core 6 SDK + inputs: + version: '6.0.424' + packageType: sdk + performMultiLevelLookup: true - script: ${{ variables.devCommand }} testl1 $(targetFramework) Debug ${{ parameters.os }}-${{ parameters.arch }} workingDirectory: src displayName: Functional tests From c4dce702265432bf0da59579cc509e0ca761994b Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Wed, 13 Nov 2024 18:45:19 +0530 Subject: [PATCH 20/26] Revert: Install .NET for ARM for Unit Tests --- .azure-pipelines/build-job.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.azure-pipelines/build-job.yml b/.azure-pipelines/build-job.yml index 00ef61ffbc..76d4b4977f 100644 --- a/.azure-pipelines/build-job.yml +++ b/.azure-pipelines/build-job.yml @@ -188,15 +188,6 @@ jobs: installationPath: 'C:\Program Files (x86)\dotnet' env: PROCESSOR_ARCHITECTURE: x86 - - ${{ if and(eq(parameters.os, 'win'), eq(parameters.arch, 'arm64')) }}: - - task: UseDotNet@2 - displayName: Install .NET Core 6 Runtime - inputs: - version: '6.0.x' - packageType: 'runtime' - installationPath: 'C:\Program Files (x86)\dotnet' - env: - PROCESSOR_ARCHITECTURE: arm64 - script: ${{ variables.devCommand }} testl0 $(targetFramework) Debug ${{ parameters.os }}-${{ parameters.arch }} workingDirectory: src displayName: Unit tests @@ -211,13 +202,6 @@ jobs: version: '6.0.424' packageType: sdk performMultiLevelLookup: true - - ${{ if and(eq(parameters.os, 'win'), eq(parameters.arch, 'arm64')) }}: - - task: UseDotNet@2 - displayName: Install .NET Core 6 SDK - inputs: - version: '6.0.424' - packageType: sdk - performMultiLevelLookup: true - script: ${{ variables.devCommand }} testl1 $(targetFramework) Debug ${{ parameters.os }}-${{ parameters.arch }} workingDirectory: src displayName: Functional tests From ec3d744073eedac4bb3526941ef4d7bf7e86d8b4 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Thu, 14 Nov 2024 15:32:18 +0530 Subject: [PATCH 21/26] Disabled Unit and Functional Tests for Win ARM 64 --- .azure-pipelines/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/pipeline.yml b/.azure-pipelines/pipeline.yml index b92f7df1e6..162ee936dd 100644 --- a/.azure-pipelines/pipeline.yml +++ b/.azure-pipelines/pipeline.yml @@ -199,8 +199,8 @@ extends: os: win arch: arm64 branch: ${{ parameters.branch }} - unitTests: ${{ parameters.test }} - functionalTests: ${{ parameters.test }} + unitTests: false + functionalTests: false sign: ${{ parameters.sign }} publishArtifacts: ${{ parameters.publishArtifacts }} buildAlternatePackage: ${{ parameters.buildAlternatePackage }} From c79669369d2076001b8beff2ca3d1e6acba5a2c4 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Thu, 14 Nov 2024 16:07:48 +0530 Subject: [PATCH 22/26] Formatting/Comment Corrections --- src/Misc/UpdateAgentPackage.template.xml | 2 +- src/Misc/externals.sh | 2 +- src/dev.sh | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Misc/UpdateAgentPackage.template.xml b/src/Misc/UpdateAgentPackage.template.xml index 108af9ec1f..27d7c87679 100644 --- a/src/Misc/UpdateAgentPackage.template.xml +++ b/src/Misc/UpdateAgentPackage.template.xml @@ -82,7 +82,7 @@ - + diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index f1958d6495..0cc7f73bbc 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -212,7 +212,7 @@ elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]]; acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin" acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm${BIT}/1/pdbstr.zip" pdbstr acquireExternalTool "$CONTAINER_URL/symstore/win-arm${BIT}/1/symstore.zip" symstore - acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf # Custom package. Will the same work for Win ARM 64? + acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf acquireExternalTool "$CONTAINER_URL/vswhere/2_8_4/vswhere.zip" vswhere acquireExternalTool "https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe" nuget diff --git a/src/dev.sh b/src/dev.sh index 04ed136c43..86a3d0ceec 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -126,8 +126,6 @@ function detect_platform_and_runtime_id() { DETECTED_RUNTIME_ID='win-x86' elif [[ "$PROCESSOR_ARCHITECTURE" == 'ARM64' ]]; then DETECTED_RUNTIME_ID='win-arm64' -## elif [[ "$PROCESSOR_ARCHITECTURE" == 'AMD64' ]]; then -## DETECTED_RUNTIME_ID='win-arm64' fi elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then DETECTED_RUNTIME_ID="linux-x64" From 24726b5906af861420b45bbe23d93e059080c607 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 18 Nov 2024 15:30:06 +0530 Subject: [PATCH 23/26] Corrected OS Arch Prop --- src/Common.props | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Common.props b/src/Common.props index 04ef54c319..becd7175f1 100644 --- a/src/Common.props +++ b/src/Common.props @@ -38,7 +38,7 @@ X86 - + ARM64 @@ -69,8 +69,7 @@ win-x64 win-x86 win-arm64 - - + $(OSPlatform);$(OSArchitecture);$(DebugConstant);TRACE From 71b3ac6a21e78e84edcedcee3a365e9c62f38cb7 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 18 Nov 2024 15:43:50 +0530 Subject: [PATCH 24/26] Corrected OS Arch Prop & Added Logs --- src/Common.props | 2 +- src/dev.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Common.props b/src/Common.props index becd7175f1..db9cfe7d82 100644 --- a/src/Common.props +++ b/src/Common.props @@ -38,7 +38,7 @@ X86 - + ARM64 diff --git a/src/dev.sh b/src/dev.sh index 86a3d0ceec..7a633f8e05 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -374,8 +374,10 @@ echo "Current runtime ID: $DETECTED_RUNTIME_ID" if [ "$DEV_RUNTIME_ID" ]; then RUNTIME_ID=$DEV_RUNTIME_ID + echo "Proceeding with DEV_RUNTIME_ID" else RUNTIME_ID=$DETECTED_RUNTIME_ID + echo "Proceeding with detected DETECTED_RUNTIME_ID" fi _VALID_RIDS='linux-x64:linux-arm:linux-arm64:linux-musl-x64:linux-musl-arm64:osx-x64:osx-arm64:win-x64:win-x86:win-arm64' From c27847f68c39e5119bba81f389928d9cb4161f82 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Mon, 18 Nov 2024 17:11:24 +0530 Subject: [PATCH 25/26] Corrected OS arch in Common.props --- src/Common.props | 4 ++++ src/dev.sh | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Common.props b/src/Common.props index db9cfe7d82..2f037412e7 100644 --- a/src/Common.props +++ b/src/Common.props @@ -41,6 +41,10 @@ ARM64 + + ARM64 + + X64 diff --git a/src/dev.sh b/src/dev.sh index 7a633f8e05..86a3d0ceec 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -374,10 +374,8 @@ echo "Current runtime ID: $DETECTED_RUNTIME_ID" if [ "$DEV_RUNTIME_ID" ]; then RUNTIME_ID=$DEV_RUNTIME_ID - echo "Proceeding with DEV_RUNTIME_ID" else RUNTIME_ID=$DETECTED_RUNTIME_ID - echo "Proceeding with detected DETECTED_RUNTIME_ID" fi _VALID_RIDS='linux-x64:linux-arm:linux-arm64:linux-musl-x64:linux-musl-arm64:osx-x64:osx-arm64:win-x64:win-x86:win-arm64' From 401f8aa1d2a43f39a29bda8bcd764659f07094f4 Mon Sep 17 00:00:00 2001 From: Aditya Mankal Date: Tue, 19 Nov 2024 13:55:06 +0530 Subject: [PATCH 26/26] retrigger checks