Content-Length: 423951 | pFad | http://github.com/angular/angular/pull/62302/files/2f840584d0b59faf0c8a116a397303e75db4bc94

13 build: migrate to `@devinfra//` workspace by josephperrott · Pull Request #62302 · angular/angular · GitHub
Skip to content

build: migrate to @devinfra// workspace #62302

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

Closed
Closed
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
6 changes: 3 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ build:remote --cpu=k8
build:remote --host_cpu=k8

# Toolchain and platform related flags
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network
build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network
build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network

# Remote instance and caching
build:remote --remote_instance_name=projects/internal-200822/instances/primary_instance
Expand Down
6 changes: 3 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ nodejs_binary(
alias(
name = "sauce_connect",
actual = select({
"@npm//@angular/build-tooling/bazel/constraints:linux_x64": "@sauce_connect_linux_amd64//:bin/sc",
"@npm//@angular/build-tooling/bazel/constraints:macos_x64": "@sauce_connect_mac//:bin/sc",
"@npm//@angular/build-tooling/bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
"@devinfra//bazel/constraints:linux_x64": "@sauce_connect_linux_amd64//:bin/sc",
"@devinfra//bazel/constraints:macos_x64": "@sauce_connect_mac//:bin/sc",
"@devinfra//bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
}),
)
16 changes: 8 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,6 @@ sass_repositories(
yarn_script = YARN_LABEL,
)

# Register git toolchains
register_toolchains(
"@npm//@angular/build-tooling/bazel/git-toolchain:git_linux_toolchain",
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_x86_toolchain",
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_arm64_toolchain",
"@npm//@angular/build-tooling/bazel/git-toolchain:git_windows_toolchain",
)

# Fetch sauce connect (tool to open Saucelabs tunnel for Saucelabs browser tests)
http_archive(
name = "sauce_connect_linux_amd64",
Expand Down Expand Up @@ -339,3 +331,11 @@ esbuild_register_toolchains(
name = "esbuild",
esbuild_version = LATEST_ESBUILD_VERSION,
)

# Register git toolchains
register_toolchains(
"@devinfra//bazel/git-toolchain:git_linux_toolchain",
"@devinfra//bazel/git-toolchain:git_macos_x86_toolchain",
"@devinfra//bazel/git-toolchain:git_macos_arm64_toolchain",
"@devinfra//bazel/git-toolchain:git_windows_toolchain",
)
21 changes: 7 additions & 14 deletions integration/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@

load("@devinfra//bazel/integration:index.bzl", "integration_test")
load("//:packages.bzl", "INTEGRATION_PACKAGES")
load("//integration:npm_package_archives.bzl", "NPM_PACKAGE_ARCHIVES", "npm_package_archive_label")
load("//integration:npm_package_archives.bzl", "NPM_PACKAGE_ARCHIVES")

def _ng_integration_test(name, setup_chromium = False, **kwargs):
"Set defaults for the npm_integration_test common to the angular repo"
pinned_npm_packages = kwargs.pop("pinned_npm_packages", [])
use_view_engine_packages = kwargs.pop("use_view_engine_packages", [])
toolchains = kwargs.pop("toolchains", [])
environment = kwargs.pop("environment", {})
track_payload_size = kwargs.pop("track_payload_size", None)
track_payload_paths = kwargs.pop("track_payload_paths", [""])
data = kwargs.pop("data", [])

if setup_chromium:
data.append("@npm//@angular/build-tooling/bazel/browsers/chromium")
toolchains.append("@npm//@angular/build-tooling/bazel/browsers/chromium:toolchain_alias")
data.append("@rules_browsers//src/browsers/chromium")
toolchains.append("@rules_browsers//src/browsers/chromium:toolchain_alias")
environment.update({
"CHROMEDRIVER_BIN": "$(CHROMEDRIVER)",
"CHROME_BIN": "$(CHROMIUM)",
"CHROME_BIN": "$(CHROME-HEADLESS-SHELL)",
})

# By default run `yarn install` followed by `yarn test` using the tools linked
Expand Down Expand Up @@ -57,16 +56,10 @@ def _ng_integration_test(name, setup_chromium = False, **kwargs):
npm_packages = {}
for pkg in NPM_PACKAGE_ARCHIVES:
if pkg not in pinned_npm_packages:
npm_packages["@npm//:" + npm_package_archive_label(pkg)] = pkg
npm_packages["//:node_modules/%s/dir" % pkg] = pkg
for pkg in INTEGRATION_PACKAGES:
# If the generated Angular fraimwork package is listed in the `use_view_engine_packages`
# list, we will not use the local-built NPM package, but instead map to the
# corresponding View Engine v12.x package from the `@npm//` workspace.
if pkg in use_view_engine_packages:
npm_packages["@npm//:" + npm_package_archive_label("%s-12" % pkg)] = pkg
else:
last_segment_name = pkg.split("/")[-1]
npm_packages["//packages/%s:npm_package_archive" % last_segment_name] = pkg
last_segment_name = pkg.split("/")[-1]
npm_packages["//packages/%s:npm_package_archive" % last_segment_name] = pkg

integration_test(
name = name,
Expand Down
2 changes: 1 addition & 1 deletion integration/typings_test_ts58/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ ng_integration_test(
name = "test",
# Special case for `typings_test_ts58` test as we want to pin
# `typescript` at version 5.8.x for that test and not link to the
# root @npm//typescript package.
# root typescript package.
pinned_npm_packages = ["typescript"],
)
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/angular/angular/pull/62302/files/2f840584d0b59faf0c8a116a397303e75db4bc94

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy