129 lines
2.3 KiB
Kotlin
129 lines
2.3 KiB
Kotlin
import jetbrains.buildServer.configs.kotlin.*
|
|
import jetbrains.buildServer.configs.kotlin.buildSteps.powerShell
|
|
import jetbrains.buildServer.configs.kotlin.buildSteps.script
|
|
|
|
version = "2026.1"
|
|
|
|
project {
|
|
|
|
description = "Unity CI - isolated platform builds"
|
|
|
|
buildType(WindowsBuild)
|
|
buildType(AndroidBuild)
|
|
buildType(MacBuild)
|
|
buildType(IOSBuild)
|
|
}
|
|
|
|
/**
|
|
* WINDOWS (also builds Android on Windows agent)
|
|
*/
|
|
object WindowsBuild : BuildType({
|
|
|
|
name = "Unity - Windows (Agent: Windows)"
|
|
|
|
vcs {
|
|
root(DslContext.settingsRoot)
|
|
}
|
|
|
|
params {
|
|
param("unity.target", "Windows")
|
|
}
|
|
|
|
steps {
|
|
powerShell {
|
|
name = "Build Windows"
|
|
|
|
scriptMode = file {
|
|
path = "ci/Build-Windows.ps1"
|
|
}
|
|
|
|
scriptArgs = "-Target Windows"
|
|
}
|
|
}
|
|
|
|
artifactRules = """
|
|
Builds/** => windows.zip
|
|
""".trimIndent()
|
|
})
|
|
|
|
/**
|
|
* ANDROID (Windows agent)
|
|
*/
|
|
object AndroidBuild : BuildType({
|
|
|
|
name = "Unity - Android (Agent: Windows)"
|
|
|
|
vcs {
|
|
root(DslContext.settingsRoot)
|
|
}
|
|
|
|
steps {
|
|
powerShell {
|
|
name = "Build Android"
|
|
|
|
scriptMode = file {
|
|
path = "ci/Build-Windows.ps1"
|
|
}
|
|
|
|
scriptArgs = "-Target Android"
|
|
}
|
|
}
|
|
|
|
artifactRules = """
|
|
Builds/** => android.zip
|
|
""".trimIndent()
|
|
})
|
|
|
|
/**
|
|
* MAC (macOS agent)
|
|
*/
|
|
object MacBuild : BuildType({
|
|
|
|
name = "Unity - Mac (Agent: Mac)"
|
|
|
|
vcs {
|
|
root(DslContext.settingsRoot)
|
|
}
|
|
|
|
steps {
|
|
script {
|
|
name = "Build Mac"
|
|
|
|
scriptContent = """
|
|
chmod +x ci/Build-Mac.sh
|
|
./ci/Build-Mac.sh Mac
|
|
""".trimIndent()
|
|
}
|
|
}
|
|
|
|
artifactRules = """
|
|
Builds/** => mac.zip
|
|
""".trimIndent()
|
|
})
|
|
|
|
/**
|
|
* iOS (macOS agent)
|
|
*/
|
|
object IOSBuild : BuildType({
|
|
|
|
name = "Unity - iOS (Agent: Mac)"
|
|
|
|
vcs {
|
|
root(DslContext.settingsRoot)
|
|
}
|
|
|
|
steps {
|
|
script {
|
|
name = "Build iOS"
|
|
|
|
scriptContent = """
|
|
chmod +x ci/Build-Mac.sh
|
|
./ci/Build-Mac.sh iOS
|
|
""".trimIndent()
|
|
}
|
|
}
|
|
|
|
artifactRules = """
|
|
Builds/** => ios.zip
|
|
""".trimIndent()
|
|
}) |