Revert "Remove win_vulkan_sdk."
This reverts commit 876dc81f2a7711d8c33773fd92488182cfd47614.
Reason for revert: Breaking everything
Original change's description:
> Remove win_vulkan_sdk.
>
> We only needed this for the Vulkan headers, which we now have in
> src/third_party.
>
> Change-Id: I453ed73c73b3304520b628527102607d848bcd37
> Reviewed-on: https://skia-review.googlesource.com/c/180775
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Auto-Submit: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,benjaminwagner@google.com
Change-Id: I0ae35fddfc112631a47db9775d790f999abf26f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/180779
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
diff --git a/infra/bots/assets/win_vulkan_sdk/README.md b/infra/bots/assets/win_vulkan_sdk/README.md
new file mode 100644
index 0000000..1175790
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/README.md
@@ -0,0 +1,7 @@
+To create the vulkan sdk asset:
+
+Install the vulkan sdk from https://vulkan.lunarg.com/signin on a windows machine
+
+The default install dir is C:\VulkanSDK\VERSION
+
+When uploading the CIPD asset, use -s C:\VulkanSDK\VERSION
diff --git a/infra/bots/assets/win_vulkan_sdk/VERSION b/infra/bots/assets/win_vulkan_sdk/VERSION
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/VERSION
@@ -0,0 +1 @@
+7
diff --git a/infra/bots/assets/win_vulkan_sdk/common.py b/infra/bots/assets/win_vulkan_sdk/common.py
new file mode 100755
index 0000000..4920c9b
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/common.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Common vars used by scripts in this directory."""
+
+
+import os
+import sys
+
+FILE_DIR = os.path.dirname(os.path.abspath(__file__))
+INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))
+
+sys.path.insert(0, INFRA_BOTS_DIR)
+from assets import assets
+
+ASSET_NAME = os.path.basename(FILE_DIR)
+
+
+def run(cmd):
+ """Run a command, eg. "upload" or "download". """
+ assets.main([cmd, ASSET_NAME] + sys.argv[1:])
diff --git a/infra/bots/assets/win_vulkan_sdk/create.py b/infra/bots/assets/win_vulkan_sdk/create.py
new file mode 100644
index 0000000..0728f6d
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/create.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Create the asset."""
+
+
+import argparse
+import shutil
+import sys
+import os
+
+
+def create_asset(target_dir, sdk_path):
+ """Create the asset."""
+ # The bots only need Include from the SDK.
+ target_include_dir = os.path.join(target_dir, "Include")
+ sdk_include_dir = os.path.join(sdk_path, "Include")
+ if not os.path.isdir(target_dir):
+ os.makedirs(target_dir)
+ shutil.copytree(sdk_include_dir, target_include_dir)
+
+def main():
+ if sys.platform != 'win32':
+ print >> sys.stderr, 'This script only runs on Windows.'
+ sys.exit(1)
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--target_dir', '-t', required=True)
+ parser.add_argument('--sdk_path', '-s', required=True)
+ args = parser.parse_args()
+ create_asset(args.target_dir, args.sdk_path)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/infra/bots/assets/win_vulkan_sdk/create_and_upload.py b/infra/bots/assets/win_vulkan_sdk/create_and_upload.py
new file mode 100644
index 0000000..69dbec9
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/create_and_upload.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Create the asset and upload it."""
+
+
+import argparse
+import common
+import os
+import subprocess
+import sys
+import utils
+
+
+def main():
+ if sys.platform != 'win32':
+ print >> sys.stderr, 'This script only runs on Windows.'
+ sys.exit(1)
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--gsutil')
+ parser.add_argument('--sdk_path', '-s', required=True)
+ args = parser.parse_args()
+
+ with utils.tmp_dir():
+ cwd = os.getcwd()
+ create_script = os.path.join(common.FILE_DIR, 'create.py')
+ upload_script = os.path.join(common.FILE_DIR, 'upload.py')
+
+ try:
+ cwd = os.path.join(cwd, 'sdk')
+ cmd = ['python', create_script,
+ '-t', cwd,
+ '--sdk_path', args.sdk_path]
+ subprocess.check_call(cmd)
+ cmd = ['python', upload_script, '-t', cwd]
+ if args.gsutil:
+ cmd.extend(['--gsutil', args.gsutil])
+ subprocess.check_call(cmd)
+ except subprocess.CalledProcessError:
+ # Trap exceptions to avoid printing two stacktraces.
+ sys.exit(1)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/infra/bots/assets/win_vulkan_sdk/download.py b/infra/bots/assets/win_vulkan_sdk/download.py
new file mode 100755
index 0000000..96cc87d
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/download.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Download the current version of the asset."""
+
+
+import common
+
+
+if __name__ == '__main__':
+ common.run('download')
diff --git a/infra/bots/assets/win_vulkan_sdk/upload.py b/infra/bots/assets/win_vulkan_sdk/upload.py
new file mode 100755
index 0000000..ba7fc8b
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/upload.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Upload a new version of the asset."""
+
+
+import common
+
+
+if __name__ == '__main__':
+ common.run('upload')
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index d5137d3..b7262e5 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -30,15 +30,16 @@
)
const (
- BUNDLE_RECIPES_NAME = "Housekeeper-PerCommit-BundleRecipes"
- ISOLATE_GCLOUD_LINUX_NAME = "Housekeeper-PerCommit-IsolateGCloudLinux"
- ISOLATE_GO_DEPS_NAME = "Housekeeper-PerCommit-IsolateGoDeps"
- ISOLATE_SKIMAGE_NAME = "Housekeeper-PerCommit-IsolateSkImage"
- ISOLATE_SKP_NAME = "Housekeeper-PerCommit-IsolateSKP"
- ISOLATE_SVG_NAME = "Housekeeper-PerCommit-IsolateSVG"
- ISOLATE_NDK_LINUX_NAME = "Housekeeper-PerCommit-IsolateAndroidNDKLinux"
- ISOLATE_SDK_LINUX_NAME = "Housekeeper-PerCommit-IsolateAndroidSDKLinux"
- ISOLATE_WIN_TOOLCHAIN_NAME = "Housekeeper-PerCommit-IsolateWinToolchain"
+ BUNDLE_RECIPES_NAME = "Housekeeper-PerCommit-BundleRecipes"
+ ISOLATE_GCLOUD_LINUX_NAME = "Housekeeper-PerCommit-IsolateGCloudLinux"
+ ISOLATE_GO_DEPS_NAME = "Housekeeper-PerCommit-IsolateGoDeps"
+ ISOLATE_SKIMAGE_NAME = "Housekeeper-PerCommit-IsolateSkImage"
+ ISOLATE_SKP_NAME = "Housekeeper-PerCommit-IsolateSKP"
+ ISOLATE_SVG_NAME = "Housekeeper-PerCommit-IsolateSVG"
+ ISOLATE_NDK_LINUX_NAME = "Housekeeper-PerCommit-IsolateAndroidNDKLinux"
+ ISOLATE_SDK_LINUX_NAME = "Housekeeper-PerCommit-IsolateAndroidSDKLinux"
+ ISOLATE_WIN_TOOLCHAIN_NAME = "Housekeeper-PerCommit-IsolateWinToolchain"
+ ISOLATE_WIN_VULKAN_SDK_NAME = "Housekeeper-PerCommit-IsolateWinVulkanSDK"
DEFAULT_OS_DEBIAN = "Debian-9.4"
DEFAULT_OS_LINUX_GCE = DEFAULT_OS_DEBIAN
@@ -730,6 +731,10 @@
cipdPkg: "win_toolchain",
path: "win_toolchain",
},
+ ISOLATE_WIN_VULKAN_SDK_NAME: {
+ cipdPkg: "win_vulkan_sdk",
+ path: "win_vulkan_sdk",
+ },
}
// isolateCIPDAsset generates a task to isolate the given CIPD asset.
@@ -878,6 +883,9 @@
if strings.Contains(name, "Clang") {
task.CipdPackages = append(task.CipdPackages, b.MustGetCipdPackageFromAsset("clang_win"))
}
+ if strings.Contains(name, "Vulkan") {
+ task.Dependencies = append(task.Dependencies, isolateCIPDAsset(b, ISOLATE_WIN_VULKAN_SDK_NAME))
+ }
if strings.Contains(name, "OpenCL") {
task.CipdPackages = append(task.CipdPackages,
b.MustGetCipdPackageFromAsset("opencl_headers"),
diff --git a/infra/bots/recipe_modules/build/default.py b/infra/bots/recipe_modules/build/default.py
index fe7788d..d22a12c 100644
--- a/infra/bots/recipe_modules/build/default.py
+++ b/infra/bots/recipe_modules/build/default.py
@@ -59,6 +59,7 @@
clang_linux = str(api.vars.slave_dir.join('clang_linux'))
linux_vulkan_sdk = str(api.vars.slave_dir.join('linux_vulkan_sdk'))
win_toolchain = str(api.vars.slave_dir.join('win_toolchain'))
+ win_vulkan_sdk = str(api.vars.slave_dir.join('win_vulkan_sdk'))
moltenvk = str(api.vars.slave_dir.join('moltenvk'))
cc, cxx = None, None
@@ -212,6 +213,8 @@
args['skia_enable_vulkan_debug_layers'] = 'false'
if api.vars.is_linux:
args['skia_vulkan_sdk'] = '"%s"' % linux_vulkan_sdk
+ if 'Win' in os:
+ args['skia_vulkan_sdk'] = '"%s"' % win_vulkan_sdk
if 'MoltenVK' in extra_tokens:
args['skia_moltenvk_path'] = '"%s"' % moltenvk
if 'Metal' in extra_tokens:
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
index 1e939a6..66e5d4f 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
@@ -32,7 +32,7 @@
"[START_DIR]/cache/work/skia/bin/gn",
"gen",
"[START_DIR]/cache/work/skia/out/Build-Win-Clang-x86_64-Release-Vulkan/Release_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_enable_vulkan_debug_layers=false target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/win_toolchain/win_sdk\" win_vc=\"[START_DIR]/win_toolchain/VC\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/win_toolchain/win_sdk\" win_vc=\"[START_DIR]/win_toolchain/VC\""
],
"cwd": "[START_DIR]/cache/work/skia",
"env": {
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 445c990..36ca9a8 100755
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -16357,7 +16357,8 @@
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
- "Housekeeper-PerCommit-IsolateWinToolchain"
+ "Housekeeper-PerCommit-IsolateWinToolchain",
+ "Housekeeper-PerCommit-IsolateWinVulkanSDK"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
@@ -16901,7 +16902,8 @@
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
- "Housekeeper-PerCommit-IsolateWinToolchain"
+ "Housekeeper-PerCommit-IsolateWinToolchain",
+ "Housekeeper-PerCommit-IsolateWinVulkanSDK"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
@@ -17687,7 +17689,8 @@
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
- "Housekeeper-PerCommit-IsolateWinToolchain"
+ "Housekeeper-PerCommit-IsolateWinToolchain",
+ "Housekeeper-PerCommit-IsolateWinVulkanSDK"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
@@ -17949,7 +17952,8 @@
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
- "Housekeeper-PerCommit-IsolateWinToolchain"
+ "Housekeeper-PerCommit-IsolateWinToolchain",
+ "Housekeeper-PerCommit-IsolateWinVulkanSDK"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
@@ -20070,6 +20074,29 @@
],
"isolate": "empty.isolate"
},
+ "Housekeeper-PerCommit-IsolateWinVulkanSDK": {
+ "cipd_packages": [
+ {
+ "name": "skia/bots/win_vulkan_sdk",
+ "path": "win_vulkan_sdk",
+ "version": "version:7"
+ }
+ ],
+ "command": [
+ "/bin/cp",
+ "-rL",
+ "win_vulkan_sdk",
+ "${ISOLATED_OUTDIR}"
+ ],
+ "dimensions": [
+ "cpu:x86-64-Haswell_GCE",
+ "gpu:none",
+ "machine_type:n1-highmem-2",
+ "os:Debian-9.4",
+ "pool:Skia"
+ ],
+ "isolate": "empty.isolate"
+ },
"Housekeeper-Weekly-RecreateSKPs": {
"caches": [
{