try: -b do -p win32,win64 -u none -t none
authorRob Thijssen <rthijssen@mozilla.com>
Fri, 20 May 2016 12:36:22 +0100
changeset 766023 f7557791169080bccae621875d43248ba2c3dd01
parent 765663 c67dc1f9fab86d4f2cf3224307809c44fe3ce820
child 988867 b06d114094025864ae373721d9e6a1d4195be1f1
push id125854
push userrthijssen@mozilla.com
push dateFri, 20 May 2016 11:52:39 +0000
treeherdertry@f75577911690 [default view] [failures only]
milestone49.0a1
try: -b do -p win32,win64 -u none -t none
python/mozbuild/mozbuild/frontend/reader.py
taskcluster/mach_commands.py
taskcluster/taskgraph/kind/legacy.py
testing/mozharness/configs/builds/build_pool_specifics.py
testing/mozharness/configs/builds/taskcluster_base_windows_32_builds.py
testing/mozharness/configs/builds/taskcluster_base_windows_64_builds.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
testing/taskcluster/taskcluster_graph/image_builder.py
testing/taskcluster/tasks/branches/base_job_flags.yml
testing/taskcluster/tasks/branches/base_jobs.yml
testing/taskcluster/tasks/branches/try/job_flags.yml
testing/taskcluster/tasks/build.yml
testing/taskcluster/tasks/builds/b2g_base.yml
testing/taskcluster/tasks/builds/base_linux32.yml
testing/taskcluster/tasks/builds/base_linux64.yml
testing/taskcluster/tasks/builds/base_macosx64.yml
testing/taskcluster/tasks/builds/base_win32.yml
testing/taskcluster/tasks/builds/base_win64.yml
testing/taskcluster/tasks/builds/dbg_win32.yml
testing/taskcluster/tasks/builds/dbg_win64.yml
testing/taskcluster/tasks/builds/firefox_base.yml
testing/taskcluster/tasks/builds/firefox_docker_base.yml
testing/taskcluster/tasks/builds/firefox_windows_base.yml
testing/taskcluster/tasks/builds/haz_linux.yml
testing/taskcluster/tasks/builds/haz_shell_linux.yml
testing/taskcluster/tasks/builds/mobile_base.yml
testing/taskcluster/tasks/builds/opt_win32.yml
testing/taskcluster/tasks/builds/opt_win64.yml
testing/taskcluster/tasks/builds/sm_base.yml
testing/taskcluster/tasks/docker_build.yml
testing/taskcluster/tasks/windows_build.yml
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -148,23 +148,25 @@ def is_read_allowed(path, config):
     to hook into our build system.
     """
     assert os.path.isabs(path)
     assert os.path.isabs(config.topsrcdir)
 
     path = mozpath.normpath(path)
     topsrcdir = mozpath.normpath(config.topsrcdir)
 
-    if mozpath.basedir(path, [topsrcdir]):
+    nc_path = os.path.normcase(path)
+    nc_topsrcdir = os.path.normcase(topsrcdir)
+
+    if mozpath.basedir(nc_path, [nc_topsrcdir]):
         return True
 
     if config.external_source_dir:
-        external_dir = os.path.normcase(config.external_source_dir)
-        norm_path = os.path.normcase(path)
-        if mozpath.basedir(norm_path, [external_dir]):
+        nc_external_source_dir = os.path.normcase(config.external_source_dir)
+        if mozpath.basedir(nc_path, [nc_external_source_dir]):
             return True
 
     return False
 
 
 class SandboxCalledError(SandboxError):
     """Represents an error resulting from calling the error() function."""
 
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -1,17 +1,16 @@
 # -*- coding: utf-8 -*-
 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
-import logging
 import sys
 import traceback
 
 from mach.decorators import (
     CommandArgument,
     CommandProvider,
     Command,
     SubCommand,
@@ -23,20 +22,16 @@ from mozbuild.base import MachCommandBas
 class ShowTaskGraphSubCommand(SubCommand):
     """A SubCommand with TaskGraph-specific arguments"""
 
     def __call__(self, func):
         after = SubCommand.__call__(self, func)
         args = [
             CommandArgument('--root', '-r', default='taskcluster/ci',
                             help="root of the taskgraph definition relative to topsrcdir"),
-            CommandArgument('--quiet', '-q', action="store_true",
-                            help="suppress all logging output"),
-            CommandArgument('--verbose', '-v', action="store_true",
-                            help="include debug-level logging output"),
             CommandArgument('--parameters', '-p', required=True,
                             help="parameters file (.yml or .json; see "
                                  "`taskcluster/docs/parameters.rst`)`"),
             CommandArgument('--no-optimize', dest="optimize", action="store_false",
                             default="true",
                             help="do not remove tasks from the graph that are found in the "
                             "index (a.k.a. optimize the graph)"),
         ]
@@ -137,56 +132,36 @@ class MachCommands(MachCommandBase):
         """Run the decision task: generate a task graph and submit to
         TaskCluster.  This is only meant to be called within decision tasks,
         and requires a great many arguments.  Commands like `mach taskgraph
         optimized` are better suited to use on the command line, and can take
         the parameters file generated by a decision task.  """
 
         import taskgraph.decision
         try:
-            self.setup_logging()
-            return taskgraph.decision.taskgraph_decision(options)
+            return taskgraph.decision.taskgraph_decision(self.log, options)
         except Exception as e:
             traceback.print_exc()
             sys.exit(1)
 
-
-    def setup_logging(self, quiet=False, verbose=True):
-        """
-        Set up Python logging for all loggers, sending results to stderr (so
-        that command output can be redirected easily) and adding the typical
-        mach timestamp.
-        """
-        # remove the old terminal handler
-        self.log_manager.replace_terminal_handler(None)
-
-        # re-add it, with level and fh set appropriately
-        if not quiet:
-            level = logging.DEBUG if verbose else logging.INFO
-            self.log_manager.add_terminal_logging(fh=sys.stderr, level=level)
-
-        # all of the taskgraph logging is unstructured logging
-        self.log_manager.enable_unstructured()
-        
-
     def show_taskgraph(self, graph_attr, options):
         import taskgraph.parameters
         import taskgraph.target_tasks
         import taskgraph.generator
 
         try:
-            self.setup_logging(quiet=options['quiet'], verbose=options['verbose'])
             parameters = taskgraph.parameters.load_parameters_file(options)
 
             target_tasks_method = parameters.get('target_tasks_method', 'all_tasks')
             target_tasks_method = taskgraph.target_tasks.get_method(target_tasks_method)
             tgg = taskgraph.generator.TaskGraphGenerator(
                 root_dir=options['root'],
+                log=self.log,
                 parameters=parameters,
                 target_tasks_method=target_tasks_method)
 
             tg = getattr(tgg, graph_attr)
 
             for label in tg.graph.visit_postorder():
                 print(tg.tasks[label])
         except Exception as e:
             traceback.print_exc()
-            sys.exit(1)
+            sys.exit(1)
\ No newline at end of file
--- a/taskcluster/taskgraph/kind/legacy.py
+++ b/taskcluster/taskgraph/kind/legacy.py
@@ -65,17 +65,24 @@ def set_expiration(task, timestamp):
     if task_def.get('deadline', timestamp) > timestamp:
         task_def['deadline'] = timestamp
 
     try:
         artifacts = task_def['payload']['artifacts']
     except KeyError:
         return
 
-    for artifact in artifacts.values():
+    try:
+        # docker worker
+        values = artifacts.values()
+    except:
+        # generic worker
+        values = artifacts
+
+    for artifact in values:
         artifact['expires'] = timestamp
 
 class LegacyKind(base.Kind):
     """
     This kind generates a full task graph from the old YAML files in
     `testing/taskcluster/tasks`.  The tasks already have dependency links.
 
     The existing task-graph generation generates slugids for tasks during task
--- a/testing/mozharness/configs/builds/build_pool_specifics.py
+++ b/testing/mozharness/configs/builds/build_pool_specifics.py
@@ -43,9 +43,10 @@ config = {
         # use the relengapi proxy to talk to tooltool
         "tooltool_servers": ['http://relengapi/tooltool/'],
         "tooltool_url": 'http://relengapi/tooltool/',
         'upload_env': {
             'UPLOAD_HOST': 'localhost',
             'UPLOAD_PATH': '/home/worker/artifacts',
         },
     },
+    "taskcluster-windows": {},
 }
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/taskcluster_base_windows_32_builds.py
@@ -0,0 +1,87 @@
+import os
+import sys
+
+config = {
+    #########################################################################
+    ######## WINDOWS GENERIC CONFIG KEYS/VAlUES
+    # if you are updating this with custom 32 bit keys/values please add them
+    # below under the '32 bit specific' code block otherwise, update in this
+    # code block and also make sure this is synced with
+    # releng_base_windows_64_builds.py
+
+    'default_actions': [
+        #'clobber',
+        'clone-tools',
+        'build',
+        #'upload-files',
+        #'sendchange',
+        #'check-test',
+        #'generate-build-stats',
+        #'update',  # decided by query_is_nightly()
+    ],
+    'exes': {
+        'python2.7': sys.executable,
+        'hgtool.py': [
+            sys.executable,
+            os.path.join(
+                os.getcwd(), 'build', 'tools', 'buildfarm', 'utils', 'hgtool.py'
+            )
+        ],
+        "make": [
+            sys.executable,
+            os.path.join(
+                os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
+            )
+        ],
+        'virtualenv': [
+            sys.executable,
+            os.path.join(
+                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+            )
+        ],
+    },
+    'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
+    # decides whether we want to use moz_sign_cmd in env
+    'enable_signing': True,
+    'enable_ccache': False,
+    'vcs_share_base': 'C:/builds/hg-shared',
+    'objdir': 'obj-firefox',
+    'tooltool_script': [ sys.executable, 'C:/mozilla-build/tooltool.py' ],
+    'tooltool_bootstrap': "setup.sh",
+    'enable_count_ctors': False,
+    'enable_talos_sendchange': True,
+    'enable_unittest_sendchange': True,
+    'max_build_output_timeout': 60 * 80,
+    #########################################################################
+
+
+     #########################################################################
+     ###### 32 bit specific ######
+    'base_name': 'WINNT_5.2_%(branch)s',
+    'platform': 'win32',
+    'stage_platform': 'win32',
+    'publish_nightly_en_US_routes': True,
+    'env': {
+        'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
+        'MOZ_AUTOMATION': '1',
+        'BINSCOPE': 'C:/Program Files (x86)/Microsoft/SDL BinScope/BinScope.exe',
+        'HG_SHARE_BASE_DIR': 'C:/builds/hg-shared',
+        'MOZ_CRASHREPORTER_NO_REPORT': '1',
+        'MOZ_OBJDIR': 'obj-firefox',
+        'PDBSTR_PATH': '/c/Program Files (x86)/Windows Kits/10/Debuggers/x86/srcsrv/pdbstr.exe',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/c/builds/tooltool_cache',
+        'TOOLTOOL_HOME': '/c/builds',
+    },
+    'upload_env': {
+        'UPLOAD_HOST': 'localhost'
+    },
+    "check_test_env": {
+        'MINIDUMP_STACKWALK': '%(abs_tools_dir)s/breakpad/win32/minidump_stackwalk.exe',
+        'MINIDUMP_SAVE_PATH': '%(base_work_dir)s/minidumps',
+    },
+    'enable_pymake': True,
+    'src_mozconfig': 'browser/config/mozconfigs/win32/nightly',
+    'tooltool_manifest_src': "browser/config/tooltool-manifests/win32/releng.manifest",
+    #########################################################################
+}
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/taskcluster_base_windows_64_builds.py
@@ -0,0 +1,85 @@
+import os
+import sys
+
+config = {
+    #########################################################################
+    ######## WINDOWS GENERIC CONFIG KEYS/VAlUES
+    # if you are updating this with custom 32 bit keys/values please add them
+    # below under the '32 bit specific' code block otherwise, update in this
+    # code block and also make sure this is synced with
+    # releng_base_windows_64_builds.py
+
+    'default_actions': [
+        #'clobber',
+        'clone-tools',
+        'build',
+        #'upload-files',
+        #'sendchange',
+        #'check-test',
+        #'generate-build-stats',
+        #'update',  # decided by query_is_nightly()
+    ],
+    'exes': {
+        'python2.7': sys.executable,
+        'hgtool.py': [
+            sys.executable,
+            os.path.join(
+                os.getcwd(), 'build', 'tools', 'buildfarm', 'utils', 'hgtool.py'
+            )
+        ],
+        "make": [
+            sys.executable,
+            os.path.join(
+                os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
+            )
+        ],
+        'virtualenv': [
+            sys.executable,
+            os.path.join(
+                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+            )
+        ],
+    },
+    'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
+    # decides whether we want to use moz_sign_cmd in env
+    'enable_signing': True,
+    'enable_ccache': False,
+    'vcs_share_base': 'C:/builds/hg-shared',
+    'objdir': 'obj-firefox',
+    'tooltool_script': [ sys.executable, 'C:/mozilla-build/tooltool.py' ],
+    'tooltool_bootstrap': "setup.sh",
+    'enable_count_ctors': False,
+    'enable_talos_sendchange': True,
+    'enable_unittest_sendchange': True,
+    'max_build_output_timeout': 60 * 80,
+    #########################################################################
+
+
+     #########################################################################
+     ###### 64 bit specific ######
+    'base_name': 'WINNT_6.1_x86-64_%(branch)s',
+    'platform': 'win64',
+    'stage_platform': 'win64',
+    'publish_nightly_en_US_routes': True,
+    'env': {
+        'MOZ_AUTOMATION': '1',
+        'HG_SHARE_BASE_DIR': 'C:/builds/hg-shared',
+        'MOZ_CRASHREPORTER_NO_REPORT': '1',
+        'MOZ_OBJDIR': 'obj-firefox',
+        'PDBSTR_PATH': '/c/Program Files (x86)/Windows Kits/10/Debuggers/x64/srcsrv/pdbstr.exe',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/c/builds/tooltool_cache',
+        'TOOLTOOL_HOME': '/c/builds',
+    },
+    'upload_env': {
+        'UPLOAD_HOST': 'localhost',
+    },
+    "check_test_env": {
+        'MINIDUMP_STACKWALK': '%(abs_tools_dir)s/breakpad/win64/minidump_stackwalk.exe',
+        'MINIDUMP_SAVE_PATH': '%(base_work_dir)s/minidumps',
+    },
+    'enable_pymake': True,
+    'src_mozconfig': 'browser/config/mozconfigs/win64/nightly',
+    'tooltool_manifest_src': "browser/config/tooltool-manifests/win64/releng.manifest",
+    #########################################################################
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1584,22 +1584,30 @@ or run without that action (ie: --no-{ac
         env = self.query_build_env()
         env.update(self.query_mach_build_env())
 
         # XXX Bug 1037883 - mozconfigs can not find buildprops.json when builds
         # are through mozharness. This is not pretty but it is a stopgap
         # until an alternative solution is made or all builds that touch
         # mozconfig.cache are converted to mozharness.
         dirs = self.query_abs_dirs()
-        self.copyfile(os.path.join(dirs['base_work_dir'], 'buildprops.json'),
-                      os.path.join(dirs['abs_work_dir'], 'buildprops.json'))
+        buildprops = os.path.join(dirs['base_work_dir'], 'buildprops.json')
+        if os.path.exists(buildprops): # tc win doesn't use buildprops
+            self.copyfile(buildprops, os.path.join(dirs['abs_work_dir'], 'buildprops.json'))
 
         python = self.query_exe('python2.7')
+
+        # http://bugzil.la/1269809
+        command = [python, 'mach', '--log-no-times', 'build', '-v']
+        if env.get('MH_BUILD_POOL') == 'taskcluster-windows' and env.get('MOZ_MSVCBITS') == '32':
+            command.append('-j1')
+            self.info('Running in synchronous execution mode. You might want to put the kettle on or take a nap.')
+
         return_code = self.run_command_m(
-            command=[python, 'mach', '--log-no-times', 'build', '-v'],
+            command=command,
             cwd=self.query_abs_dirs()['abs_src_dir'],
             env=env, output_timeout=self.config.get('max_build_output_timeout', 60 * 40)
         )
         if return_code:
             self.return_code = self.worst_level(
                 EXIT_STATUS_DICT[TBPL_FAILURE],  self.return_code,
                 AUTOMATION_EXIT_CODES[::-1]
             )
--- a/testing/taskcluster/taskcluster_graph/image_builder.py
+++ b/testing/taskcluster/taskcluster_graph/image_builder.py
@@ -177,18 +177,18 @@ def normalize_image_details(graph, task,
     '''
     This takes a task-image payload and creates an image task to build that
     image.
 
     task-image payload is then converted to use a specific task ID of that
     built image.  All tasks within the graph requiring this same image will have their
     image details normalized and require the same image build task.
     '''
-    image = task['task']['payload']['image']
-    if isinstance(image, str) or image.get('type', 'docker-image') == 'docker-image':
+    image = task['task']['payload'].get('image', None)
+    if image is None or isinstance(image, str) or image.get('type', 'docker-image') == 'docker-image':
         return
 
     if 'requires' not in task:
         task['requires'] = []
 
     name, details = get_image_details(seen_images, image['taskId'])
 
     if details.get('required', False) is True or image_requires_building(details) is False:
--- a/testing/taskcluster/tasks/branches/base_job_flags.yml
+++ b/testing/taskcluster/tasks/branches/base_job_flags.yml
@@ -96,16 +96,18 @@ flags:
     - android-partner-sample1
     - linux
     - linux64
     - linux64-st-an
     - linux64-artifact
     - linux64-pgo
     - macosx64
     - macosx64-st-an
+    - win32
+    - win64
 
   tests:
     - cppunit
     - crashtest
     - crashtest-e10s
     - crashtest-ipc
     - external-media-tests
     - firefox-ui-functional
--- a/testing/taskcluster/tasks/branches/base_jobs.yml
+++ b/testing/taskcluster/tasks/branches/base_jobs.yml
@@ -179,16 +179,32 @@ builds:
       - Linux64
     types:
       debug:
         task: tasks/builds/sm_rootanalysis.yml
     when:
       file_patterns:
        - js/public/**
        - js/src/**
+  win32:
+    platforms:
+      - win32
+    types:
+      opt:
+        task: tasks/builds/opt_win32.yml
+      debug:
+        task: tasks/builds/dbg_win32.yml
+  win64:
+    platforms:
+      - win64
+    types:
+      opt:
+        task: tasks/builds/opt_win64.yml
+      debug:
+        task: tasks/builds/dbg_win64.yml
 
 tests:
   cppunit:
     allowed_build_tasks:
       tasks/builds/b2g_emulator_x86_kk_opt.yml:
         task: tasks/tests/b2g_emulator_cpp_unit.yml
       tasks/builds/b2g_emulator_x86_kk_debug.yml:
         task: tasks/tests/b2g_emulator_cpp_unit.yml
--- a/testing/taskcluster/tasks/branches/try/job_flags.yml
+++ b/testing/taskcluster/tasks/branches/try/job_flags.yml
@@ -66,16 +66,32 @@ builds:
       debug:
         task: tasks/builds/dbg_macosx64.yml
   macosx64-st-an:
     platforms:
       - MacOSX64 Static Analysis
     types:
       opt:
         task: tasks/builds/opt_macosx64_st-an.yml
+  win32:
+    platforms:
+      - win32
+    types:
+      opt:
+        task: tasks/builds/opt_win32.yml
+      debug:
+        task: tasks/builds/dbg_win32.yml
+  win64:
+    platforms:
+      - win64
+    types:
+      opt:
+        task: tasks/builds/opt_win64.yml
+      debug:
+        task: tasks/builds/dbg_win64.yml
 
 post-build:
   upload-symbols:
     allowed_build_tasks:
       - tasks/builds/opt_linux64.yml
       - tasks/builds/opt_linux64_st-an.yml
       - tasks/builds/dbg_linux64.yml
       - tasks/builds/android_api_15.yml
--- a/testing/taskcluster/tasks/build.yml
+++ b/testing/taskcluster/tasks/build.yml
@@ -8,35 +8,23 @@ task:
   deadline: '{{#from_now}}24 hours{{/from_now}}'
   metadata:
     source: '{{source}}'
     owner: mozilla-taskcluster-maintenance@mozilla.com
 
   tags:
     createdForUser: {{owner}}
 
-  workerType: b2gbuild
   provisionerId: aws-provisioner-v1
   schedulerId: task-graph-scheduler
 
-  routes:
-    - 'index.gecko.v1.{{project}}.revision.linux.{{head_rev}}.{{build_name}}.{{build_type}}'
-    - 'index.gecko.v1.{{project}}.latest.linux.{{build_name}}.{{build_type}}'
-  scopes:
-    # Nearly all of our build tasks use tc-vcs so just include the scope across
-    # the board.
-    - 'docker-worker:cache:level-{{level}}-{{project}}-tc-vcs'
-
   payload:
     # Two hours is long but covers edge cases (and matches bb based infra)
     maxRunTime: 7200
 
-    cache:
-      level-{{level}}-{{project}}-tc-vcs: '/home/worker/.tc-vcs'
-
     # All builds share a common artifact directory for ease of uploading.
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
 
--- a/testing/taskcluster/tasks/builds/b2g_base.yml
+++ b/testing/taskcluster/tasks/builds/b2g_base.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/build.yml'
+  from: 'tasks/docker_build.yml'
   variables:
     build_product: 'b2g'
 task:
   payload:
     image:
       type: 'task-image'
       path: 'public/image.tar'
       taskId: '{{#task_id_for_image}}builder{{/task_id_for_image}}'
--- a/testing/taskcluster/tasks/builds/base_linux32.yml
+++ b/testing/taskcluster/tasks/builds/base_linux32.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/builds/firefox_base.yml'
+  from: 'tasks/builds/firefox_docker_base.yml'
   variables:
     build_name: 'linux32'
 task:
   #workerType: ..
 
   routes:
     - 'index.buildbot.branches.{{project}}.linux32'
     - 'index.buildbot.revisions.{{head_rev}}.{{project}}.linux32'
--- a/testing/taskcluster/tasks/builds/base_linux64.yml
+++ b/testing/taskcluster/tasks/builds/base_linux64.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/builds/firefox_base.yml'
+  from: 'tasks/builds/firefox_docker_base.yml'
   variables:
     build_name: 'linux64'
 task:
   #workerType: ..
 
   scopes:
     - 'docker-worker:cache:tooltool-cache'
     - 'docker-worker:relengapi-proxy:tooltool.download.public'
--- a/testing/taskcluster/tasks/builds/base_macosx64.yml
+++ b/testing/taskcluster/tasks/builds/base_macosx64.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/builds/firefox_base.yml'
+  from: 'tasks/builds/firefox_docker_base.yml'
 task:
 
   scopes:
     - 'docker-worker:cache:tooltool-cache'
     - 'docker-worker:cache:level-{{level}}-{{project}}-build-{{build_name}}-workspace'
     - 'docker-worker:relengapi-proxy:tooltool.download.internal'
     - 'docker-worker:relengapi-proxy:tooltool.download.public'
 
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/base_win32.yml
@@ -0,0 +1,25 @@
+$inherits:
+  from: 'tasks/builds/firefox_windows_base.yml'
+  variables:
+    build_name: 'win32'
+    arch: 'win32'
+    platform: 'windowsxp'
+    object_dir: 'obj-i686-pc-mingw32'
+
+task:
+  payload:
+    env:
+      CommandPromptType: 'Cross'
+
+      #WINDOWSSDKDIR: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK'
+      WIN32_REDIST_DIR: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT'
+      WIN_UCRT_REDIST_DIR: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Redist\ucrt\DLLs\x86'
+      PATH: '%PATH:C:=c:%;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\bin\amd64_x86;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\bin\amd64;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\bin;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\bin\x86;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\bin\x64;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\DIASDK\bin;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Redist\ucrt\DLLs\x86;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Redist\ucrt\DLLs\x64'
+      INCLUDE: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\include;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\atlmfc\include;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\ucrt;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\shared;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\um;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\winrt;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\DIASDK\include'
+      LIB: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\lib;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\atlmfc\lib;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\lib\ucrt\x86;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\lib\um\x86;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\DIASDK\lib'
+
+      MOZ_MSVCBITS: '32'
+      MOZHARNESS_CONFIG: 'builds\taskcluster_base_windows_32_builds.py'
+      Platform: 'X86'
+      PreferredToolArchitecture: 'x64'
+      TOOLCHAIN: '64-bit cross-compile'
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/base_win64.yml
@@ -0,0 +1,24 @@
+$inherits:
+  from: 'tasks/builds/firefox_windows_base.yml'
+  variables:
+    build_name: 'win64'
+    arch: 'win64'
+    platform: 'windows8-64'
+    object_dir: 'obj-x86_64-pc-mingw32'
+
+task:
+  payload:
+    env:
+      CommandPromptType: 'Native'
+
+      #WINDOWSSDKDIR: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK'
+      WIN32_REDIST_DIR: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT'
+      WIN_UCRT_REDIST_DIR: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Redist\ucrt\DLLs\x64'
+      PATH: '%PATH:C:=c:%;%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\bin\amd64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\bin:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\bin\x64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Redist\ucrt\DLLs\x64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\DIASDK\bin\amd64'
+      INCLUDE: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\include:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\atlmfc\include:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\ucrt:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\shared:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\um:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\Include\winrt:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\DIASDK\include'
+      LIB: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\lib\amd64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\atlmfc\lib\amd64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\lib\ucrt\x64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\SDK\lib\um\x64:%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\DIASDK\lib\amd64'
+
+      MOZ_MSVCBITS: '64'
+      MOZHARNESS_CONFIG: 'builds\taskcluster_base_windows_64_builds.py'
+      Platform: 'X64'
+      TOOLCHAIN: '64-bit'
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/dbg_win32.yml
@@ -0,0 +1,21 @@
+$inherits:
+  from: 'tasks/builds/base_win32.yml'
+  variables:
+    build_type: 'dbg'
+    build_variant: '--custom-build-variant-cfg debug'
+    debug_flag: '--debug'
+
+task:
+  metadata:
+      name: '[TC] Win32 Dbg'
+      description: 'Win32 Dbg'
+
+  payload:
+    env:
+      MH_CUSTOM_BUILD_VARIANT_CFG: 'debug'
+
+  extra:
+    treeherder:
+      collection:
+        debug: true
+
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/dbg_win64.yml
@@ -0,0 +1,21 @@
+$inherits:
+  from: 'tasks/builds/base_win64.yml'
+  variables:
+    build_type: 'dbg'
+    build_variant: '--custom-build-variant-cfg debug'
+    debug_flag: '--debug'
+
+task:
+  metadata:
+      name: '[TC] Win64 Dbg'
+      description: 'Win64 Dbg'
+
+  payload:
+    env:
+      MH_CUSTOM_BUILD_VARIANT_CFG: 'debug'
+
+  extra:
+    treeherder:
+      collection:
+        debug: true
+
deleted file mode 100644
--- a/testing/taskcluster/tasks/builds/firefox_base.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-$inherits:
-  from: 'tasks/build.yml'
-  variables:
-    build_product: 'firefox'
-task:
-  scopes:
-    - "secrets:get:project/releng/gecko/build/level-{{level}}/*"
-  extra:
-    locations:
-      mozharness: 'public/build/mozharness.zip'
-      test_packages: 'public/build/target.test_packages.json'
-  payload:
-    image:
-      type: 'task-image'
-      path: 'public/image.tar'
-      taskId: '{{#task_id_for_image}}desktop-build{{/task_id_for_image}}'
-    features:
-      taskclusterProxy: true
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/firefox_docker_base.yml
@@ -0,0 +1,18 @@
+$inherits:
+  from: 'tasks/docker_build.yml'
+  variables:
+    build_product: 'firefox'
+task:
+  scopes:
+    - "secrets:get:project/releng/gecko/build/level-{{level}}/*"
+  extra:
+    locations:
+      mozharness: 'public/build/mozharness.zip'
+      test_packages: 'public/build/target.test_packages.json'
+  payload:
+    image:
+      type: 'task-image'
+      path: 'public/image.tar'
+      taskId: '{{#task_id_for_image}}desktop-build{{/task_id_for_image}}'
+    features:
+      taskclusterProxy: true
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/firefox_windows_base.yml
@@ -0,0 +1,84 @@
+$inherits:
+  from: 'tasks/windows_build.yml'
+
+task:
+
+  metadata:
+    name: "[TC] Firefox {{arch}} ({{build_type}})"
+    description: "Firefox {{arch}} {{build_type}}"
+
+  payload:
+
+    features:
+      relengAPIProxy: true
+
+    env:
+      MOZHARNESS_SCRIPT: 'mozharness\scripts\fx_desktop_build.py'
+      MOZHARNESS_ACTIONS: 'get-secrets build check-test generate-build-stats update'
+
+      MH_BRANCH: "{{project}}"
+      MH_BUILD_POOL: 'taskcluster-windows'
+
+      MACHTYPE: 'i686-pc-msys'
+      MAKE_MODE: 'unix'
+      MSYSTEM: 'MINGW32'
+      TOOLTOOL_CACHE: 'c:\builds\tooltool-cache'
+
+      WORKSPACE: 'x:\%USERNAME%'
+
+      UPLOAD_HOST: 'localhost'
+      UPLOAD_PATH: 'x:\%USERNAME%\public\build'
+
+      # hg build tools
+      TOOLS_HEAD_REPOSITORY: 'https://hg.mozilla.org/build/tools'
+      TOOLS_HEAD_REV: 'default'
+
+      # hg caches
+      GECKO_BASE_REPOSITORY: 'c:\builds\hg-shared\mozilla-central'
+      TOOLS_BASE_REPOSITORY: 'c:\builds\hg-shared\build\tools'
+
+      # http://bugs.python.org/issue23246
+      DISTUTILS_USE_SDK: '1'
+      MSSdk: '1'
+
+      MOZ_CRASHREPORTER_NO_REPORT: '1'
+      MOZ_OBJDIR: 'obj-firefox'
+      TINDERBOX_OUTPUT: '1'
+
+      SRCSRV_ROOT: '%GECKO_HEAD_REPOSITORY%'
+
+      # this is a workaround until sccache is fixed and working
+      NO_CACHE: '1'
+
+    maxRunTime: 7200
+
+    command:
+
+      - 'mkdir %UPLOAD_PATH%'
+      - 'mkdir %WORKSPACE%\build\src'
+
+      - 'hg share %GECKO_BASE_REPOSITORY% %WORKSPACE%\build\src'
+      - 'hg pull -u -R %WORKSPACE%\build\src --rev %GECKO_HEAD_REV% %GECKO_HEAD_REPOSITORY%'
+      - 'hg update -R %WORKSPACE%\build\src --rev %GECKO_HEAD_REV%'
+
+      - 'python -u %WORKSPACE%\build\src\testing\%MOZHARNESS_SCRIPT% --config %MOZHARNESS_CONFIG% {{build_variant}} {{debug_flag}} %custom_build_variant_cfg_flag% --branch=%MH_BRANCH% --build-pool=%MH_BUILD_POOL% --skip-buildbot-actions --work-dir=%WORKSPACE%\build --clone-tools --build'
+
+    artifacts:
+      -
+        type: 'directory'
+        path: 'public\build'
+        expires: '{{#from_now}}1 year{{/from_now}}'
+
+  extra:
+
+    treeherderEnv:
+      - production
+      - staging
+
+    treeherder:
+      machine:
+        platform: {{platform}}
+
+    locations:
+      build: "src/{{object_dir}}/dist/bin/firefox.exe"
+      tests: "src/{{object_dir}}/all-tests.json"
\ No newline at end of file
--- a/testing/taskcluster/tasks/builds/haz_linux.yml
+++ b/testing/taskcluster/tasks/builds/haz_linux.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/builds/firefox_base.yml'
+  from: 'tasks/builds/firefox_docker_base.yml'
   variables:
     build_name: 'browser-haz'
     build_type: 'debug'
 task:
   metadata:
     name: '[TC] Browser Hazard Linux'
     description: Browser Hazard Analysis Linux
 
--- a/testing/taskcluster/tasks/builds/haz_shell_linux.yml
+++ b/testing/taskcluster/tasks/builds/haz_shell_linux.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/builds/firefox_base.yml'
+  from: 'tasks/builds/firefox_docker_base.yml'
   variables:
     build_name: 'shell-haz'
     build_type: 'debug'
 task:
   metadata:
     name: '[TC] JS Shell Hazard Linux'
     description: JS Shell Hazard Analysis Linux
 
--- a/testing/taskcluster/tasks/builds/mobile_base.yml
+++ b/testing/taskcluster/tasks/builds/mobile_base.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/build.yml'
+  from: 'tasks/docker_build.yml'
   variables:
     build_product: 'mobile'
 task:
   payload:
     image:
       type: 'task-image'
       path: 'public/image.tar'
       taskId: '{{#task_id_for_image}}desktop-build{{/task_id_for_image}}'
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/opt_win32.yml
@@ -0,0 +1,9 @@
+$inherits:
+  from: 'tasks/builds/base_win32.yml'
+  variables:
+    build_type: 'opt'
+task:
+  metadata:
+      name: '[TC] Win32 Opt'
+      description: 'Win32 Opt'
+
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/opt_win64.yml
@@ -0,0 +1,9 @@
+$inherits:
+  from: 'tasks/builds/base_win64.yml'
+  variables:
+    build_type: 'opt'
+task:
+  metadata:
+      name: '[TC] Win64 Opt'
+      description: 'Win64 Opt'
+
--- a/testing/taskcluster/tasks/builds/sm_base.yml
+++ b/testing/taskcluster/tasks/builds/sm_base.yml
@@ -1,10 +1,10 @@
 $inherits:
-  from: 'tasks/builds/firefox_base.yml'
+  from: 'tasks/builds/firefox_docker_base.yml'
 task:
   workerType: spidermonkey
 
   routes:
     - 'index.buildbot.branches.{{project}}.sm-plain'
     - 'index.buildbot.revisions.{{head_rev}}.{{project}}.sm-plain'
 
   scopes:
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/docker_build.yml
@@ -0,0 +1,18 @@
+$inherits:
+  from: 'tasks/build.yml'
+
+
+task:
+  workerType: b2gbuild
+
+  routes:
+    - 'index.gecko.v1.{{project}}.revision.linux.{{head_rev}}.{{build_name}}.{{build_type}}'
+    - 'index.gecko.v1.{{project}}.latest.linux.{{build_name}}.{{build_type}}'
+  scopes:
+    # Nearly all of our build tasks use tc-vcs so just include the scope across
+    # the board.
+    - 'docker-worker:cache:level-{{level}}-{{project}}-tc-vcs'
+
+  payload:
+    cache:
+      level-{{level}}-{{project}}-tc-vcs: '/home/worker/.tc-vcs'
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/windows_build.yml
@@ -0,0 +1,27 @@
+$inherits:
+  from: 'tasks/build.yml'
+
+
+task:
+  workerType: win2012
+
+  routes:
+    - 'index.buildbot.branches.{{project}}.{{build_name}}'
+    - 'index.buildbot.revisions.{{head_rev}}.{{project}}.{{build_name}}'
+
+  #routes:
+    #- 'index.gecko.v1.{{project}}.revision.windows.{{head_rev}}.{{build_name}}.{{build_type}}'
+    #- 'index.gecko.v1.{{project}}.latest.windows.{{build_name}}.{{build_type}}'
+
+  payload:
+
+    cache:
+      tooltool-cache: 'c:\builds\tooltool-cache'
+      level-{{level}}-{{project}}-build-{{build_name}}-workspace: '.\'
+
+    # All builds share a common artifact directory for ease of uploading.
+    #artifacts:
+      #'public/build':
+        #type: directory
+        #path: 'c:\\home\\worker\\artifacts\\'
+        #expires: '{{#from_now}}1 year{{/from_now}}'