Skip to content
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

build: allow bazel build ... #22168

Closed
wants to merge 1 commit into from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions .circleci/config.yml
Expand Up @@ -74,10 +74,14 @@ jobs:
- run: ls /home/circleci/bazel_repository_cache || true
- run: bazel info release
- run: bazel run @yarn//:yarn
# Use bazel query so that we explicitly ask for all buildable targets to be built as well
# This avoids waiting for a build command to finish before running the first test
# We could use bazel query so that we explicitly ask for all buildable targets to be built as well
# This would avoid waiting for a build command to finish before running the first test
# See https://github.com/bazelbuild/bazel/issues/4257
- run: bazel query --output=label '//modules/... union //packages/... union //tools/...' | xargs bazel test
# - run: bazel query --output=label //... | xargs bazel test
# However it makes it more confusing for Angular developers who are still novice at Bazel
# So keep it simple for now
- run: bazel build //...
- run: bazel test //...

# CircleCI will allow us to go back and view/download these artifacts from past builds.
# Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts.
Expand Down
7 changes: 7 additions & 0 deletions WORKSPACE
Expand Up @@ -34,6 +34,13 @@ local_repository(
path = "node_modules/rxjs/src",
)

# Point to the integration test workspace just so that Bazel doesn't descend into it
# when expanding the //... pattern
local_repository(
name = "bazel_integration_test",
path = "integration/bazel",
)

# This commit matches the version of buildifier in angular/ngcontainer
# If you change this, also check if it matches the version in the angular/ngcontainer
# version in /.circleci/config.yml
Expand Down
8 changes: 7 additions & 1 deletion integration/run_tests.sh
Expand Up @@ -9,7 +9,13 @@ cd ${currentDir}
readonly thisDir=$(cd $(dirname $0); pwd)

# Track payload size functions
source ../scripts/ci/payload-size.sh
# TODO(alexeagle): finish migrating these to buildsize.org
if [[ -v TRAVIS ]]; then
# We don't install this by default because it contains some broken Bazel setup
# and also it's a very big dependency that we never use except on Travis.
yarn add -D firebase-tools@3.12.0
source ../scripts/ci/payload-size.sh
fi

# Workaround https://github.com/yarnpkg/yarn/issues/2165
# Yarn will cache file://dist URIs and not update Angular code
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -70,7 +70,6 @@
"diff": "^3.5.0",
"domino": "2.0.1",
"entities": "1.1.1",
"firebase-tools": "3.12.0",
"firefox-profile": "1.0.3",
"fs-extra": "4.0.2",
"glob": "7.1.2",
Expand All @@ -94,6 +93,7 @@
"minimist": "1.2.0",
"mutation-observer": "^1.0.3",
"node-uuid": "1.4.8",
"protobufjs": "5.0.0",
"protractor": "5.1.2",
"rewire": "2.5.2",
"rollup": "0.47.4",
Expand Down