mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Merge branch 'master' of https://github.com/nikita-bykov/virtual-environments into pipx
This commit is contained in:
@@ -11,6 +11,10 @@ jobs:
|
|||||||
value: $(Build.BuildNumber).$(System.JobAttempt)
|
value: $(Build.BuildNumber).$(System.JobAttempt)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- bash: |
|
||||||
|
echo "##vso[build.updatebuildnumber]${{ variables.VirtualMachineName }}"
|
||||||
|
displayName: Update BuildNumber
|
||||||
|
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
|
|||||||
@@ -144,17 +144,17 @@ function Get-AntVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-GradleVersion {
|
function Get-GradleVersion {
|
||||||
$result = gradle -v | Out-String
|
$gradleVersion = (gradle -v) -match "^Gradle \d" | Take-OutputPart -Part 1
|
||||||
$result -match "Gradle (?<version>\d+\.\d+\.\d+)" | Out-Null
|
|
||||||
$gradleVersion = $Matches.version
|
|
||||||
return "Gradle $gradleVersion"
|
return "Gradle $gradleVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-MavenVersion {
|
function Get-MavenVersion {
|
||||||
$result = mvn -version | Out-String
|
$result = mvn -version | Out-String
|
||||||
$result -match "Apache Maven (?<version>\d+\.\d+\.\d+)" | Out-Null
|
$result -match "Apache Maven (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
$mavenVersion = $Matches.version
|
$mavenVersion = $Matches.version
|
||||||
return "Maven $mavenVersion"
|
return "Maven $mavenVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-SbtVersion {
|
function Get-SbtVersion {
|
||||||
$result = Get-CommandResult "sbt -version"
|
$result = Get-CommandResult "sbt -version"
|
||||||
$result.Output -match "sbt script version: (?<version>\d+\.\d+\.\d+)" | Out-Null
|
$result.Output -match "sbt script version: (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo Installing aws...
|
echo Installing aws...
|
||||||
brew install awscli
|
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
|
||||||
|
sudo installer -pkg AWSCLIV2.pkg -target /
|
||||||
|
rm -rf AWSCLIV2.pkg
|
||||||
|
|
||||||
echo Installing aws sam cli...
|
echo Installing aws sam cli...
|
||||||
brew tap aws/tap
|
brew tap aws/tap
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ source ~/utils/utils.sh
|
|||||||
echo Updating RubyGems...
|
echo Updating RubyGems...
|
||||||
gem update --system
|
gem update --system
|
||||||
|
|
||||||
|
|
||||||
|
# Freeze xcodeproj 1.18.0 because version 1.19.0 contains breaking changes related to CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER flag
|
||||||
|
# Related issues:
|
||||||
|
# - https://github.com/CocoaPods/CocoaPods/issues/10153
|
||||||
|
# - https://github.com/actions/virtual-environments/issues/1804
|
||||||
|
# Need to revisit when Cocoapods 1.10.0 is released and added to VM
|
||||||
|
gem install xcodeproj -v 1.18.0
|
||||||
|
|
||||||
echo Installing xcode-install utility...
|
echo Installing xcode-install utility...
|
||||||
gem install xcode-install --force
|
gem install xcode-install --force
|
||||||
|
|
||||||
|
|||||||
@@ -35,4 +35,10 @@ Describe "Python" {
|
|||||||
It "Pipx is available" {
|
It "Pipx is available" {
|
||||||
"pipx --version" | Should -ReturnZeroExitCode
|
"pipx --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It "Pip 3 and Python 3 came from the same brew formula" {
|
||||||
|
$pip3Path = Split-Path (readlink (which pip3))
|
||||||
|
$python3Path = Split-Path (readlink (which python3))
|
||||||
|
$pip3Path | Should -BeExactly $python3Path
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,8 @@ ForEach ($version in $VersionsList)
|
|||||||
|
|
||||||
# Add default version of GHC to path, because choco formula updates path on user level
|
# Add default version of GHC to path, because choco formula updates path on user level
|
||||||
$DefaultGhcVersion = $VersionsList | Select-Object -Last 1
|
$DefaultGhcVersion = $VersionsList | Select-Object -Last 1
|
||||||
$DefaultGhcPath = Join-Path $env:ChocolateyInstall "lib\ghc.$DefaultGhcVersion\tools\ghc-$DefaultGhcVersion\bin"
|
$DefaultGhcShortVersion = ([version]$DefaultGhcVersion).ToString(3)
|
||||||
|
$DefaultGhcPath = Join-Path $env:ChocolateyInstall "lib\ghc.$DefaultGhcVersion\tools\ghc-$DefaultGhcShortVersion\bin"
|
||||||
Add-MachinePathItem -PathItem $DefaultGhcPath
|
Add-MachinePathItem -PathItem $DefaultGhcPath
|
||||||
|
|
||||||
Write-Host "Installing cabal..."
|
Write-Host "Installing cabal..."
|
||||||
|
|||||||
@@ -3,12 +3,18 @@ Describe "Haskell" {
|
|||||||
[array]$ghcVersionList = Get-ChildItem -Path $chocoPackagesPath -Filter "ghc.*" | ForEach-Object { $_.Name.TrimStart("ghc.") }
|
[array]$ghcVersionList = Get-ChildItem -Path $chocoPackagesPath -Filter "ghc.*" | ForEach-Object { $_.Name.TrimStart("ghc.") }
|
||||||
$ghcCount = $ghcVersionList.Count
|
$ghcCount = $ghcVersionList.Count
|
||||||
$defaultGhcVersion = $ghcVersionList | Sort-Object {[Version]$_} | Select-Object -Last 1
|
$defaultGhcVersion = $ghcVersionList | Sort-Object {[Version]$_} | Select-Object -Last 1
|
||||||
|
$ghcDefaultCases = @{
|
||||||
|
defaultGhcVersion = $defaultGhcVersion
|
||||||
|
defaultGhcShortVersion = ([version]$defaultGhcVersion).ToString(3)
|
||||||
|
}
|
||||||
|
|
||||||
$ghcTestCases = $ghcVersionList | ForEach-Object {
|
$ghcTestCases = $ghcVersionList | ForEach-Object {
|
||||||
$ghcVersion = $_
|
$ghcVersion = $_
|
||||||
|
$ghcShortVersion = ([version]$ghcVersion).ToString(3)
|
||||||
@{
|
@{
|
||||||
ghcVersion = $ghcVersion
|
ghcVersion = $ghcVersion
|
||||||
binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcVersion\bin\ghc.exe"
|
ghcShortVersion = $ghcShortVersion
|
||||||
|
binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,11 +23,11 @@ Describe "Haskell" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
It "GHC <ghcVersion> is installed" -TestCases $ghcTestCases {
|
It "GHC <ghcVersion> is installed" -TestCases $ghcTestCases {
|
||||||
"$binGhcPath --version" | Should -MatchCommandOutput $ghcVersion
|
"$binGhcPath --version" | Should -MatchCommandOutput $ghcShortVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
It "GHC <defaultGhcVersion> is the default version and should be the latest installed" -TestCases @{defaultGhcVersion = $defaultGhcVersion} {
|
It "GHC <defaultGhcVersion> is the default version and should be the latest installed" -TestCases $ghcDefaultCases {
|
||||||
"ghc --version" | Should -MatchCommandOutput $defaultGhcVersion
|
"ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Cabal is installed" {
|
It "Cabal is installed" {
|
||||||
|
|||||||
Reference in New Issue
Block a user