Bug 1330608 Add the MinGW32 browser build to Taskcluster draft
authorTom Ritter <tom@mozilla.com>
Fri, 22 Sep 2017 15:45:55 -0500
changeset 669349 3a166d35ab10ea1c99d91f5b7d41d948289d7666
parent 669175 95494d3d7a162314a4e666260df340a24d09b17f
child 669521 6bbc5b78a9da6e6532e70753e79e8a274ef26f7f
push id81304
push userbmo:tom@mozilla.com
push dateFri, 22 Sep 2017 22:48:39 +0000
bugs1330608
milestone58.0a1
Bug 1330608 Add the MinGW32 browser build to Taskcluster MozReview-Commit-ID: 3enyFeJjd7L
browser/config/mozconfigs/win32/mingw32
browser/config/tooltool-manifests/mingw32/releng.manifest
taskcluster/ci/build/windows.yml
taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
testing/mozharness/configs/builds/releng_base_windows_32_mingw_builds.py
new file mode 100755
--- /dev/null
+++ b/browser/config/mozconfigs/win32/mingw32
@@ -0,0 +1,84 @@
+# Sets:
+#    MOZ_AUTOMATION flags
+#    SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE - shouldn't be used?
+#    TOOLTOOL_DIR
+#    MAKECAB - shouldn't be used?
+. "$topsrcdir/build/mozconfig.win-common"
+
+# MinGW does not have (or need) makecab
+unset MAKECAB
+
+# These aren't supported on mingw at this time
+# Bug 1393817
+MOZ_AUTOMATION_L10N_CHECK=0
+# This might be fixed on -central now
+MOZ_AUTOMATION_BUILD_SYMBOLS=0
+# Bug 1393803
+MOZ_AUTOMATION_INSTALLER=0
+
+# Sets:
+#  build/mozconfig.common
+#    AUTOCLOBBER=1
+#    --enable-crashreporter
+#    --enable-release
+#    LLVM_CONFIG
+#    MOZ_ADDON_SIGNING
+#    MOZ_REQUIRE_SIGNING
+#    --enable-js-shell
+#  build/mozconfig.automation
+#    MOZ_AUTOMATION_ flags
+#  build/mozconfig.rust
+#    TOOLTOOL_DIR
+#    RUSTC
+#    CARGO
+. "$topsrcdir/browser/config/mozconfigs/common"
+
+# MinGW Stuff
+ac_add_options --target=i686-w64-mingw32
+ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
+
+ac_add_options --enable-debug
+ac_add_options --disable-optimize
+
+# Knock this out from above
+ac_add_options --disable-js-shell
+
+# GCC compiling for Windows exposes a lot of warnings. We are tracking them in Bug 1394433
+ac_add_options --disable-warnings-as-errors
+
+# Temporary config settings until we get these working on mingw
+ac_add_options --disable-tests
+ac_add_options --disable-accessibility # https://sourceforge.net/p/mingw-w64/bugs/648/
+
+# Long story
+ac_add_options --disable-sandbox # Bug 1230910
+ac_add_options --disable-stylo # Bug 1390583
+
+# These aren't supported on mingw at this time
+ac_add_options --disable-webrtc # Bug 1393901
+ac_add_options --disable-crashreporter # Bug 1391685
+ac_add_options --disable-maintenance-service
+
+# Find our toolchain
+if [ -z "$no_tooltool" ]
+then
+  CC="$TOOLTOOL_DIR/gcc/bin/i686-w64-mingw32-gcc"
+  CXX="$TOOLTOOL_DIR/gcc/bin/i686-w64-mingw32-g++"
+
+  HOST_CC="$TOOLTOOL_DIR/gcc/bin/gcc"
+  HOST_CXX="$TOOLTOOL_DIR/gcc/bin/g++"
+
+  # We want to make sure we use binutils and other binaries in the tooltool
+  # package.
+  mk_add_options PATH="$TOOLTOOL_DIR/gcc/bin:$TOOLTOOL_DIR/gcc/i686-w64-mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
+
+  LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/gcc/lib64:$TOOLTOOL_DIR/gcc/lib
+  mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
+fi
+
+# Do not include the visual studio related mozconfigs of course
+
+ac_add_options --with-branding=browser/branding/nightly
+
+. "$topsrcdir/build/mozconfig.common.override"
+. "$topsrcdir/build/mozconfig.cache"
\ No newline at end of file
new file mode 100755
--- /dev/null
+++ b/browser/config/tooltool-manifests/mingw32/releng.manifest
@@ -0,0 +1,11 @@
+[
+  {
+    "algorithm": "sha512",
+    "visibility": "public",
+    "filename": "rustc-x86_64-unknown-linux-gnu-mingw32-cross-repack.tar.xz",
+    "version": "rustc 1.20.0 (f3d6973f4 2017-08-27) repack",
+    "unpack": true,
+    "digest": "9f1af5cf4febda716f5d89e9de2482814d62c456637fbe235469225f2cfdb3401cfc1b955a7225d17600332c88b093bccbef6f702f106d117bbb23786ea3fcbd",
+    "size": 211950648
+  }
+]
\ No newline at end of file
old mode 100644
new mode 100755
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -446,8 +446,38 @@ win64-devedition-nightly/opt:
             - builds/taskcluster_firefox_windows_64_opt.py
             - disable_signing.py
             - taskcluster_nightly.py
         custom-build-variant-cfg: devedition
     run-on-projects: [ 'mozilla-beta', ]
     toolchains:
         - win64-clang-cl
         - win64-sccache
+
+win32-mingw32/debug:
+    description: "Win32 MinGW Debug"
+    index:
+        product: firefox
+        job-name: win32-mingw32-debug
+    treeherder:
+        platform: windows-mingw32-32/debug
+        symbol: tc(B)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 7200
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/mingw32/releng.manifest"
+    run:
+        using: mozharness
+        script: mozharness/scripts/fx_desktop_build.py
+        config:
+            - builds/releng_base_windows_32_mingw_builds.py
+        tooltool-downloads: public
+        need-xvfb: false
+    toolchains:
+        - linux64-gcc
+        - linux64-upx
+        - linux64-wine
+        - linux64-sccache
+        - linux64-mingw32-gcc
+        - linux64-mingw32-nsis
+        - linux64-mingw32-fxc2
\ No newline at end of file
old mode 100644
new mode 100755
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -116,16 +116,17 @@ JOB_NAME_WHITELIST = set([
     'win64-noopt-debug',
     'win64-opt',
     'win64-pgo',
     'win64-st-an-debug',
     'win64-st-an-opt',
     'win64-asan-debug',
     'win64-asan-opt',
     'win64-dmd-opt',
+    'win32-mingw32-debug',
 ])
 
 JOB_NAME_WHITELIST_ERROR = """\
 The gecko-v2 job name {} is not in the whitelist in gecko_v2_whitelist.py.
 If this job runs on Buildbot, please ensure that the job names match between
 Buildbot and TaskCluster, then add the job name to the whitelist.  If this is a
 new job, there is nothing to check -- just add the job to the whitelist.
 """
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_base_windows_32_mingw_builds.py
@@ -0,0 +1,120 @@
+import os
+
+config = {
+    #########################################################################
+    ######## LINUX 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_linux_64_builds.py
+
+    # note: overridden by MOZHARNESS_ACTIONS in TaskCluster tasks
+    'default_actions': [
+        'clobber',
+        'clone-tools',
+        'checkout-sources',
+        'setup-mock',
+        'build',
+        'upload-files',
+        'sendchange',
+        'check-test',
+        'update',  # decided by query_is_nightly()
+    ],
+    "buildbot_json_path": "buildprops.json",
+    'exes': {
+        "buildbot": "/tools/buildbot/bin/buildbot",
+    },
+    'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
+    # decides whether we want to use moz_sign_cmd in env
+    'enable_signing': False,
+    # mock shtuff
+    'mock_mozilla_dir':  '/builds/mock_mozilla',
+    'mock_target': 'mozilla-centos6-x86_64',
+    'mock_files': [
+        ('/home/cltbld/.ssh', '/home/mock_mozilla/.ssh'),
+        ('/home/cltbld/.hgrc', '/builds/.hgrc'),
+        ('/home/cltbld/.boto', '/builds/.boto'),
+        ('/builds/gapi.data', '/builds/gapi.data'),
+        ('/builds/relengapi.tok', '/builds/relengapi.tok'),
+        ('/tools/tooltool.py', '/builds/tooltool.py'),
+        ('/builds/mozilla-desktop-geoloc-api.key', '/builds/mozilla-desktop-geoloc-api.key'),
+        ('/builds/crash-stats-api.token', '/builds/crash-stats-api.token'),
+        ('/builds/adjust-sdk.token', '/builds/adjust-sdk.token'),
+        ('/builds/adjust-sdk-beta.token', '/builds/adjust-sdk-beta.token'),
+        ('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
+    ],
+    'secret_files': [
+        {'filename': '/builds/gapi.data',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/gapi.data',
+         'min_scm_level': 1},
+        {'filename': '/builds/mozilla-desktop-geoloc-api.key',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/mozilla-desktop-geoloc-api.key',
+         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+        {'filename': '/builds/adjust-sdk.token',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk.token',
+         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+        {'filename': '/builds/adjust-sdk-beta.token',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk-beta.token',
+         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+    ],
+    'vcs_share_base': '/builds/hg-shared',
+    'objdir': 'obj-firefox',
+    'tooltool_script': ["/builds/tooltool.py"],
+    'tooltool_bootstrap': "setup.sh",
+    'enable_count_ctors': False,
+    'enable_talos_sendchange': False,
+    'enable_unittest_sendchange': True,
+    #########################################################################
+
+
+    #########################################################################
+    ###### 32 bit specific ######
+    'base_name': 'WINNT_5.2_MINGW_%(branch)s',
+    'platform': 'win32',
+    'stage_platform': 'win32',
+    'publish_nightly_en_US_routes': False,
+    'env': {
+        'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
+        'DISPLAY': ':2',
+        'HG_SHARE_BASE_DIR': '/builds/hg-shared',
+        'MOZ_OBJDIR': 'obj-firefox',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/builds/worker/tooltool-cache',
+        'TOOLTOOL_HOME': '/builds',
+        'MOZ_CRASHREPORTER_NO_REPORT': '1',
+        'CCACHE_DIR': '/builds/ccache',
+        'CCACHE_COMPRESS': '1',
+        'CCACHE_UMASK': '002',
+        'LC_ALL': 'C',
+        # 32 bit specific
+        'PATH': '/tools/buildbot/bin:/usr/local/bin:/usr/lib/ccache:\
+/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/tools/git/bin:\
+/tools/python27/bin:/tools/python27-mercurial/bin:/home/cltbld/bin',
+        'LD_LIBRARY_PATH': "/tools/gcc-4.3.3/installed/lib",
+    },
+    'upload_env': {
+        # stage_server is dictated from build_pool_specifics.py
+        'UPLOAD_HOST': '%(stage_server)s',
+        'UPLOAD_USER': '%(stage_username)s',
+        'UPLOAD_SSH_KEY': '/home/mock_mozilla/.ssh/%(stage_ssh_key)s',
+        'UPLOAD_TO_TEMP': '1',
+    },
+    "check_test_env": {
+        'MINIDUMP_STACKWALK': '%(abs_tools_dir)s/breakpad/linux/minidump_stackwalk',
+        'MINIDUMP_SAVE_PATH': '%(base_work_dir)s/minidumps',
+    },
+    'mock_packages': [
+        'autoconf213', 'python', 'mozilla-python27', 'zip', 'mozilla-python27-mercurial',
+        'git', 'ccache', 'perl-Test-Simple', 'perl-Config-General',
+        'yasm', 'wget',
+        'mpfr',  # required for system compiler
+        'xorg-x11-font*',  # fonts required for PGO
+        'imake',  # required for makedepend!?!
+        ### <-- from releng repo
+        'yasm', 'ccache',
+        ###
+        'valgrind',
+    ],
+    'src_mozconfig': 'browser/config/mozconfigs/win32/mingw32',
+    #########################################################################
+}