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

feat: support vs2022 #2533

Merged
merged 1 commit into from
Oct 29, 2021
Merged

feat: support vs2022 #2533

merged 1 commit into from
Oct 29, 2021

Conversation

gengjiawen
Copy link
Member

@gengjiawen gengjiawen commented Oct 24, 2021

closes #2520.

Since github action now provide vs2022, so I also add vs2022 to CI.

Verified on win10.

@gengjiawen
Copy link
Member Author

ping

Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

tbh this is entirely rubber stamp from me, the existence check for msbuildPath seems like a bit of a concern, but 🤷 if it works?

@gengjiawen gengjiawen merged commit 5a00387 into nodejs:master Oct 29, 2021
@gengjiawen gengjiawen deleted the vs2022 branch October 29, 2021 02:54
run: |
npm install --no-progress
- name: Set Windows environment
if: matrix.os == 'windows-latest'
Copy link
Contributor

@cclauss cclauss Oct 29, 2021

Choose a reason for hiding this comment

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

Given that Win22 is still beta and is not windows-latest https://github.com/actions/virtual-environments this setup code is not going to be run. Is that a problem? Do we want this setup run on all Windows tests?
if: startsWith(matrix.os, 'windows')

Copy link
Member

Choose a reason for hiding this comment

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

I assume this is just copypasta from tests.yml and it's not needed here

but why do we need this separate workflow? can't we add windows-2022 to tests.yml? What's this one doing that's unique?

Copy link
Member Author

Choose a reason for hiding this comment

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

I assume this is just copypasta from tests.yml and it's not needed here

Yeap.

but why do we need this separate workflow? can't we add windows-2022 to tests.yml? What's this one doing that's unique?

The matrix is 3*3, adding another os will get 9 extra CI pipeline.

https://github.com/nodejs/node-gyp/blob/master/.github/workflows/tests.yml#L10

Copy link
Contributor

Choose a reason for hiding this comment

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

if (ret.versionMajor === 17) {
ret.versionYear = 2022
return ret
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to keep commenting on a merged PR but… wouldn’t it be easier to make future changes to:

let versionYears = {
    15: 2017,
    16: 2019,
    17: 2022,
}
ret.versionYear = versionYears[ret.versionMajor]

And similar around line 305?

This comment was marked as resolved.

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.

Error: Could not find any Visual Studio installation to use (VS2022 Preview)
4 participants