Skip to content

ci: re-enable windows CI [main] #30907

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

Merged
merged 1 commit into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/shared-actions/windows-bazel-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,25 @@ runs:
steps:
- name: Initialize WSL
id: init_wsl
uses: angular/dev-infra/github-actions/setup-wsl@7f2c99469dcf64fd466abf6cb53bede791d7599d
uses: angular/dev-infra/github-actions/setup-wsl@66a623888d17a9f2f9f4558fad5b07e78dde525e
with:
wsl_firewall_interface: 'vEthernet (WSL (Hyper-V firewall))'

- name: Installing pnpm (in WSL)
run: npm install -g pnpm@9
shell: wsl-bash {0}

- name: Install node modules in WSL (re-using from previous install/cache restore)
run: |
export NVM_DIR="$HOME/.nvm"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is needed to be in every step otherwise pnpm and node are not loaded.

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Is this not installed from the bashrc?

Copy link
Collaborator Author

@alan-agius4 alan-agius4 Aug 14, 2025

Choose a reason for hiding this comment

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

I tried placing them in the rc echo "[ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\"" >> "$HOME/.bashrc" but I did not work.

Not sure what is wrong, I spent too much time on that and I gave up


cd ${{steps.init_wsl.outputs.repo_path}}
pnpm install --frozen-lockfile
shell: wsl-bash {0}

- name: Build test binary for Windows (inside WSL)
shell: wsl-bash {0}
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

cd ${{steps.init_wsl.outputs.repo_path}}
pnpm bazel \
build --config=e2e //tests/legacy-cli:${{inputs.test_target_name}} --platforms=tools:windows_x64
Expand All @@ -54,6 +56,9 @@ runs:
- name: Convert symlinks for Windows host
shell: wsl-bash {0}
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

cd ${{steps.init_wsl.outputs.repo_path}}

runfiles_dir="/mnt/c/test/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles"
Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,23 @@ jobs:
- name: Run CLI E2E tests
run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}

# Temporarily disabled due to https://github.com/Vampire/setup-wsl/issues/76.
# e2e-windows-subset:
# needs: build
# runs-on: windows-2025
# steps:
# - name: Initialize environment
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
# - name: Setup Bazel
# uses: angular/dev-infra/github-actions/bazel/setup@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
# - name: Setup Bazel RBE
# uses: angular/dev-infra/github-actions/bazel/configure-remote@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
# with:
# allow_windows_rbe: true
# - name: Run CLI E2E tests
# uses: ./.github/shared-actions/windows-bazel-test
# with:
# test_target_name: e2e_node22
# test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
e2e-windows-subset:
needs: build
runs-on: windows-2025
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@7f2c99469dcf64fd466abf6cb53bede791d7599d
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@7f2c99469dcf64fd466abf6cb53bede791d7599d
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@7f2c99469dcf64fd466abf6cb53bede791d7599d
with:
allow_windows_rbe: true
- name: Run CLI E2E tests
uses: ./.github/shared-actions/windows-bazel-test
with:
test_target_name: e2e_node22
test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"

e2e-package-managers:
needs: build
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ http_archive(

git_repository(
name = "rules_browsers",
commit = "56ef8007ea07cd1916429bca8bb523433b0e9cdc",
commit = "c9a70ad79258e2ffc498075623f9f974920a4025",
remote = "https://github.com/devversion/rules_browsers.git",
)

Expand Down
Loading