mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Add msys2 to windows-2016
This commit is contained in:
@@ -483,6 +483,14 @@
|
||||
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"elevated_user": "SYSTEM",
|
||||
"elevated_password": "",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Install-Msys2.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
@@ -611,6 +619,12 @@
|
||||
"{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"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"
|
||||
|
||||
# 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)
|
||||
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"
|
||||
|
||||
# extract tar.xz to C:\
|
||||
Write-Host "Starting extraction"
|
||||
Write-Host "Starting msys2 extraction"
|
||||
&$tar -Jxf $msy2_file_u -C /c/
|
||||
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"
|
||||
|
||||
$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`""
|
||||
|
||||
|
||||
Write-Host "sh.exe -c pacman-key --populate msys2"
|
||||
Invoke-Expression "sh -c `"pacman-key --populate msys2 2>&1`""
|
||||
Write-Host "bash -c pacman-key --populate msys2"
|
||||
Invoke-Expression "bash -c `"pacman-key --populate msys2 2>&1`""
|
||||
|
||||
Write-Host "pacman --noconfirm -Syyuu"
|
||||
pacman.exe -Syyuu --noconfirm 2>$null
|
||||
|
||||
@@ -38,11 +38,11 @@ else
|
||||
|
||||
Adding description of the software to Markdown
|
||||
|
||||
`gcc --version` gives output like:
|
||||
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0
|
||||
Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# `gcc --version` gives output like:
|
||||
# gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0
|
||||
# Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
# This is free software; see the source for copying conditions. There is NO
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
$SoftwareName = "MinGW"
|
||||
$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$"
|
||||
|
||||
Reference in New Issue
Block a user