Bug 1330608 Add the mingw32 build job (Work in Progress) draft
authorTom Ritter <tom@mozilla.com>
Fri, 30 Jun 2017 18:40:59 -0500
changeset 602959 0f7c4b736c752897177dcffe796fa788e1f3fb7c
parent 602883 e654bb7dd57151bf4186b222a5d5005abfbff64e
child 602997 75f92bbc59165fdb364b6630cc7f5f232a48773d
child 603354 f6f408e2349ba45a539117f62e16d3351a2e1bb6
push id66633
push userbmo:tom@mozilla.com
push dateFri, 30 Jun 2017 23:41:32 +0000
bugs1330608
milestone56.0a1
Bug 1330608 Add the mingw32 build job (Work in Progress) MozReview-Commit-ID: 8FxZFtm3a4C
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,78 @@
+# 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"
+
+MOZ_AUTOMATION_L10N_CHECK=0
+unset MAKECAB
+
+# 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
+export CROSS_COMPILE=1
+ac_add_options --enable-application=browser
+ac_add_options --target=i686-w64-mingw32
+ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
+ac_add_options --enable-default-toolkit=cairo-windows
+
+ac_add_options --enable-debug
+
+# Knock this out from above
+ac_add_options --disable-js-shell
+
+# Temporary config settings until we get these working on mingw
+# Some tests break
+ac_add_options --disable-tests
+
+# There is an outstanding accessibility bug Tom hasn't fixed yet
+ac_add_options --disable-accessibility
+
+# No idea if this works in mingw
+ac_add_options --disable-webrtc
+
+# Long story
+ac_add_options --disable-sandbox
+
+# These aren't supported on mingw at this time
+ac_add_options --disable-crashreporter
+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++"
+
+  # 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:$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"
+
+# For now let's try without this
+# . "$topsrcdir/build/mozconfig.cache"
new file mode 100755
--- /dev/null
+++ b/browser/config/tooltool-manifests/mingw32/releng.manifest
@@ -0,0 +1,44 @@
+[
+  {
+    "version": "gcc 4.9.4 + PR64905",
+    "size": 101297752,
+    "digest": "42aa2e3fdd232b5e390472a788e7f7db71a1fee4221e260b6cb58c9a1d73e6cdd10afcbac137f7844290169cd6b561b424ecc92b159e9726b0ad5de3f478a8be",
+    "algorithm": "sha512",
+    "filename": "gcc.tar.xz",
+    "unpack": true
+  },
+  {
+    "size": 11189216,
+    "digest": "18bc52b0599b1308b667e282abb45f47597bfc98a5140cfcab8da71dacf89dd76d0dee22a04ce26fe7ad1f04e2d6596991f9e5b01fd2aaaab5542965f596b0e6",
+    "algorithm": "sha512",
+    "filename": "gtk3.tar.xz",
+    "setup": "setup.sh",
+    "unpack": true
+  },
+  {
+    "algorithm": "sha512",
+    "visibility": "public",
+    "filename": "rustc-x86_64-unknown-linux-gnu-mingw32-cross-repack.tar.xz",
+    "version": "rustc 1.18.0 (03fc9d622 2017-06-06) repack",
+    "unpack": true,
+    "digest": "77cbcd4d0a27c8016a1f985f7e0385906a972d8b6d316caa4bec35ea4e85a60bb3f10d6189171309d345ce43faf1aa1c2fcfce366e9041a1a51c013b2df9746d",
+    "size": 184124568
+  },
+  {
+    "version": "sccache rev 7a3847276d05deb564cb84a16b8c551b690aaa3e",
+    "algorithm": "sha512",
+    "visibility": "public",
+    "filename": "sccache2.tar.xz",
+    "unpack": true,
+    "digest": "770bec21b71c386a5a89c9dede3b5dfbf47f7b22d395d5e4642d9c309a44fa05bf4a3a7b6d48b0bc737eafe3e3a8ce90005dcbad51a1aba4d326d5216b29dca1",
+    "size": 2173064
+  },
+  {
+    "version": "mingw32: gcc 5.1.0, binutils 2.27, mingw-w64 9c7c712240, nsis-3.01, fxc2, wine, d3...dll",
+    "size": 169188540,
+    "digest": "dd4716a7339f460235a9f7d1e0f98563f01c92e8ede519cac74e5b47ec1c9a24aa5c52a001be8cb0cbaf3c5693baa20500456d8767532391ab74c5c69a308380",
+    "algorithm": "sha512",
+    "filename": "mingw.tar.xz",
+    "unpack": true
+  }
+]
old mode 100644
new mode 100755
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -268,8 +268,31 @@ win64-asan/opt:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/clang.manifest"
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_win64_asan_opt.py
     run-on-projects: []
+
+win32-mingw/debug:
+    description: "Win32 MinGW Debug"
+    index:
+        product: firefox
+        job-name: win32-mingw-debug
+    treeherder:
+        platform: windows-mingw-32/debug
+        symbol: tc(B)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 36000
+    coalesce-name: dbg_win32mingw
+    run:
+        using: mozharness
+        config:
+            - builds/releng_base_windows_32_mingw_builds.py
+            - balrog/production.py
+        script: "mozharness/scripts/fx_desktop_build.py"
+        secrets: true
+        tooltool-downloads: public
+        need-xvfb: false
\ No newline at end of file
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -84,16 +84,17 @@ JOB_NAME_WHITELIST = set([
     'win64-debug',
     'win64-noopt-debug',
     'win64-opt',
     'win64-pgo',
     'win64-st-an-debug',
     'win64-st-an-opt',
     'win64-asan-debug',
     'win64-asan-opt',
+    'win32-mingw-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 100755
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_base_windows_32_mingw_builds.py
@@ -0,0 +1,161 @@
+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'},
+    ],
+    'enable_ccache': False,
+    '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': False,
+    'skip_balrog_uploads': True, # If True, rely on Funsize to update Balrog
+    #########################################################################
+
+
+    #########################################################################
+    ###### 32 bit specific ######
+    'base_name': 'WINNT_5.2_MINGW_%(branch)s',
+    'platform': 'win32',
+    'stage_platform': 'win32-debug',
+    'publish_nightly_en_US_routes': False,
+    'env': {
+        'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
+        'MOZ_AUTOMATION': '1',
+        'DISPLAY': ':2',
+        'HG_SHARE_BASE_DIR': '/builds/hg-shared',
+        'MOZ_OBJDIR': 'obj-firefox',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/home/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
+        'gcc45_0moz3', 'gcc454_0moz1', 'gcc472_0moz1', 'gcc473_0moz1',
+        'yasm', 'ccache',
+        ###
+        'valgrind',
+        ######## 32 bit specific ###########
+        'glibc-static.i686', 'libstdc++-static.i686',
+        'gtk2-devel.i686', 'libnotify-devel.i686',
+        'alsa-lib-devel.i686', 'libcurl-devel.i686',
+        'wireless-tools-devel.i686', 'libX11-devel.i686',
+        'libXt-devel.i686', 'mesa-libGL-devel.i686',
+        'gnome-vfs2-devel.i686', 'GConf2-devel.i686',
+        'pulseaudio-libs-devel.i686',
+        'gstreamer-devel.i686', 'gstreamer-plugins-base-devel.i686',
+        # Packages already installed in the mock environment, as x86_64
+        # packages.
+        'glibc-devel.i686', 'libgcc.i686', 'libstdc++-devel.i686',
+        # yum likes to install .x86_64 -devel packages that satisfy .i686
+        # -devel packages dependencies. So manually install the dependencies
+        # of the above packages.
+        'ORBit2-devel.i686', 'atk-devel.i686', 'cairo-devel.i686',
+        'check-devel.i686', 'dbus-devel.i686', 'dbus-glib-devel.i686',
+        'fontconfig-devel.i686', 'glib2-devel.i686',
+        'hal-devel.i686', 'libICE-devel.i686', 'libIDL-devel.i686',
+        'libSM-devel.i686', 'libXau-devel.i686', 'libXcomposite-devel.i686',
+        'libXcursor-devel.i686', 'libXdamage-devel.i686',
+        'libXdmcp-devel.i686', 'libXext-devel.i686', 'libXfixes-devel.i686',
+        'libXft-devel.i686', 'libXi-devel.i686', 'libXinerama-devel.i686',
+        'libXrandr-devel.i686', 'libXrender-devel.i686',
+        'libXxf86vm-devel.i686', 'libdrm-devel.i686', 'libidn-devel.i686',
+        'libpng-devel.i686', 'libxcb-devel.i686', 'libxml2-devel.i686',
+        'pango-devel.i686', 'perl-devel.i686', 'pixman-devel.i686',
+        'zlib-devel.i686',
+        # Freetype packages need to be installed be version, because a newer
+        # version is available, but we don't want it for Firefox builds.
+        'freetype-2.3.11-6.el6_1.8.i686',
+        'freetype-devel-2.3.11-6.el6_1.8.i686',
+        'freetype-2.3.11-6.el6_1.8.x86_64',
+        ######## 32 bit specific ###########
+    ],
+    'src_mozconfig': 'browser/config/mozconfigs/win32/mingw32',
+    # mingw toolchain from https://hg.mozilla.org/try/rev/fafe38c2f79b5146c3efc3f9623e5da47fe44880
+    'tooltool_manifest_src': "browser/config/tooltool-manifests/mingw32/\
+releng.manifest",
+    #########################################################################
+}