mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Add msys2 to windows-2016
This commit is contained in:
@@ -483,6 +483,14 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"elevated_user": "SYSTEM",
|
||||||
|
"elevated_password": "",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Msys2.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -611,6 +619,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"environment_vars":[
|
"environment_vars":[
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.ta
|
|||||||
$msy2_file = "C:\Windows\Temp\msys2.tar.xz"
|
$msy2_file = "C:\Windows\Temp\msys2.tar.xz"
|
||||||
|
|
||||||
# Download the latest msys2 x86_64
|
# Download the latest msys2 x86_64
|
||||||
Write-Host "Starting download"
|
Write-Host "Starting msys2 download"
|
||||||
(New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file)
|
(New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file)
|
||||||
Write-Host "Finished download"
|
Write-Host "Finished download"
|
||||||
|
|
||||||
@@ -26,22 +26,20 @@ $env:PATH = "$env:git_path\mingw64\bin;$env:orig_path"
|
|||||||
$tar = "$env:git_path\usr\bin\tar.exe"
|
$tar = "$env:git_path\usr\bin\tar.exe"
|
||||||
|
|
||||||
# extract tar.xz to C:\
|
# extract tar.xz to C:\
|
||||||
Write-Host "Starting extraction"
|
Write-Host "Starting msys2 extraction"
|
||||||
&$tar -Jxf $msy2_file_u -C /c/
|
&$tar -Jxf $msy2_file_u -C /c/
|
||||||
Remove-Item $msy2_file
|
Remove-Item $msy2_file
|
||||||
|
Write-Host "Finished extraction"
|
||||||
Write-Host Finished extraction
|
|
||||||
|
|
||||||
$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path"
|
$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path"
|
||||||
|
|
||||||
$ErrorActionPreference = "Continue"
|
$ErrorActionPreference = "Continue"
|
||||||
|
|
||||||
Write-Host "sh -c pacman-key --init"
|
Write-Host "bash -c pacman-key --init"
|
||||||
Invoke-Expression "bash -c `"pacman-key --init 2>&1`""
|
Invoke-Expression "bash -c `"pacman-key --init 2>&1`""
|
||||||
|
|
||||||
|
Write-Host "bash -c pacman-key --populate msys2"
|
||||||
Write-Host "sh.exe -c pacman-key --populate msys2"
|
Invoke-Expression "bash -c `"pacman-key --populate msys2 2>&1`""
|
||||||
Invoke-Expression "sh -c `"pacman-key --populate msys2 2>&1`""
|
|
||||||
|
|
||||||
Write-Host "pacman --noconfirm -Syyuu"
|
Write-Host "pacman --noconfirm -Syyuu"
|
||||||
pacman.exe -Syyuu --noconfirm 2>$null
|
pacman.exe -Syyuu --noconfirm 2>$null
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ else
|
|||||||
|
|
||||||
Adding description of the software to Markdown
|
Adding description of the software to Markdown
|
||||||
|
|
||||||
`gcc --version` gives output like:
|
# `gcc --version` gives output like:
|
||||||
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0
|
# gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0
|
||||||
Copyright (C) 2015 Free Software Foundation, Inc.
|
# Copyright (C) 2015 Free Software Foundation, Inc.
|
||||||
This is free software; see the source for copying conditions. There is NO
|
# This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
$SoftwareName = "MinGW"
|
$SoftwareName = "MinGW"
|
||||||
$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$"
|
$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$"
|
||||||
|
|||||||
Reference in New Issue
Block a user