Taskcluster Windows: build

This commit is contained in:
Simon Sapin 2018-10-02 14:10:09 +02:00
parent b5cf1f87cf
commit a88fb7ed40
2 changed files with 27 additions and 7 deletions

View file

@ -40,10 +40,12 @@ build_env = {
"RUSTFLAGS": "-Dwarnings", "RUSTFLAGS": "-Dwarnings",
"CARGO_INCREMENTAL": "0", "CARGO_INCREMENTAL": "0",
"SCCACHE_IDLE_TIMEOUT": "1200", "SCCACHE_IDLE_TIMEOUT": "1200",
}
linux_build_env = dict(**build_env, **{
"CCACHE": "sccache", "CCACHE": "sccache",
"RUSTC_WRAPPER": "sccache", "RUSTC_WRAPPER": "sccache",
"SHELL": "/bin/dash", # For SpiderMonkeys build system "SHELL": "/bin/dash", # For SpiderMonkeys build system
} })
def linux_tidy_unit(): def linux_tidy_unit():
@ -109,16 +111,17 @@ def windows_dev():
sha256="b13ea68c1365098c66871f0acab7fd3daa2f2795b5e893fcbb5cd7253f2c08fa", sha256="b13ea68c1365098c66871f0acab7fd3daa2f2795b5e893fcbb5cd7253f2c08fa",
) )
return decision.create_task( return decision.create_task(
task_name="Windows x86_64: clone only (for now)", task_name="Windows x86_64: dev build + unit tests",
worker_type="servo-win2016",
script=""" script="""
python -m ensurepip python -m ensurepip
pip install virtualenv==16.0.0 pip install virtualenv==16.0.0
python mach --help
..\\rustup-init.exe --default-toolchain none -y ..\\rustup-init.exe --default-toolchain none -y
set LIB=%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\lib;%LIB% set LIB=%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\lib;%LIB%
call mach.bat build --dev
call mach.bat test-unit
""", """,
mounts=[ mounts=[
{ {
@ -173,7 +176,7 @@ def windows_dev():
"!/tests/wpt/web-platform-tests", "!/tests/wpt/web-platform-tests",
"/tests/wpt/web-platform-tests/tools", "/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 # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
cache_scopes = [ cache_scopes = [
# FIMXE: move to servo-* cache names
"docker-worker:cache:cargo-*", "docker-worker:cache:cargo-*",
] ]
build_caches = { build_caches = {
@ -372,13 +376,17 @@ build_caches = {
} }
build_kwargs = { build_kwargs = {
"max_run_time_minutes": 60, "max_run_time_minutes": 60,
"env": build_env,
} }
linux_build_kwargs = dict(**build_kwargs, **{ linux_build_kwargs = dict(**build_kwargs, **{
"worker_type": "servo-docker-worker", "worker_type": "servo-docker-worker",
"dockerfile": dockerfile_path("build"), "dockerfile": dockerfile_path("build"),
"scopes": cache_scopes, "scopes": cache_scopes,
"cache": build_caches, "cache": build_caches,
"env": linux_build_env,
})
windows_build_kwargs = dict(**build_kwargs, **{
"worker_type": "servo-win2016",
"env": build_env,
}) })

View file

@ -58,5 +58,17 @@ Start-Process C:\generic-worker\generic-worker.exe -ArgumentList (
# Start-Process C:\nssm-2.24\win64\nssm.exe -ArgumentList ` # Start-Process C:\nssm-2.24\win64\nssm.exe -ArgumentList `
# "set", "servo-ping", "AppExit", "Default", "Exit" # "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 # Now shutdown, in preparation for creating an image
shutdown -s shutdown -s