Skip to content

Commit

Permalink
ci: use bash for Windows and build more targets in CI (#8865)
Browse files Browse the repository at this point in the history
* ci: use bash for Windows and build more targets

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
  • Loading branch information
lizan committed Nov 4, 2019
1 parent d5aab08 commit a3bc473
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .azure-pipelines/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
- job: Windows
timeoutInMinutes: 360
pool:
vmImage: 'windows-latest'
vmImage: "windows-latest"

steps:
- powershell: |
.\ci\windows_ci_setup.ps1
Write-Host "##vso[task.prependpath]$env:TOOLS_BIN_DIR"
displayName: 'Install dependencies'
env:
TOOLS_BIN_DIR: $(Pipeline.Workspace)\bin
- powershell: |
.\ci\windows_ci_setup.ps1
Write-Host "##vso[task.prependpath]$env:TOOLS_BIN_DIR"
displayName: "Install dependencies"
env:
TOOLS_BIN_DIR: $(Pipeline.Workspace)\bin
- powershell: .\ci\windows_ci_steps.ps1
displayName: 'Run Windows CI'
- bash: ci/windows_ci_steps.sh
displayName: "Run Windows CI"
5 changes: 4 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ build --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
build --action_env=BAZEL_LINKOPTS=-lm
build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11
build --javabase=@bazel_tools//tools/jdk:remote_jdk11
build --copt=-fPIC
build --enable_platform_specific_config

# Enable position independent code, this option is not supported on Windows and default on on macOS.
build:linux --copt=-fPIC

# We already have absl in the build, define absl=1 to tell googletest to use absl for backtrace.
build --define absl=1
Expand Down
1 change: 1 addition & 0 deletions bazel/envoy_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def _envoy_linkopts():
],
}) + select({
"@envoy//bazel:boringssl_fips": [],
"@envoy//bazel:windows_x86_64": [],
"//conditions:default": ["-pie"],
}) + _envoy_select_exported_symbols(["-Wl,-E"])

Expand Down
1 change: 0 additions & 1 deletion ci/windows_ci_steps.ps1

This file was deleted.

22 changes: 22 additions & 0 deletions ci/windows_ci_steps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# No hashbang here because this script is intended for Windows

set -e

function finish {
echo "disk space at end of build:"
df -h
}
trap finish EXIT

echo "disk space at beginning of build:"
df -h

. "$(dirname "$0")"/setup_cache.sh

BAZEL_STARTUP_OPTIONS="--bazelrc=windows/.bazelrc"
BAZEL_BUILD_OPTIONS="--show_task_finish --verbose_failures \
--test_output=all ${BAZEL_BUILD_EXTRA_OPTIONS} ${BAZEL_EXTRA_TEST_OPTIONS}"

bazel ${BAZEL_STARTUP_OPTIONS} build ${BAZEL_BUILD_OPTIONS} //bazel/foreign_cc:nghttp2 //bazel/foreign_cc:event //bazel/foreign_cc:yaml

bazel ${BAZEL_STARTUP_OPTIONS} test ${BAZEL_BUILD_OPTIONS} @envoy_api//test/build/...

0 comments on commit a3bc473

Please sign in to comment.