From 6ffb14d248b10c67aec00863f7e0746e838cc062 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 10 Sep 2019 23:44:55 +0000 Subject: [PATCH] ci: Basic Windows setup Signed-off-by: Lizan Zhou --- .azure-pipelines/windows.yml | 21 +++++++++++++++++++++ ci/windows_ci_setup.ps1 | 8 ++++++++ ci/windows_ci_steps.ps1 | 1 + windows/{tools/bazel.rc => .bazelrc} | 2 ++ 4 files changed, 32 insertions(+) create mode 100644 .azure-pipelines/windows.yml create mode 100644 ci/windows_ci_setup.ps1 create mode 100644 ci/windows_ci_steps.ps1 rename windows/{tools/bazel.rc => .bazelrc} (71%) diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/windows.yml new file mode 100644 index 000000000000..8877ce28d0f8 --- /dev/null +++ b/.azure-pipelines/windows.yml @@ -0,0 +1,21 @@ +# Azure Pipelines +# TODO(lizan): Consider rolling all presubmit jobs into one file. +trigger: +- master + +jobs: +- job: Windows + timeoutInMinutes: 360 + pool: + 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_steps.ps1 + displayName: 'Run Windows CI' diff --git a/ci/windows_ci_setup.ps1 b/ci/windows_ci_setup.ps1 new file mode 100644 index 000000000000..3ed476b33c3d --- /dev/null +++ b/ci/windows_ci_setup.ps1 @@ -0,0 +1,8 @@ +# This file only installs dependencies needed in additio to Azure pipelines hosted image. +# The list of installed software can be found at: +# https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2019-Server2019-Readme.md + +mkdir "$env:TOOLS_BIN_DIR" + +$wc = New-Object System.Net.WebClient +$wc.DownloadFile("https://github.com/bazelbuild/bazelisk/releases/download/v1.0/bazelisk-windows-amd64.exe", "$env:TOOLS_BIN_DIR\bazel.exe") diff --git a/ci/windows_ci_steps.ps1 b/ci/windows_ci_steps.ps1 new file mode 100644 index 000000000000..6c8f906cb9e7 --- /dev/null +++ b/ci/windows_ci_steps.ps1 @@ -0,0 +1 @@ +bazel --bazelrc=windows\.bazelrc test @envoy_api//test/build/... diff --git a/windows/tools/bazel.rc b/windows/.bazelrc similarity index 71% rename from windows/tools/bazel.rc rename to windows/.bazelrc index 9da9954a452c..627c03d1a717 100644 --- a/windows/tools/bazel.rc +++ b/windows/.bazelrc @@ -5,3 +5,5 @@ build --define hot_restart=disabled build --define tcmalloc=disabled # Build GRPC without c-ares support -- otherwise it will not link build --define grpc_no_ares=true +build --features=compiler_param_file +build --workspace_status_command="bash bazel/get_workspace_status"