diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 5afb77b97b20..ffa38e11198d 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -393,6 +393,12 @@ stages: BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey) + - task: PublishTestResults@2 + inputs: + testResultsFiles: "**/bazel-out/**/testlogs/**/test.xml" + testRunTitle: "windows" + searchFolder: $(Build.StagingDirectory)/tmp + condition: always() - task: PublishBuildArtifacts@1 inputs: pathtoPublish: "$(Build.StagingDirectory)/envoy" diff --git a/bazel/README.md b/bazel/README.md index 35f0906a1765..50379a6efd0a 100644 --- a/bazel/README.md +++ b/bazel/README.md @@ -126,14 +126,19 @@ for how to update or override dependencies. Install bazelisk in the PATH using the `bazel.exe` executable name as described above in the first section. When building Envoy, Bazel creates very long path names. One way to work around these excessive path - lengths is to change the output base directory for bazel to a very short root path. The CI pipeline - for Windows uses `C:\_eb` as the bazel base path. This and other preferences should be set up by placing + lengths is to change the output base directory for bazel to a very short root path. An example Bazel configuration + to help with this is to use `C:\_eb` as the bazel base path. This and other preferences should be set up by placing the following bazelrc configuration line in a system `%ProgramData%\bazel.bazelrc` file or the individual user's `%USERPROFILE%\.bazelrc` file (rather than including it on every bazel command line): + ``` startup --output_base=C:/_eb ``` + Another option to shorten the the output root for Bazel is to set the `USERNAME` environment variable in your shell + session to a short value. Bazel uses this value when constructing its output root path if no explicit `--output_base` + is set. + Bazel also creates file symlinks when building Envoy. It's strongly recommended to enable file symlink support using [Bazel's instructions](https://docs.bazel.build/versions/master/windows.html#enable-symlink-support). For other common issues, see the diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index ff77a9ea1465..91e5cf39cfa3 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -42,7 +42,7 @@ export TEST_TMPDIR=${BUILD_DIR}/tmp [[ "${BUILD_REASON}" != "PullRequest" ]] && BAZEL_EXTRA_TEST_OPTIONS+=(--nocache_test_results) -BAZEL_STARTUP_OPTIONS+=("--output_base=c:/_eb") +BAZEL_STARTUP_OPTIONS+=("--output_base=${TEST_TMPDIR/\/c/c:}") BAZEL_BUILD_OPTIONS=( -c opt --show_task_finish