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

Fix node windows workflow #2263

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Fix node windows workflow #2263

merged 4 commits into from
Apr 16, 2024

Conversation

acalcutt
Copy link
Collaborator

@acalcutt acalcutt commented Apr 15, 2024

Fixes #2256

The github runners are using cmake 3.29.1, which has been causing issues in macos and windows ci. This PR uses jwlawson/actions-setup-cmake to make the workflow use 3.29.2 like suggested in actions/runner-images#9680 (comment) , which seems to fix the build issues

It looks like 'jwlawson/actions-setup-cmake' was already being used in the linux runner, so this changes it to also be used in all github runners. It did not work in the self-hosted runner, so I have restricted it from running in those workers

@acalcutt acalcutt changed the title Fix node windows workflwo Fix node windows workflow Apr 15, 2024
@acalcutt acalcutt marked this pull request as ready for review April 15, 2024 15:45
@acalcutt
Copy link
Collaborator Author

acalcutt commented Apr 15, 2024

@louwers I think I fixed the windows workflow by upgrading cmake to 3.29.2 in all github runners. It seems like it works from the ci. It also fixes my macos issues in my test PR.

I do notice the pre-commit doesn't like runner.environment, but I had read that was valid and seems to work as expected (since that section does not run on the self-hosted runner like I wanted). Any idea how I can fix that?

@louwers
Copy link
Collaborator

louwers commented Apr 15, 2024

Thanks!

Do you still have the error? We can probably report it over at actionlint.

But it seems like you found a solution.

@louwers louwers added node github_actions Pull requests that update GitHub Actions code windows labels Apr 15, 2024
@acalcutt
Copy link
Collaborator Author

acalcutt commented Apr 15, 2024

The error was

.github/workflows/node-ci.yml:168:13: property "environment" is not defined in object type {arch: string; debug: string; name: string; os: string; temp: string; tool_cache: string} [expression]
    |
168 |         if: runner.environment == 'github-hosted'

After looking a bit more on it, I feel like maybe 'runner.environment' isn't yet documented properly yet
https://github.com/orgs/community/discussions/118413
github/docs#32443

@louwers louwers merged commit 8ab7771 into maplibre:main Apr 16, 2024
23 checks passed
@acalcutt
Copy link
Collaborator Author

acalcutt commented Apr 16, 2024

Just an FYI, I did put in an actionlint PR at rhysd/actionlint#412 and it sounds like they may add runner.environment. However I think the workaround of using name should work fine for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code node windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node.js Windows CI Broken
2 participants