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

Define native Chrome/Windows. #179

Merged
merged 1 commit into from
Sep 11, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions browsers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ config_setting(
visibility = ["//:__subpackages__"],
)

config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
visibility = ["//:__subpackages__"],
)

browser(
name = "firefox-external",
metadata = "firefox-external.json",
Expand Down Expand Up @@ -69,6 +75,7 @@ browser(
environment = select({
":linux": None,
":mac": {"DISABLE_X_DISPLAY": "1"},
":windows": {"DISABLE_X_DISPLAY": "1"},
}),
metadata = "chromium-native.json",
required_tags = [
Expand Down
8 changes: 8 additions & 0 deletions third_party/chromium/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ config_setting(
values = {"cpu": "k8"},
)

config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
)

web_test_archive(
name = "chromium",
archive = "@org_chromium_chromium//file",
Expand All @@ -45,5 +50,8 @@ web_test_archive(
":mac": {
"CHROME": "chrome-mac/Chromium.app/Contents/MacOS/chromium",
},
":windows": {
"CHROME": "chrome-win32/chrome.exe",
},
}),
)
5 changes: 5 additions & 0 deletions web/internal/platform_http_file.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def _impl(repository_ctx):
if repository_ctx.os.name.lower().startswith("mac os"):
urls = repository_ctx.attr.macos_urls
sha256 = repository_ctx.attr.macos_sha256
elif repository_ctx.os.name.lower().startswith("windows"):
urls = repository_ctx.attr.windows_urls
sha256 = repository_ctx.attr.windows_sha256
else:
urls = repository_ctx.attr.amd64_urls
sha256 = repository_ctx.attr.amd64_sha256
Expand All @@ -42,4 +45,6 @@ platform_http_file = repository_rule(
"amd64_sha256": attr.string(),
"macos_urls": attr.string_list(),
"macos_sha256": attr.string(),
"windows_urls": attr.string_list(),
"windows_sha256": attr.string(),
})
10 changes: 10 additions & 0 deletions web/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ def org_chromium_chromedriver():
"6c30bba7693ec2d9af7cd9a54729e10aeae85c0953c816d9c4a40a1a72fd8be0",
macos_urls=[
"http://chromedriver.storage.googleapis.com/2.29/chromedriver_mac64.zip"
],
windows_sha256=
"d04084021ddd87400e9eddbee8648c97d429f038f54fe06b279584eee441a4b1",
windows_urls=[
"http://chromedriver.storage.googleapis.com/2.29/chromedriver_win32.zip"
])


Expand All @@ -425,6 +430,11 @@ def org_chromium_chromium():
"740d691b07855e2aace1e524fd67b8732458e52cc8fca0b4c1bddbbb3aa9ee11",
macos_urls=[
"http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/454475/chrome-mac.zip"
],
windows_sha256=
"1093602bb16a2a68bdd9b6dba1d3a998b2a6bfbdf3a0afff613c38a960e37d9c",
windows_urls=[
"http://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/454494/chrome-win32.zip"
])


Expand Down