servo/appveyor.yml
author Zibi Braniecki <zbraniecki@mozilla.com>
Thu, 14 Sep 2017 15:21:33 -0700
changeset 424146 48109fce6741a2448a9d71f48deccbd72f732003
parent 420607 380ad1bfb187a075e540ffaf07e2c104d6c00a13
child 429963 5df6f8fe6c50631fe00f47b69d16b8d555d90503
permissions -rw-r--r--
Bug 1400006 - Extend language negotiation in LocaleService to support looking for the best likelySubtag for the locale with region stripped. r=Pike, a=lizzard Add additional logic to our language negotation to do apply likelySubtags when a direct match is not available. Currently, if the user specifies the locale with region, and we do not have a direct for that region, we pick all locales for the same language and other regions in no order. The example of where it returns suboptimal results: 1) Requested locale "en-CA" 2) Available locales ["en-ZA", "en-GB", "en-US"] 3) Negotiated locales ["en-ZA", "en-GB", "en-US"] This would not happen, if the user requested a generic "de", "en" etc.: 1) Requested locale "en" 2) Available locales ["en-ZA", "en-GB", "en-US"] 3) Negotiated locales ["en-US", "en-ZA", "en-GB"] because after not finding a direct match, we would use likelySubtags to extend "en" to "en-Latn-US" and then find the priority match in "en-US". This patch extends this logic to "en-US" or "de-LU" by adding a step which strips the region tag and then applies likelySubtag on the result. This means that in absence of direct match the following fallbacks would happen: "de-LU" -> "de-DE" "es-CL" -> "es-ES" "en-CA" -> "en-US" This does not affect languages that use multiple scripts, so ar, sr and zh are not affected. MozReview-Commit-ID: BR1WrgXSf6a

version: 1.0.{build}

environment:
  CCACHE_DIR: "%APPVEYOR_BUILD_FOLDER%\\.ccache"
  RUST_BACKTRACE: 1
  # The appveyor image we use has a pretty huge set of things installed... we make the
  # initial PATH something sane so we know what to expect
  PATH: "C:\\windows\\system32;\
    C:\\windows;\
    C:\\windows\\System32\\Wbem;\
    C:\\windows\\System32\\WindowsPowerShell\\v1.0;\
    C:\\ProgramData\\chocolatey\\bin;\
    C:\\Python27;\
    C:\\Python27\\Scripts;\
    C:\\Tools\\PsTools;\
    C:\\Tools\\NuGet3;\
    C:\\Program Files\\Microsoft\\Web Platform Installer\\;\
    C:\\Program Files\\7-Zip;\
    C:\\Program Files\\Mercurial;\
    C:\\Program Files (x86)\\Subversion\\bin;\
    C:\\Program Files (x86)\\CMake\\bin;\
    C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;\
    C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;\
    C:\\Program Files\\Amazon\\AWSCLI\\;\
    C:\\Program Files\\Microsoft Windows Performance Toolkit\\;\
    C:\\Program Files\\LLVM\\bin;\
    C:\\Program Files\\Git LFS;\
    C:\\Program Files\\Git\\cmd;\
    C:\\Program Files\\Git\\usr\\bin;\
    C:\\Program Files\\AppVeyor\\BuildAgent;"
  matrix:
  - TARGET: nightly-x86_64-pc-windows-msvc

branches:
  only:
    - master

cache:
  - .servo -> rust-commit-hash
  - .cargo -> rust-commit-hash
  - .ccache

# Uncomment these lines to expose RDP access information to the build machine in the build log.
#init:
#  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#
#on_finish:
#  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

build_script:
  - mach build -d -v && mach test-unit

test: off