mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[Windows] Add Ninja (#11737)
This commit is contained in:
@@ -117,6 +117,7 @@ $tools.AddToolVersion("WinAppDriver", $(Get-WinAppDriver))
|
|||||||
$tools.AddToolVersion("WiX Toolset", $(Get-WixVersion))
|
$tools.AddToolVersion("WiX Toolset", $(Get-WixVersion))
|
||||||
$tools.AddToolVersion("yamllint", $(Get-YAMLLintVersion))
|
$tools.AddToolVersion("yamllint", $(Get-YAMLLintVersion))
|
||||||
$tools.AddToolVersion("zstd", $(Get-ZstdVersion))
|
$tools.AddToolVersion("zstd", $(Get-ZstdVersion))
|
||||||
|
$tools.AddToolVersion("Ninja", $(Get-NinjaVersion))
|
||||||
|
|
||||||
# CLI Tools
|
# CLI Tools
|
||||||
$cliTools = $installedSoftware.AddHeader("CLI Tools")
|
$cliTools = $installedSoftware.AddHeader("CLI Tools")
|
||||||
|
|||||||
@@ -322,3 +322,7 @@ function Get-MongoshVersion {
|
|||||||
function Get-WSL2Version {
|
function Get-WSL2Version {
|
||||||
return $((Get-AppxPackage -Name "MicrosoftCorporationII.WindowsSubsystemForLinux").version)
|
return $((Get-AppxPackage -Name "MicrosoftCorporationII.WindowsSubsystemForLinux").version)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-NinjaVersion {
|
||||||
|
return $(ninja --version)
|
||||||
|
}
|
||||||
|
|||||||
@@ -103,3 +103,31 @@ Describe "ImageMagick" {
|
|||||||
"magick -version" | Should -ReturnZeroExitCode
|
"magick -version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "Ninja" {
|
||||||
|
BeforeAll {
|
||||||
|
$ninjaProjectPath = $(Join-Path $env:TEMP_DIR "ninjaproject")
|
||||||
|
New-item -Path $ninjaProjectPath -ItemType Directory -Force
|
||||||
|
@'
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(NinjaTest NONE)
|
||||||
|
'@ | Out-File -FilePath "$ninjaProjectPath/CMakeLists.txt" -Encoding utf8
|
||||||
|
|
||||||
|
$ninjaProjectBuildPath = $(Join-Path $ninjaProjectPath "build")
|
||||||
|
New-item -Path $ninjaProjectBuildPath -ItemType Directory -Force
|
||||||
|
Set-Location $ninjaProjectBuildPath
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Make a simple ninja project" {
|
||||||
|
"cmake -GNinja $ninjaProjectPath" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "build.ninja file should exist" {
|
||||||
|
$buildFilePath = $(Join-Path $ninjaProjectBuildPath "build.ninja")
|
||||||
|
$buildFilePath | Should -Exist
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Ninja" {
|
||||||
|
"ninja --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -418,7 +418,8 @@
|
|||||||
"name": "cmake.install",
|
"name": "cmake.install",
|
||||||
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
||||||
},
|
},
|
||||||
{ "name": "imagemagick" }
|
{ "name": "imagemagick" },
|
||||||
|
{ "name": "ninja" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node": {
|
"node": {
|
||||||
|
|||||||
@@ -339,7 +339,8 @@
|
|||||||
"name": "cmake.install",
|
"name": "cmake.install",
|
||||||
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
||||||
},
|
},
|
||||||
{ "name": "imagemagick" }
|
{ "name": "imagemagick" },
|
||||||
|
{ "name": "ninja" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node": {
|
"node": {
|
||||||
|
|||||||
@@ -298,7 +298,8 @@
|
|||||||
"name": "strawberryperl" ,
|
"name": "strawberryperl" ,
|
||||||
"args": [ "--version", "5.40.0.1" ]
|
"args": [ "--version", "5.40.0.1" ]
|
||||||
},
|
},
|
||||||
{ "name": "imagemagick" }
|
{ "name": "imagemagick" },
|
||||||
|
{ "name": "ninja" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node": {
|
"node": {
|
||||||
|
|||||||
Reference in New Issue
Block a user