Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add initial CI with Azure Pipelines #29
Hey @kaylangan, thanks for the help. I think the difficulty I'm having getting the Linux/mac builds to work is to get the multiple SDKs installed. I've tried adding multiple instances of the
The various samples and test projects in this project require 2.0, 1.1, and 1.0. I probably could/should consolidate these somewhat, but I'm keen to get it building as-is before making other changes.
The current problem is that the tests expect runtime version 1.1.2, but only 1.1.4 is installed, and I can't get 1.1.2 to install. I think this is more of an issue with .NET Core versioning than azure pipelines though.
Hey @andrewlock, I'm on Kayla's team and she asked me to take a look here. The software on each of our images is listed here. It looks like we don't offer 1.1.2 on the Ubuntu or Mac images, though we do on Windows. I can see about getting that version added...
Your bigger problem is that your tool installers are clobbering each other. The list of steps is processed sequentially. So for instance in the Linux job, you're asking for 1.0.4, then immediately switching to 1.1.4, then immediately switching to 2.1.401.
Instead, you probably want that in a matrix so it runs once for each .NET Core version:
- job: Linux pool: vmImage: 'ubuntu-16.04' strategy: maxParallel: 3 matrix: DotNet10: dotnet_version: '1.0.4' DotNet11: dotnet_version: '1.1.4' DotNet20: dotnet_version: '2.0.401' steps: - task: DotNetCoreInstaller@0 inputs: version: $( dotnet_version ) - bash: ./build.sh env: COREHOST_TRACE: 0 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_CLI_TELEMETRY_OPTOUT: 1
And similar for the other platforms. (Once you get that going, we could also look at factoring your job out into a template so you don't have to duplicate the steps on each platform... but one thing at a time.)
And also, to be clear, I'm not trying to get a "matrix so it runs once for each .NET Core version". If you see the Windows build (that succeeded) its just a single build, it just runs the tests once on each target framework as part of that.
I'll try tweaking some things.
I'm definitely missing something. Looking at this build which corresponds to this version of your Azure Pipelines config, I don't see where the Windows tests are running against multiple versions of .NET Core. I don't know Cake, though, so I'm probably misinterpreting the output. So, I may be on the wrong track here since I'm flying a bit blind.
Back to the current version: the Linux failure suggests we don't have a version of .NET Core ready to go on that image. That's what the DotNetCoreInstaller is for. Something in the code or tests is trying to force .NET Core 1.1.2, which we don't have in the tools cache. I would have thought that 1.1.4 would be an effective substitute since it's a point release.
So in that build you linked to, if you scroll down (a long way) in the powershell task log, you'll see this:
That shows it running the same project against .NETFramework,Version=v4.5.2, NETCoreApp,Version=v2.0, and NETCoreApp,Version=v1.1.
The weird thing is I don't know why it needs 1.1.2 at the moment. According to the install list you posted previously, neither the Mac or Windows machines have 1.1.2 installed either, yet they are building fine in the latest iteration.
So it's just linux. It's as though the other .net runtimes haven't been installed even though they should be according to the list of installed software. I'll add a task to run
@vtbassmatt I just added a call to
They're meant to side-by-side installations, that's one of the selling points of .NET Core, so they're definitely not installed on the agent.
Edit: Very strangely, I just ran it again, and this time it shows all the installed .NET Core runtimes and SDKs! and lo and behold the build succeeds.
This looks to me like a definite bug on the Azure pipelines side - the agent I got in the last run was definitely different to the one before!