Skip to content

Conversation

@Turnerj
Copy link
Contributor

@Turnerj Turnerj commented Aug 25, 2020

See the build/test error in #1328 - this might patch around that neatly via using the matrix options. This PR is as much of a test of the concept.

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Uses the options matrix to define the SDK version to install, thus hopefully guaranteeing the right version is installed for tests.

@Turnerj
Copy link
Contributor Author

Turnerj commented Aug 25, 2020

Slight issue with it - seems that the Benchmarks project and the ProfilingSandbox project are being built but require specific versions of the SDK themselves. The builds might need to be more selective to avoid building either project as neither is used for CI AFAIK.

@JimBobSquarePants
Copy link
Member

I think we have to install both for each build now.

https://github.com/actions/setup-dotnet

@Turnerj
Copy link
Contributor Author

Turnerj commented Aug 25, 2020

Hmmmm, I was thinking going the other way, changing the ci-build.ps1 script to just build the main library and the test library.

dotnet build -c Release -f $targetFramework /p:RepositoryUrl=$repositoryUrl

If that was building the test library, the test library would automatically build the main library.

uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
dotnet-version: ${{matrix.options.sdkVersion}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't figure out from the docs whether you can simply do. [ "2.1.x", "3.1.x" ]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digging through the TypeScript code for the action, it looks to only take string values. Internally, the value is getting passed into here: https://github.com/actions/setup-dotnet/blob/e3d81d94533f1e31c11d94a1fdf6f60f096a7bc5/src/installer.ts#L33

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, ran a quick test in the Web repo. Big fail

The Benchmark and ProfilingSandbox aren't used in testing as far as I know
@Turnerj
Copy link
Contributor Author

Turnerj commented Aug 25, 2020

I need to go get some sleep - I've pushed a change which tweaks what is built for the CI which may work around the issue. Its cool if this isn't the direction you want to go though.

Hopefully it works!

@tocsoft
Copy link
Member

tocsoft commented Aug 25, 2020

I don't think we need the "Setup DotNet SDK" step at all anymore, I believe all the sdks we need are all preinstalled on the images... we needed it in the past but I don't think we do anymore.

@JimBobSquarePants
Copy link
Member

I don't think we need the "Setup DotNet SDK" step at all anymore, I believe all the sdks we need are all preinstalled on the images... we needed it in the past but I don't think we do anymore.

@tocsoft You're right!

@JimBobSquarePants
Copy link
Member

Thanks for your help @Turnerj

I ended up just pushing the fix in the other open PR.

Turns out the new VMs have everything!

https://github.com/actions/virtual-environments/releases

@Turnerj Turnerj deleted the patch-1 branch August 26, 2020 02:36
@Turnerj
Copy link
Contributor Author

Turnerj commented Aug 26, 2020

Awesome - glad you got it working!

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.

3 participants