Skip to content

Commit 185ffd6

Browse files
committed
build: experiment with windows testingt push
1 parent e6deb82 commit 185ffd6

File tree

12 files changed

+64
-99
lines changed

12 files changed

+64
-99
lines changed

.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This file should be checked into version control along with the pnpm-lock.yaml file.
44
.npmrc=-1406867100
55
modules/testing/builder/package.json=973445093
6-
package.json=-1990485513
6+
package.json=1554529784
77
packages/angular/build/package.json=-1875938558
88
packages/angular/cli/package.json=-803141029
99
packages/angular/pwa/package.json=1108903917
@@ -17,6 +17,6 @@ packages/angular_devkit/schematics/package.json=673943597
1717
packages/angular_devkit/schematics_cli/package.json=774399812
1818
packages/ngtools/webpack/package.json=1021868664
1919
packages/schematics/angular/package.json=251715148
20-
pnpm-lock.yaml=543305912
20+
pnpm-lock.yaml=1923723008
2121
pnpm-workspace.yaml=-1056556036
22-
yarn.lock=-1771973873
22+
yarn.lock=590940374

.bazelrc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ test:no-sharding --flaky_test_attempts=1 --test_sharding_strategy=disabled
3333
# See https://github.com/bazelbuild/bazel/issues/4603
3434
build --symlink_prefix=dist/
3535

36-
# Disable watchfs as it causes tests to be flaky on Windows
37-
# https://github.com/angular/angular/issues/29541
38-
build --nowatchfs
39-
4036
# Turn off legacy external runfiles
4137
build --nolegacy_external_runfiles
4238

@@ -162,10 +158,6 @@ build:remote-cache --google_default_credentials
162158
# Fixes use of npm paths with spaces such as some within the puppeteer module
163159
build --experimental_inprocess_symlink_creation
164160

165-
# Enable runfiles even on Windows.
166-
# Architect resolves output files from data files, and this isn't possible without runfile support.
167-
build --enable_runfiles
168-
169161
####################################################
170162
# rules_js specific flags
171163
####################################################

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ jobs:
8787
node: 20
8888
runs-on: ${{ matrix.os }}
8989
steps:
90-
# Workaround for: https://github.com/bazel-contrib/bazel-lib/issues/968.
91-
# TODO(devversion): Remove when Aspect lib issue is fixed.
92-
- run: choco install gzip
90+
- uses: Vampire/setup-wsl@v4
9391
if: ${{matrix.os == 'windows-latest'}}
9492
- name: Initialize environment
9593
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b015169b635123c1ab9084f604e36b6342eac171

.github/workflows/pr.yml

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,22 +126,63 @@ jobs:
126126
run: yarn bazel test --define=E2E_SHARD_TOTAL=6 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}
127127

128128
e2e-windows-subset:
129-
needs: build
129+
# needs: build
130130
runs-on: windows-latest
131+
env:
132+
# See: https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows
133+
WSLENV: 'GOOGLE_APPLICATION_CREDENTIALS/p'
131134
steps:
132-
# Workaround for: https://github.com/bazel-contrib/bazel-lib/issues/968.
133-
# TODO(devversion): Remove when Aspect lib issue is fixed.
134-
- run: choco install gzip
135+
# Git checkout converts to CRLF by default. This causes the Aspect lock
136+
# files to differ. See: https://github.com/actions/checkout/issues/135.
137+
- run: |
138+
git config --system core.autocrlf false
139+
git config --system core.eol lf
135140
- name: Initialize environment
136141
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b015169b635123c1ab9084f604e36b6342eac171
137142
- name: Install node modules
138143
run: yarn install --immutable
139144
- name: Setup Bazel
140145
uses: angular/dev-infra/github-actions/bazel/setup@b015169b635123c1ab9084f604e36b6342eac171
141146
- name: Setup Bazel RBE
142-
uses: angular/dev-infra/github-actions/bazel/configure-remote@b015169b635123c1ab9084f604e36b6342eac171
147+
uses: angular/dev-infra/github-actions/bazel/configure-remote@a5e90c88a0fc012de199fe6f148c12b5476d6d1b
148+
with:
149+
# We don't want to execute remotely, but instead execute tests locally when necessary.
150+
only_cache: true
151+
152+
- name: Setup tmate session
153+
uses: mxschmitt/action-tmate@v3
154+
with:
155+
detached: true
156+
157+
- uses: Vampire/setup-wsl@v4
158+
with:
159+
additional-packages: |
160+
curl
161+
ca-certificates
162+
g++
163+
unzip
164+
zip
165+
git
166+
python3
167+
tar
168+
wsl-shell-command: bash --login -euo pipefail
169+
- name: Setup nvm
170+
shell: wsl-bash {0}
171+
run: |
172+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
173+
export NVM_DIR="$HOME/.nvm"
174+
# Note: Specify `--install` due to https://github.com/nvm-sh/nvm/issues/1985.
175+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --install
176+
- run: nvm install
177+
shell: wsl-bash {0}
178+
- name: Install node modules in WSL (re-using from previous install/cache restore)
179+
run: yarn install --immutable
180+
shell: wsl-bash {0}
181+
- run: yarn ng-dev release build-env-stamp --mode=release
182+
shell: wsl-bash {0}
143183
- name: Run CLI E2E tests
144184
run: yarn bazel test --config=e2e //tests/legacy-cli:e2e_node22 --test_filter="tests/basic/{build,rebuild}.ts" --test_arg="--esbuild"
185+
shell: wsl-bash {0}
145186

146187
e2e-package-managers:
147188
needs: build
@@ -161,7 +202,7 @@ jobs:
161202
- name: Setup Bazel
162203
uses: angular/dev-infra/github-actions/bazel/setup@b015169b635123c1ab9084f604e36b6342eac171
163204
- name: Setup Bazel RBE
164-
uses: angular/dev-infra/github-actions/bazel/configure-remote@b015169b635123c1ab9084f604e36b6342eac171
205+
uses: angular/dev-infra/github-actions/bazel/configure-remote@3bfa6d8c9861c6477a52146828382a3d5043005f
165206
- name: Run CLI E2E tests
166207
run: yarn bazel test --define=E2E_SHARD_TOTAL=3 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}
167208

WORKSPACE

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ workspace(name = "angular_cli")
22

33
DEFAULT_NODE_VERSION = "18.19.1"
44

5-
# Workaround for: https://github.com/bazel-contrib/bazel-lib/issues/968.
6-
# Override toolchain for tar on windows.
7-
register_toolchains(
8-
"//tools:windows_tar_system_toolchain",
9-
)
10-
115
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
126

137
http_archive(
@@ -74,7 +68,6 @@ NODE_18_REPO = {
7468
"18.19.1-linux_ppc64le": ("node-v18.19.1-linux-ppc64le.tar.xz", "node-v18.19.1-linux-ppc64le", "2e5812b8fc00548e2e8ab9daa88ace13974c16b6ba5595a7a50c35f848f7d432"),
7569
"18.19.1-linux_s390x": ("node-v18.19.1-linux-s390x.tar.xz", "node-v18.19.1-linux-s390x", "15106acf4c9e3aca02416dd89fb5c71af77097042455a73f9caa064c1988ead5"),
7670
"18.19.1-linux_amd64": ("node-v18.19.1-linux-x64.tar.xz", "node-v18.19.1-linux-x64", "f35f24edd4415cd609a2ebc03be03ed2cfe211d7333d55c752d831754fb849f0"),
77-
"18.19.1-windows_amd64": ("node-v18.19.1-win-x64.zip", "node-v18.19.1-win-x64", "ff08f8fe253fba9274992d7052e9d9a70141342d7b36ddbd6e84cbe823e312c6"),
7871
}
7972

8073
nodejs_register_toolchains(
@@ -102,7 +95,6 @@ nodejs_register_toolchains(
10295
"20.11.1-linux_ppc64le": ("node-v20.11.1-linux-ppc64le.tar.xz", "node-v20.11.1-linux-ppc64le", "51343cacf5cdf5c4b5e93e919d19dd373d6ef43d5f2c666eae299f26e31d08b5"),
10396
"20.11.1-linux_s390x": ("node-v20.11.1-linux-s390x.tar.xz", "node-v20.11.1-linux-s390x", "b32616b705cd0ddbb230b95c693e3d7a37becc2ced9bcadea8dc824cceed6be0"),
10497
"20.11.1-linux_amd64": ("node-v20.11.1-linux-x64.tar.xz", "node-v20.11.1-linux-x64", "d8dab549b09672b03356aa2257699f3de3b58c96e74eb26a8b495fbdc9cf6fbe"),
105-
"20.11.1-windows_amd64": ("node-v20.11.1-win-x64.zip", "node-v20.11.1-win-x64", "bc032628d77d206ffa7f133518a6225a9c5d6d9210ead30d67e294ff37044bda"),
10698
},
10799
node_version = "20.11.1",
108100
)
@@ -117,7 +109,6 @@ nodejs_register_toolchains(
117109
"22.0.0-linux_ppc64le": ("node-v22.0.0-linux-ppc64le.tar.xz", "node-v22.0.0-linux-ppc64le", "2b3fb8707a79243bfb3131312b86716ddc3855bce21bb168095b6b916798e5e9"),
118110
"22.0.0-linux_s390x": ("node-v22.0.0-linux-s390x.tar.xz", "node-v22.0.0-linux-s390x", "89a8efeeb9f94ce9ea251b8109e079c14919f4c0dc2cbc9f545ec47ef0886737"),
119111
"22.0.0-linux_amd64": ("node-v22.0.0-linux-x64.tar.xz", "node-v22.0.0-linux-x64", "9122e50f2642afd5f6078cafd1f52ede60fc464284384f05c18a04d13d07ae5a"),
120-
"22.0.0-windows_amd64": ("node-v22.0.0-win-x64.zip", "node-v22.0.0-win-x64", "32d639b47d4c0a651ff8f8d7d41a454168a3d4045be37985f9a810cf8cef6174"),
121112
},
122113
node_version = "22.0.0",
123114
)
@@ -164,7 +155,6 @@ register_toolchains(
164155
"@npm//@angular/build-tooling/bazel/git-toolchain:git_linux_toolchain",
165156
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_x86_toolchain",
166157
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_arm64_toolchain",
167-
"@npm//@angular/build-tooling/bazel/git-toolchain:git_windows_toolchain",
168158
)
169159

170160
load("@npm//@angular/build-tooling/bazel/browsers:browser_repositories.bzl", "browser_repositories")
@@ -230,8 +220,6 @@ npm_repositories()
230220

231221
http_archive(
232222
name = "aspect_rules_ts",
233-
patch_args = ["-p1"],
234-
patches = ["//tools:rules_ts_windows.patch"],
235223
sha256 = "4263532b2fb4d16f309d80e3597191a1cb2fb69c19e95d91711bd6b97874705e",
236224
strip_prefix = "rules_ts-3.5.0",
237225
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.5.0/rules_ts-v3.5.0.tar.gz",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@ampproject/remapping": "2.3.0",
4646
"@angular/animations": "19.2.0-next.2",
4747
"@angular/bazel": "https://github.com/angular/bazel-builds.git#cee20fd0958b532ee7c48a5859b682fb5573b2ce",
48-
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#a6a996a69cfc03b3fbe538f11dd24b7bc4b30592",
48+
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#d4727212a9d0f7eb63ae3116d73c769d9bd0bdc1",
4949
"@angular/cdk": "19.2.0-next.4",
5050
"@angular/common": "19.2.0-next.2",
5151
"@angular/compiler": "19.2.0-next.2",

pnpm-lock.yaml

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/BUILD.bazel

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
load("@aspect_bazel_lib//lib/private:tar_toolchain.bzl", "tar_toolchain")
21
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
32
load("//tools:defaults2.bzl", "js_binary")
43

@@ -25,18 +24,6 @@ js_binary(
2524
entry_point = "quicktype_runner.js",
2625
)
2726

28-
tar_toolchain(
29-
name = "system_tar_exec",
30-
binary = "tar_system.bat",
31-
)
32-
33-
toolchain(
34-
name = "windows_tar_system_toolchain",
35-
exec_compatible_with = ["@platforms//os:windows"],
36-
toolchain = ":system_tar_exec",
37-
toolchain_type = "@aspect_bazel_lib//lib:tar_toolchain_type",
38-
)
39-
4027
# TODO(devversion): Improve this by potentially sharing this common block.
4128
copy_file(
4229
name = "copy_worker_js",

tools/rules_ts_windows.patch

Lines changed: 0 additions & 30 deletions
This file was deleted.

tools/tar_system.bat

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)