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

ci: use bash for Windows and build more targets in CI #8865

Merged
merged 4 commits into from
Nov 4, 2019
Merged
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
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/...