From a88fb7ed4013c7c5e01299ef3042a6d082cdf714 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Oct 2018 14:10:09 +0200 Subject: [PATCH] Taskcluster Windows: build --- etc/taskcluster/decision-task.py | 22 +++++++++++++++------- etc/taskcluster/windows/first-boot.ps1 | 12 ++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/etc/taskcluster/decision-task.py b/etc/taskcluster/decision-task.py index 12cd7a9be67..de44401eb38 100644 --- a/etc/taskcluster/decision-task.py +++ b/etc/taskcluster/decision-task.py @@ -40,10 +40,12 @@ build_env = { "RUSTFLAGS": "-Dwarnings", "CARGO_INCREMENTAL": "0", "SCCACHE_IDLE_TIMEOUT": "1200", +} +linux_build_env = dict(**build_env, **{ "CCACHE": "sccache", "RUSTC_WRAPPER": "sccache", "SHELL": "/bin/dash", # For SpiderMonkey’s build system -} +}) def linux_tidy_unit(): @@ -109,16 +111,17 @@ def windows_dev(): sha256="b13ea68c1365098c66871f0acab7fd3daa2f2795b5e893fcbb5cd7253f2c08fa", ) return decision.create_task( - task_name="Windows x86_64: clone only (for now)", - worker_type="servo-win2016", + task_name="Windows x86_64: dev build + unit tests", script=""" python -m ensurepip pip install virtualenv==16.0.0 - python mach --help + ..\\rustup-init.exe --default-toolchain none -y set LIB=%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\lib;%LIB% + call mach.bat build --dev + call mach.bat test-unit """, mounts=[ { @@ -173,7 +176,7 @@ def windows_dev(): "!/tests/wpt/web-platform-tests", "/tests/wpt/web-platform-tests/tools", ], - **build_kwargs + **windows_build_kwargs ) @@ -362,6 +365,7 @@ decision = DecisionTask( # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches cache_scopes = [ + # FIMXE: move to servo-* cache names "docker-worker:cache:cargo-*", ] build_caches = { @@ -372,15 +376,19 @@ build_caches = { } build_kwargs = { "max_run_time_minutes": 60, - "env": build_env, } linux_build_kwargs = dict(**build_kwargs, **{ "worker_type": "servo-docker-worker", "dockerfile": dockerfile_path("build"), "scopes": cache_scopes, "cache": build_caches, + "env": linux_build_env, +}) +windows_build_kwargs = dict(**build_kwargs, **{ + "worker_type": "servo-win2016", + "env": build_env, }) if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/etc/taskcluster/windows/first-boot.ps1 b/etc/taskcluster/windows/first-boot.ps1 index e4986c4ddc3..be330cdf3a0 100644 --- a/etc/taskcluster/windows/first-boot.ps1 +++ b/etc/taskcluster/windows/first-boot.ps1 @@ -58,5 +58,17 @@ Start-Process C:\generic-worker\generic-worker.exe -ArgumentList ( # Start-Process C:\nssm-2.24\win64\nssm.exe -ArgumentList ` # "set", "servo-ping", "AppExit", "Default", "Exit" + +# Visual C++ Build Tools +# https://blogs.msdn.microsoft.com/vcblog/2016/11/16/introducing-the-visual-studio-build-tools/ +$client.DownloadFile("https://aka.ms/vs/15/release/vs_buildtools.exe", "C:\vs_buildtools.exe") +Start-Process C:\vs_buildtools.exe -ArgumentList (` + "--passive --norestart --includeRecommended " + + "--add Microsoft.VisualStudio.Workload.VCTools " + + "--add Microsoft.VisualStudio.Component.VC.ATL " + + "--add Microsoft.VisualStudio.Component.VC.ATLMFC" + ) -Wait + + # Now shutdown, in preparation for creating an image shutdown -s \ No newline at end of file