mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[Ubuntu] Add kotlin (#3755)
This commit is contained in:
@@ -124,6 +124,11 @@ function Get-SwiftVersion {
|
|||||||
return "Swift $swiftVersion"
|
return "Swift $swiftVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-KotlinVersion {
|
||||||
|
$kotlinVersion = kotlin -version | Out-String | Take-OutputPart -Part 2
|
||||||
|
return "Kotlin $kotlinVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-JuliaVersion {
|
function Get-JuliaVersion {
|
||||||
$juliaVersion = julia --version | Take-OutputPart -Part 2
|
$juliaVersion = julia --version | Take-OutputPart -Part 2
|
||||||
return "Julia $juliaVersion"
|
return "Julia $juliaVersion"
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ $runtimesList = @(
|
|||||||
(Get-Python3Version),
|
(Get-Python3Version),
|
||||||
(Get-RubyVersion),
|
(Get-RubyVersion),
|
||||||
(Get-SwiftVersion),
|
(Get-SwiftVersion),
|
||||||
(Get-JuliaVersion)
|
(Get-JuliaVersion),
|
||||||
|
(Get-KotlinVersion)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Test-IsUbuntu20) {
|
if (Test-IsUbuntu20) {
|
||||||
|
|||||||
18
images/linux/scripts/installers/kotlin.sh
Normal file
18
images/linux/scripts/installers/kotlin.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
################################################################################
|
||||||
|
## File: kotlin.sh
|
||||||
|
## Desc: Installs Kotlin
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
|
KOTLIN_ROOT="/usr/share"
|
||||||
|
|
||||||
|
URL=$(curl -s https://api.github.com/repos/JetBrains/kotlin/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kotlin-compiler"))')
|
||||||
|
download_with_retries $URL "/tmp"
|
||||||
|
|
||||||
|
unzip -qq /tmp/kotlin-compiler*.zip -d $KOTLIN_ROOT
|
||||||
|
rm $KOTLIN_ROOT/kotlinc/bin/*.bat
|
||||||
|
ln -sf $KOTLIN_ROOT/kotlinc/bin/* /usr/bin
|
||||||
|
|
||||||
|
invoke_tests "Tools" "Kotlin"
|
||||||
@@ -383,3 +383,29 @@ Describe "yq" {
|
|||||||
"yq -V" | Should -ReturnZeroExitCode
|
"yq -V" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "Kotlin" {
|
||||||
|
It "kapt" {
|
||||||
|
"kapt -version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "kotlin" {
|
||||||
|
"kotlin -version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "kotlinc" {
|
||||||
|
"kotlinc -version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "kotlinc-js" {
|
||||||
|
"kotlinc-js -version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "kotlinc-jvm" {
|
||||||
|
"kotlinc-jvm -version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "kotlin-dce-js" {
|
||||||
|
"kotlin-dce-js -version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -223,6 +223,7 @@
|
|||||||
"{{template_dir}}/scripts/installers/mercurial.sh",
|
"{{template_dir}}/scripts/installers/mercurial.sh",
|
||||||
"{{template_dir}}/scripts/installers/miniconda.sh",
|
"{{template_dir}}/scripts/installers/miniconda.sh",
|
||||||
"{{template_dir}}/scripts/installers/mono.sh",
|
"{{template_dir}}/scripts/installers/mono.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/kotlin.sh",
|
||||||
"{{template_dir}}/scripts/installers/mysql.sh",
|
"{{template_dir}}/scripts/installers/mysql.sh",
|
||||||
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
|
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
|
||||||
"{{template_dir}}/scripts/installers/sqlpackage.sh",
|
"{{template_dir}}/scripts/installers/sqlpackage.sh",
|
||||||
|
|||||||
@@ -224,6 +224,7 @@
|
|||||||
"{{template_dir}}/scripts/installers/mercurial.sh",
|
"{{template_dir}}/scripts/installers/mercurial.sh",
|
||||||
"{{template_dir}}/scripts/installers/miniconda.sh",
|
"{{template_dir}}/scripts/installers/miniconda.sh",
|
||||||
"{{template_dir}}/scripts/installers/mono.sh",
|
"{{template_dir}}/scripts/installers/mono.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/kotlin.sh",
|
||||||
"{{template_dir}}/scripts/installers/mysql.sh",
|
"{{template_dir}}/scripts/installers/mysql.sh",
|
||||||
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
|
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
|
||||||
"{{template_dir}}/scripts/installers/sqlpackage.sh",
|
"{{template_dir}}/scripts/installers/sqlpackage.sh",
|
||||||
|
|||||||
Reference in New Issue
Block a user