Add CI job for clang-cl on Windows
This should catch issues like #801. This uses the new `tasks` syntax to define multiple Windows tasks: https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/README.md#basic-syntax
This commit is contained in:
parent
a8e0007e96
commit
c4ca519a86
@ -1,6 +1,8 @@
|
|||||||
---
|
---
|
||||||
platforms:
|
tasks:
|
||||||
ubuntu1804:
|
ubuntu1804:
|
||||||
|
name: "Ubuntu 18.04"
|
||||||
|
platform: ubuntu1804
|
||||||
build_flags:
|
build_flags:
|
||||||
- "--features=layering_check"
|
- "--features=layering_check"
|
||||||
- "--copt=-Werror"
|
- "--copt=-Werror"
|
||||||
@ -12,6 +14,8 @@ platforms:
|
|||||||
test_targets:
|
test_targets:
|
||||||
- "//..."
|
- "//..."
|
||||||
macos:
|
macos:
|
||||||
|
name: "macOS: latest Xcode"
|
||||||
|
platform: macos
|
||||||
build_flags:
|
build_flags:
|
||||||
- "--features=layering_check"
|
- "--features=layering_check"
|
||||||
- "--copt=-Werror"
|
- "--copt=-Werror"
|
||||||
@ -22,8 +26,9 @@ platforms:
|
|||||||
- "--copt=-Werror"
|
- "--copt=-Werror"
|
||||||
test_targets:
|
test_targets:
|
||||||
- "//..."
|
- "//..."
|
||||||
windows:
|
windows-msvc:
|
||||||
# Optional: use VS 2017 instead of 2015.
|
name: "Windows: MSVC 2017"
|
||||||
|
platform: windows
|
||||||
environment:
|
environment:
|
||||||
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC"
|
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC"
|
||||||
build_flags:
|
build_flags:
|
||||||
@ -36,3 +41,24 @@ platforms:
|
|||||||
- "--copt=/WX"
|
- "--copt=/WX"
|
||||||
test_targets:
|
test_targets:
|
||||||
- "//..."
|
- "//..."
|
||||||
|
windows-clang-cl:
|
||||||
|
name: "Windows: Clang"
|
||||||
|
platform: windows
|
||||||
|
environment:
|
||||||
|
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC"
|
||||||
|
build_flags:
|
||||||
|
- "--incompatible_enable_cc_toolchain_resolution"
|
||||||
|
- "--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl"
|
||||||
|
- "--extra_execution_platforms=//:x64_windows-clang-cl"
|
||||||
|
- "--features=layering_check"
|
||||||
|
- "--copt=/WX"
|
||||||
|
build_targets:
|
||||||
|
- "//..."
|
||||||
|
test_flags:
|
||||||
|
- "--incompatible_enable_cc_toolchain_resolution"
|
||||||
|
- "--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl"
|
||||||
|
- "--extra_execution_platforms=//:x64_windows-clang-cl"
|
||||||
|
- "--features=layering_check"
|
||||||
|
- "--copt=/WX"
|
||||||
|
test_targets:
|
||||||
|
- "//..."
|
||||||
|
|||||||
19
BUILD.bazel
19
BUILD.bazel
@ -1,7 +1,22 @@
|
|||||||
licenses(['notice'])
|
licenses(["notice"])
|
||||||
|
|
||||||
exports_files(["COPYING"])
|
exports_files(["COPYING"])
|
||||||
|
|
||||||
load(':bazel/glog.bzl', 'glog_library')
|
load(":bazel/glog.bzl", "glog_library")
|
||||||
|
|
||||||
glog_library()
|
glog_library()
|
||||||
|
|
||||||
|
# platform() to build with clang-cl on Bazel CI. This is enabled with
|
||||||
|
# the flags in .bazelci/presubmit.yml:
|
||||||
|
#
|
||||||
|
# --incompatible_enable_cc_toolchain_resolution
|
||||||
|
# --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
|
||||||
|
# --extra_execution_platforms=//:x64_windows-clang-cl
|
||||||
|
platform(
|
||||||
|
name = "x64_windows-clang-cl",
|
||||||
|
constraint_values = [
|
||||||
|
"@platforms//cpu:x86_64",
|
||||||
|
"@platforms//os:windows",
|
||||||
|
"@bazel_tools//tools/cpp:clang-cl",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user