<commit_before>steps:
- powershell: |
     python ./skip_ci.py --base-branch-env=SYSTEM_PULLREQUEST_TARGETBRANCH --is-pull-env=SYSTEM_PULLREQUEST_PULLREQUESTID --base-branch-origin
     if ($LastExitCode -ne 0) {
        throw ('error in skip_ci.py')
     }

     # remove MinGW from path, so we don't find gfortran and try to use it
     $env:Path = ($env:Path.Split(';') | Where-Object { $_ -notlike '*mingw*' }) -join ';'

     # download and install prerequisites
     function DownloadFile([String] $Source, [String] $Destination) {
       $retries = 10
       for ($i = 1; $i -le $retries; $i++) {
           try {
               (New-Object net.webclient).DownloadFile($Source, $Destination)
               break # succeeded
           } catch [net.WebException] {
               if ($i -eq $retries) {
                   throw # fail on last retry
               }
               $backoff = (10 * $i) # backoff 10s, 20s, 30s...
               echo ('{0}: {1}' -f $Source, $_.Exception.Message)
               echo ('Retrying in {0}s...' -f $backoff)
               Start-Sleep -m ($backoff * 1000)
              }
          }
     }

     DownloadFile -Source 'https://github.com/mesonbuild/cidata/raw/master/ninja.exe' -Destination $(System.WorkFolder)\ninja.exe
     DownloadFile -Source 'http://nirbheek.in/files/binaries/pkg-config/win32/pkg-config.exe' -Destination $(System.WorkFolder)\pkg-config.exe
     DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi' -Destination msmpisdk.msi
     DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe' -Destination MSMpiSetup.exe
     if ($env:compiler -ne 'msvc2015') {
       Start-Process msiexec.exe -ArgumentList '/i msmpisdk.msi /quiet' -Wait
       # installer fails "requires an interactive window station" with vs2015 image
       Start-Process .\MSMpiSetup.exe -ArgumentList '-unattend -full' -Wait
     }

     # import ms-mpi env vars (set by installer)
     foreach ($p in "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64") {
       $v = [Environment]::GetEnvironmentVariable($p, "Machine")
       Set-Content "env:$p" "$v"
     }

     if ($env:compiler -eq 'msvc2015') {
       if ($env:arch -eq 'x86') {
         $forcex86 = "--forcex86"
       }

       # download and install python3 and add to path (since it's not installed in vs2015 image!)
       Set-ExecutionPolicy Bypass -Scope Process -Force
       iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
       choco install python3 -y --no-progress $forcex86 --params "/InstallDir:C:\Python3"
       $env:Path = "C:\Python3;$env:Path"

       # add JDK installed in vs2015 image to PATH
       $env:Path = "C:\java\jdk\jdk1.8.0_102\bin\;$env:Path"
     }
<commit_msg>azure: Install Boost binaries for Windows<commit_after>steps:
- powershell: |
     python ./skip_ci.py --base-branch-env=SYSTEM_PULLREQUEST_TARGETBRANCH --is-pull-env=SYSTEM_PULLREQUEST_PULLREQUESTID --base-branch-origin
     if ($LastExitCode -ne 0) {
        throw ('error in skip_ci.py')
     }

     # remove MinGW from path, so we don't find gfortran and try to use it
     $env:Path = ($env:Path.Split(';') | Where-Object { $_ -notlike '*mingw*' }) -join ';'

     # download and install prerequisites
     function DownloadFile([String] $Source, [String] $Destination) {
       $retries = 10
       for ($i = 1; $i -le $retries; $i++) {
           try {
               (New-Object net.webclient).DownloadFile($Source, $Destination)
               break # succeeded
           } catch [net.WebException] {
               if ($i -eq $retries) {
                   throw # fail on last retry
               }
               $backoff = (10 * $i) # backoff 10s, 20s, 30s...
               echo ('{0}: {1}' -f $Source, $_.Exception.Message)
               echo ('Retrying in {0}s...' -f $backoff)
               Start-Sleep -m ($backoff * 1000)
              }
          }
     }

     DownloadFile -Source 'https://github.com/mesonbuild/cidata/raw/master/ninja.exe' -Destination $(System.WorkFolder)\ninja.exe
     DownloadFile -Source 'http://nirbheek.in/files/binaries/pkg-config/win32/pkg-config.exe' -Destination $(System.WorkFolder)\pkg-config.exe
     DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi' -Destination msmpisdk.msi
     DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe' -Destination MSMpiSetup.exe
     if ($env:compiler -ne 'msvc2015') {
       Start-Process msiexec.exe -ArgumentList '/i msmpisdk.msi /quiet' -Wait
       # installer fails "requires an interactive window station" with vs2015 image
       Start-Process .\MSMpiSetup.exe -ArgumentList '-unattend -full' -Wait
     }

     # import ms-mpi env vars (set by installer)
     foreach ($p in "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64") {
       $v = [Environment]::GetEnvironmentVariable($p, "Machine")
       Set-Content "env:$p" "$v"
     }

     if ($env:compiler -eq 'msvc2015') {
       if ($env:arch -eq 'x86') {
         $forcex86 = "--forcex86"
       }

       # download and install python3 and add to path (since it's not installed in vs2015 image!)
       Set-ExecutionPolicy Bypass -Scope Process -Force
       iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
       choco install python3 -y --no-progress $forcex86 --params "/InstallDir:C:\Python3"
       $env:Path = "C:\Python3;$env:Path"

       # add JDK installed in vs2015 image to PATH
       $env:Path = "C:\java\jdk\jdk1.8.0_102\bin\;$env:Path"
     }

     # install boost (except for clang-cl)
     if ($env:arch -eq 'x86') { $boost_bitness = '32' } else { $boost_bitness = '64' }
     if ($env:compiler -eq 'msvc2015') {
       $boost_version = '1.60.0' ; $boost_abi_tag = '14.0'
     } elseif ($env:compiler -eq 'msvc2017') {
       $boost_version = '1.64.0' ; $boost_abi_tag = '14.1'
     }
     if ($boost_version) {
       $boost_filename = $boost_version.Replace('.', '_')
       Downloadfile -Source "https://sourceforge.net/projects/boost/files/boost-binaries/$boost_version/boost_$boost_filename-msvc-$boost_abi_tag-$boost_bitness.exe" -Destination boost_$boost_filename-msvc-$boost_abi_tag-$boost_bitness.exe
       Start-Process "boost_$boost_filename-msvc-$boost_abi_tag-$boost_bitness.exe" -ArgumentList "/dir=$(System.WorkFolder)\boost_$boost_filename /silent" -Wait
       $env:BOOST_ROOT = "$(System.WorkFolder)\boost_$boost_filename"
       $env:Path = "$env:Path;$env:BOOST_ROOT\lib$boost_bitness-msvc-$boost_abi_tag"
     }

{'fraction_non_alphanumeric': 0.14436045649918483, 'fraction_numerical': 0.03142137246183489, 'mean_word_length': 2.602776294714362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 27, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5586601', 'n_tokens_mistral': 2435, 'n_tokens_neox': 2255, 'n_words': 478}