Skip to content

Commit

Permalink
Taskcluster Windows: build
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Oct 8, 2018
1 parent b5cf1f8 commit a88fb7e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
22 changes: 15 additions & 7 deletions etc/taskcluster/decision-task.py
Expand Up @@ -40,10 +40,12 @@ def main():
"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():
Expand Down Expand Up @@ -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=[
{
Expand Down Expand Up @@ -173,7 +176,7 @@ def windows_dev():
"!/tests/wpt/web-platform-tests",
"/tests/wpt/web-platform-tests/tools",
],
**build_kwargs
**windows_build_kwargs
)


Expand Down Expand Up @@ -362,6 +365,7 @@ def dockerfile_path(name):

# 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 = {
Expand All @@ -372,15 +376,19 @@ def dockerfile_path(name):
}
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()
12 changes: 12 additions & 0 deletions etc/taskcluster/windows/first-boot.ps1
Expand Up @@ -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

0 comments on commit a88fb7e

Please sign in to comment.