MILAB-6205: activate vcvars on Windows runners in node-matrix workflows#177
Merged
Conversation
Section 2b required a changeset for every workspace package consuming a bumped catalog key, scanning all dependency sections. That flagged packages whose only "change" was a build-tool catalog bump in a devDependency (e.g. @platforma-sdk/block-tools in a block model, @platforma-sdk/tengo-builder in a workflow) even though the package's own files were untouched and `pnpm changeset` does not flag them. Restrict the catalog-consumer scan to runtime sections (dependencies, peerDependencies). A runtime catalog dep bump still requires a release; build-only tooling no longer produces false positives. Adds a bats case + pkg-dev fixture covering the devDependency path.
Merge v4-beta to v4 (2026-05-29)
pl-compose: set static --master-secret for htpasswd auth
Merge v4-beta to v4 (2026-06-01)
Add a `Setup MSVC Dev Cmd` step (a thin wrapper around `ilammy/msvc-dev-cmd` via the shared `setup-msvc-dev-cmd` action) to the prebuild job's step list on both reusable workflows: - node-matrix.yaml - node-matrix-pnpm.yaml Gated by `if: runner.os == 'Windows'`, so it is a no-op on Linux and macOS runners. Background: the runenv-python-3 repo's freesasa addition (PR #88) exposed that the prebuild matrix on Windows ships VS 2022 Build Tools but never activates them in the job shell. setuptools' distutils therefore fails to find `cl.exe` when `pip wheel` compiles a C extension from sdist, even though the headers and linker libs are on disk. Running the vcvars activation here means every downstream consumer of these reusable workflows gets a ready-to-build Windows env without having to roll their own activation (the runenv-python-3 PR initially did this in the builder; that code is now reverted in favour of this). The action also exports `DISTUTILS_USE_SDK=1`, which tells setuptools' MSVC compiler shim to skip its own VS lookup and trust the env vars already in scope (`INCLUDE` / `LIB` / `LIBPATH` / `PATH`). `arch` is mapped from the matrix's `amd64` / `arm64` values to vcvarsall's expected `amd64` / `arm64` args. Pattern mirrors the existing usage in milaboratory/pframes-rs (`.github/actions/setup-agent/action.yml`).
DenKoren
approved these changes
Jun 3, 2026
Member
|
nit: better to first merge to v4-beta, then use merge-beta script. |
xnacly
added a commit
to platforma-open/runenv-python-3
that referenced
this pull request
Jun 3, 2026
milaboratory/github-ci#177 added a `Setup MSVC Dev Cmd` step to the node-matrix reusable workflows and was merged to v4-beta. The v4-beta -> v4 promotion (milaboratory/github-ci#178) is still open, so a build referencing `@v4` still hits the old workflow without MSVC activation. Per the team's convention (branch from v4-beta, experiment in v4-beta, validate downstream against v4-beta, then merge v4-beta to v4 and revert downstream pin), switch the reusable workflow reference to `@v4-beta` for the duration of this PR. Will be reverted to `@v4` once #178 merges. `context/init@v4` reference is left untouched, the action is unchanged on v4 (only the reusable workflow YAML was modified).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
Setup MSVC Dev Cmdstep (using the sharedsetup-msvc-dev-cmdaction) to the prebuild job in both reusable matrix workflows so that any downstream consumer building a C / C++ extension from source on Windows findscl.exeand the SDK headers automatically.What's added
Inserted between "Install pipx" and "Configure ccache" in:
.github/workflows/node-matrix.yaml.github/workflows/node-matrix-pnpm.yamlNo-op on Linux and macOS runners (the
if: runner.os == 'Windows'guard). On Windows runners it activates VS 2022 Build Tools via vcvarsall (the underlyingilammy/msvc-dev-cmdaction) and exports the resulting env (INCLUDE/LIB/LIBPATH/PATHplusDISTUTILS_USE_SDK=1) to subsequent steps.Why
The
windows-latestrunner ships VS 2022 Build Tools but doesn't activate them by default. Any subsequent build step that compiles a C extension (e.g.pip wheelagainst a setuptools/distutils sdist) fails with:This was surfaced by the runenv-python-3 PR #88 (freesasa addition) where the freesasa sdist's plain setup.py path couldn't find
cl.exe. The original attempt rolled MSVC activation inside the runenv builder; once this PR merges and thev4tag advances, that code is removed and runenv-python-3 just lists freesasa in deps + buildWheel.Pattern mirrors the existing usage in milaboratory/pframes-rs, which already activates MSVC via this same shared action.
Blast radius
runner.os == 'Windows'guard means non-Windows matrix cells skip the step entirely.Verification
Local YAML syntax checked; the matrix.arch expression matches what both reusable workflows pass through (
amd64/arm64). Real verification is downstream PRs picking up the updated@v4ref.Greptile Summary
Adds a
Setup MSVC Dev Cmdstep (wrappingilammy/msvc-dev-cmd) to theprebuildjob in bothnode-matrix.yamlandnode-matrix-pnpm.yaml, guarded byif: runner.os == 'Windows', so that downstream Windows build steps that compile C/C++ extensions from source can findcl.exeand the SDK headers automatically.node-matrix.yamlandnode-matrix-pnpm.yaml: The new step is inserted between the pipx install steps and the ccache configuration step, in the correct position to export MSVC env vars (INCLUDE,LIB,PATH,DISTUTILS_USE_SDK=1) before any compilation happens.setup-msvc-dev-cmdshared action pinsilammy/msvc-dev-cmdto a specific commit SHA, which is good practice for supply-chain safety.Confidence Score: 5/5
Safe to merge — the change is additive, well-guarded, and follows an existing pattern in the monorepo.
Both files receive an identical, minimal addition: a single step behind runner.os == Windows that activates the VS 2022 developer environment. The underlying shared action pins ilammy/msvc-dev-cmd to a specific commit SHA. The arch expression correctly collapses to arm64 or amd64. Non-Windows matrix cells are completely unaffected, and the step's position (after pipx, before ccache) is the right order for MSVC env vars to be visible to subsequent compilation steps.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[checkout] --> B[Install pipx\nLinux / macOS] B --> C{runner.os == Windows?} C -- Yes --> D[Setup MSVC Dev Cmd\nilammy/msvc-dev-cmd\narch: arm64 or amd64] C -- No --> E[Skip MSVC setup] D --> F{inputs.enable-ccache?} E --> F F -- Yes --> G[Configure ccache] F -- No --> H[Cache additional paths] G --> H H --> I[Load milab-shell-utils] I --> J[node/test or pnpm build]Reviews (1): Last reviewed commit: "MILAB-6205: activate vcvars on Windows r..." | Re-trigger Greptile