mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
Add R tools for windows (#1264)
* add R for windows * fix tests * fix for tests * remove unused file * fix doc version for R Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com>
This commit is contained in:
@@ -477,6 +477,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-Cmake.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-Cmake.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-R.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
@@ -452,6 +452,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-Cmake.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-Cmake.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-R.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
11
images/win/scripts/Installers/Install-R.ps1
Normal file
11
images/win/scripts/Installers/Install-R.ps1
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-R.ps1
|
||||||
|
## Desc: Install R for Windows
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
Choco-Install R.Project
|
||||||
|
Choco-Install rtools
|
||||||
|
|
||||||
|
$rscriptPath = Resolve-Path "C:\Program Files\R\*\bin\x64"
|
||||||
|
Add-MachinePathItem $rscriptPath
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "R"
|
||||||
@@ -69,6 +69,7 @@ $markdown += New-MDList -Style Unordered -Lines @(
|
|||||||
(Get-BazelVersion),
|
(Get-BazelVersion),
|
||||||
(Get-BazeliskVersion),
|
(Get-BazeliskVersion),
|
||||||
(Get-CMakeVersion),
|
(Get-CMakeVersion),
|
||||||
|
(Get-RVersion),
|
||||||
(Get-DockerVersion),
|
(Get-DockerVersion),
|
||||||
(Get-DockerComposeVersion),
|
(Get-DockerComposeVersion),
|
||||||
(Get-GitVersion),
|
(Get-GitVersion),
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ function Get-BazeliskVersion {
|
|||||||
return "Bazelisk $bazeliskVersion"
|
return "Bazelisk $bazeliskVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-RVersion {
|
||||||
|
($(cmd /c "Rscript --version 2>&1") | Out-String) -match "R scripting front-end version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
|
$rVersion = $Matches.Version
|
||||||
|
return "R $rVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-CMakeVersion {
|
function Get-CMakeVersion {
|
||||||
($(cmake -version) | Out-String) -match "cmake version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
($(cmake -version) | Out-String) -match "cmake version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
$cmakeVersion = $Matches.Version
|
$cmakeVersion = $Matches.Version
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ Describe "CMake" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "R" {
|
||||||
|
It "Rscript" {
|
||||||
|
"Rscript --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Describe "DACFx" {
|
Describe "DACFx" {
|
||||||
It "DACFx" {
|
It "DACFx" {
|
||||||
(Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*).DisplayName -Contains "Microsoft SQL Server Data-Tier Application Framework (x64)" | Should -BeTrue
|
(Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*).DisplayName -Contains "Microsoft SQL Server Data-Tier Application Framework (x64)" | Should -BeTrue
|
||||||
|
|||||||
Reference in New Issue
Block a user