Skip to content

Commit 11eeeb0

Browse files
committed
ci: enable runfiles when cross-building Windows E2E tests
When cross-building the Windows E2E targets on Linux with `--platforms=tools:windows_x64`, `@bazel_lib//lib:enable_runfiles` evaluates to `False` unless `--enable_runfiles` is passed, causing `aspect_rules_js` to generate the test launcher script with `JS_BINARY__NO_RUNFILES=1`. In `aspect_rules_js` 3.5.2, `JS_BINARY__NO_RUNFILES=1` resolves the entry point using `JS_BINARY__BINDIR` (`bazel-out/k8-fastbuild/bin`) instead of `BAZEL_BINDIR` (`.`), which fails on Windows CI where the tests are executed from the built `.runfiles` directory tree. Passing `--enable_runfiles` during the Windows E2E cross-build ensures the launcher script resolves the entry point from the runfiles directory.
1 parent 47bc9c3 commit 11eeeb0

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ jobs:
118118
--config=e2e \
119119
//tests:e2e.webpack_node24 \
120120
//tests:e2e.esbuild_node24 \
121-
--platforms=tools:windows_x64
121+
--platforms=tools:windows_x64 \
122+
--enable_runfiles
122123
- name: Store built Windows E2E tests
123124
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
124125
with:

‎.github/workflows/pr.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ jobs:
143143
pnpm bazel build \
144144
--config=e2e \
145145
//tests:e2e.esbuild_node24 \
146-
--platforms=tools:windows_x64
146+
--platforms=tools:windows_x64 \
147+
--enable_runfiles
147148
- name: Store built Windows E2E tests
148149
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
149150
with:

0 commit comments

Comments
 (0)