Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux ARM (Raspberry Pi) support #1703

Closed
wants to merge 6 commits into from

Conversation

ethomson
Copy link
Contributor

One of the exciting things about pondering @libgit2's move to VSTS as a CI/CD platform is that we can run private build agents on some of the more obscure platforms that we support - for example, Raspberry Pi. This PR enables support for linux-arm for Raspberry Pi.

Tested on Raspbian Stretch on a Raspberry Pi 3+.

Update the runtime SDK requirements to 2.1.300, which is the first
runtime version to support Linux ARM.
Don't assume that Linux is amd64, detect ARM as well, setting the
architecture type to `linux-arm`.
Detect the architecture type and download the appropriate node package
(amd64 or arm).
Expand the RuntimeIdentifier to include linux-arm.
Ensure that the ${LAYOUT_DIR}/bin/en-US directory exists before writing
to it.
@TingluoHuang
Copy link
Contributor

@ethomson we need #1663 for consume netcore 2.1, There might be more stuff need to think through before produce ARM agent, like Task support.

@ethomson
Copy link
Contributor Author

@TingluoHuang Indeed, I saw that PR, but I believe that this is orthogonal. I'm not proposing a move to target .NET Core 2.1, just that we start using the .NET SDK 2.1. .NET SDK 2.1 can still run .NET Core 2.0 code without difficulties.

However if this requirement is unnecessarily burdensome then (requiring .NET SDK 2.1 even though only .NET Core 2.0 is the target language) then I can continue to produce builds out of my fork.

@ethomson
Copy link
Contributor Author

As for Task support, can you explain what that means? I'm just coming up to speed on the vsts-agent so there's a lot that I still don't know.

@TingluoHuang
Copy link
Contributor

ARM is officially supported only in 2.1, even 2.0 runtime can run it. :)
https://github.com/dotnet/core/blob/master/release-notes/2.1/2.1-supported-os.md
For tasks, we need to make sure all VSTS in box tasks are capable with running on ARM or at least give reasonable error for not supported case.
The problem is today all our task authors assume we always runs on x64 system, we need to check the impact before we ship and officially support an ARM agent.

@hansgschossmann
Copy link

@ethomson I was running "dev.sh test" on the RPI3+ and got a 2 errors at the end:

  Starting test execution, please wait...
  [xUnit.net 00:00:34.2661127]     Microsoft.VisualStudio.Services.Agent.Tests.DotnetsdkDownloadScriptL0.EnsureDotnetsdkBashDownloadScriptUpToDate [FAIL]
  Failed   Microsoft.VisualStudio.Services.Agent.Tests.DotnetsdkDownloadScriptL0.EnsureDotnetsdkBashDownloadScriptUpToDate
EXEC : error Message:  [/home/pi/vsts-agent/src/dir.proj]
   Fix the test by updating Src/Misc/dotnet-install.sh with content from https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh
  Expected: True
  Actual:   False
  Stack Trace:
     at Microsoft.VisualStudio.Services.Agent.Tests.DotnetsdkDownloadScriptL0.EnsureDotnetsdkBashDownloadScriptUpToDate() in /home/pi/vsts-agent/src/Test/L0/DotnetsdkDownloadScriptL0.cs:line 30
  --- End of stack trace from previous location where exception was thrown ---
  [xUnit.net 00:00:34.8534842]     Microsoft.VisualStudio.Services.Agent.Tests.DotnetsdkDownloadScriptL0.EnsureDotnetsdkPowershellDownloadScriptUpToDate [FAIL]
  Failed   Microsoft.VisualStudio.Services.Agent.Tests.DotnetsdkDownloadScriptL0.EnsureDotnetsdkPowershellDownloadScriptUpToDate
EXEC : error Message:  [/home/pi/vsts-agent/src/dir.proj]
   Fix the test by updating Src/Misc/dotnet-install.ps1 with content from https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1
  Expected: True
  Actual:   False
  Stack Trace:
     at Microsoft.VisualStudio.Services.Agent.Tests.DotnetsdkDownloadScriptL0.EnsureDotnetsdkPowershellDownloadScriptUpToDate() in /home/pi/vsts-agent/src/Test/L0/DotnetsdkDownloadScriptL0.cs:line 54
  --- End of stack trace from previous location where exception was thrown ---
  Results File: /home/pi/vsts-agent/src/Test/TestResults/_iiot-arm-host_2018-09-19_12_19_27.trx
  Test Run Failed.

  Total tests: 457. Passed: 455. Failed: 2. Skipped: 0.
  Test execution time: 1.0290 Minutes
/home/pi/vsts-agent/src/dir.proj(45,5): error MSB3073: The command "dotnet test Test/Test.csproj --no-build --logger:trx" exited with code 1.
Failed: failed tests
~/vsts-agent/src

Is this expected or did i missed something?

@TingluoHuang
Copy link
Contributor

https://github.com/Microsoft/azure-pipelines-agent/releases/tag/v2.141.0

i am going to close this as we release the ARM agent in latest agent release.

thanks for your contribution. :D

@ethomson
Copy link
Contributor Author

ethomson commented Oct 8, 2018

Awesome, thanks @TingluoHuang! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants