Skip to content

build,win: add pgo generate workflow - #67438

Open
StefanStojanovic wants to merge 1 commit into
nodejs:mainfrom
JaneaSystems:mefi-gh-pgo
Open

StefanStojanovic wants to merge 1 commit into
nodejs:mainfrom
JaneaSystems:mefi-gh-pgo

Conversation

@StefanStojanovic

Copy link
Copy Markdown
Contributor

This PR adds a Windows GitHub action that runs a PGO-instrumented build, executes workload scripts on a runner with the requested architecture (x64 or ARM64), and creates a branch that pushes the profdata file to the predefined location in the repository.

After the branch is created, you can open a PR to main or an LTS branch to include that change. Once that is done, the release CI will look for that file and use it for the release. This will also make release Windows builds more than twice as fast because the preparation step (instrumented build and workloads) will already be finished. Since we currently use x64-generated profdata in ARM64 releases, this will further improve performance on ARM64 Windows.

I've already tested the workflow in my Node.js fork, and everything worked as expected.

P.S. I've already tested this through the release CI and saw no issues there.

Signed-off-by: StefanStojanovic <stefan.stojanovic@janeasystems.com>
@StefanStojanovic StefanStojanovic added windows Issues and PRs related to the Windows platform. build Issues and PRs related to Node.js builds or CI infrastructure. github_actions PRs that update GitHub Actions workflows. labels Nov 12, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory. labels Nov 12, 2026

@legendecas legendecas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure if we want to keep the generated data in the git and the repo history, even if its' not merged into the main branch. For each run and each platform, the generated data seems to be about ~10MB: https://github.com/JaneaSystems/node/actions/runs/42214152931

@StefanStojanovic

Copy link
Copy Markdown
Contributor Author

Thanks for your feedback @legendecas. The original idea was to merge them into the branches we use to build releases, but the files are even bigger - a single profdata file is ~65 MB, and we'd have 2 of those added. Do you think it would be cleaner to make a separate repository just for profdata? The release job would then fetch it and check for the profdata it needs instead of looking for it in the Node.js repo. Do you have another idea on how to approach this?

The workflow is straightforward, so once we agree on the complete PGO flow, I'll modify the last step to push the result where it is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. github_actions PRs that update GitHub Actions workflows. meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants