Commit 2d22fffc by Edward Thomson Committed by Patrick Steinhardt

ci: use a single setup script for mingw

(cherry picked from commit f7bb4ff8)
parent a9d1f737
...@@ -110,10 +110,11 @@ phases: ...@@ -110,10 +110,11 @@ phases:
queue: queue:
name: Hosted name: Hosted
steps: steps:
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw-amd64.ps1' - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
displayName: Setup displayName: Setup
env: env:
TEMP: $(Agent.TempDirectory) TEMP: $(Agent.TempDirectory)
ARCH: amd64
- powershell: . '$(Build.SourcesDirectory)\ci\build.ps1' - powershell: . '$(Build.SourcesDirectory)\ci\build.ps1'
displayName: Build displayName: Build
env: env:
...@@ -127,10 +128,11 @@ phases: ...@@ -127,10 +128,11 @@ phases:
queue: queue:
name: Hosted name: Hosted
steps: steps:
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw-x86.ps1' - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
displayName: Setup displayName: Setup
env: env:
TEMP: $(Agent.TempDirectory) TEMP: $(Agent.TempDirectory)
ARCH: x86
- powershell: . '$(Build.SourcesDirectory)\ci\build.ps1' - powershell: . '$(Build.SourcesDirectory)\ci\build.ps1'
displayName: Build displayName: Build
env: env:
......
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
Write-Host "##############################################################################"
Write-Host "## Downloading mingw"
Write-Host "##############################################################################"
$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip"
$platform = "x86"
$wc = New-Object net.webclient
$wc.Downloadfile($mingw_uri, "${Env:TEMP}/mingw-${platform}.zip")
[System.IO.Compression.ZipFile]::ExtractToDirectory("${Env:TEMP}/mingw-${platform}.zip", $Env:TEMP)
...@@ -11,10 +11,15 @@ Write-Host "#################################################################### ...@@ -11,10 +11,15 @@ Write-Host "####################################################################
Write-Host "## Downloading mingw" Write-Host "## Downloading mingw"
Write-Host "##############################################################################" Write-Host "##############################################################################"
$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip" if ($env:ARCH -eq "amd64") {
$platform = "x86_64" $mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip"
$platform = "x86_64"
} else {
$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip"
$platform = "x86"
}
$wc = New-Object net.webclient $wc = New-Object net.webclient
$wc.Downloadfile($mingw_uri, "${Env:TEMP}/mingw-${platform}.zip") $wc.Downloadfile($mingw_uri, "${Env:TEMP}/mingw-${Env:ARCH}.zip")
[System.IO.Compression.ZipFile]::ExtractToDirectory("${Env:TEMP}/mingw-${platform}.zip", $Env:TEMP) [System.IO.Compression.ZipFile]::ExtractToDirectory("${Env:TEMP}/mingw-${Env:ARCH}.zip", $Env:TEMP)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment