From 61380907b7ad45cfc2120e3a63710ef3598d3abc Mon Sep 17 00:00:00 2001 From: Filipp Pavlov Date: Wed, 19 Aug 2026 12:54:13 +0000 Subject: [PATCH] Update TC configuration changes from carbon-template --- .teamcity/MacOS/Project.kt | 7 ++---- .teamcity/Windows/Project.kt | 23 +++++++++---------- .../buildTypes/CreateUniversalBuilds.kt | 22 ++++++++---------- .../_Self.kt/buildTypes/PublishToPerforce.kt | 14 +++++------ 4 files changed, 29 insertions(+), 37 deletions(-) diff --git a/.teamcity/MacOS/Project.kt b/.teamcity/MacOS/Project.kt index 9922ac2..c05b685 100644 --- a/.teamcity/MacOS/Project.kt +++ b/.teamcity/MacOS/Project.kt @@ -1,5 +1,3 @@ -// Copyright © 2026 CCP ehf. - package MacOS import jetbrains.buildServer.configs.kotlin.DslContext @@ -53,7 +51,7 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag id(buildName.toId()) name = buildName - artifactRules = "%env.CMAKE_INSTALL_PREFIX%" + artifactRules = "%env.CMAKE_INSTALL_PREFIX% => artifact.zip" params { param("env.SENTRY_CLI_DEBUG_SYMBOL_TYPE", "dsym") @@ -154,7 +152,7 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag authType = token { token = "%GITHUB_CARBON_PAT%" } - filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER + filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY } } commitStatusPublisher { @@ -190,4 +188,3 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag } }) - diff --git a/.teamcity/Windows/Project.kt b/.teamcity/Windows/Project.kt index 70d68e5..6220df0 100644 --- a/.teamcity/Windows/Project.kt +++ b/.teamcity/Windows/Project.kt @@ -1,5 +1,3 @@ -// Copyright © 2026 CCP ehf. - package Windows import jetbrains.buildServer.configs.kotlin.DslContext @@ -42,7 +40,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) id(buildName.toId()) this.name = buildName - artifactRules = "%env.CMAKE_INSTALL_PREFIX%" + artifactRules = "%env.CMAKE_INSTALL_PREFIX% => artifact.zip" params { param("env.GIT_TAG_HASH_OVERRIDE", "") @@ -50,6 +48,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) param("env.CTEST_JUNIT_OUTPUT_FILE", "ctest_results.xml") select("env.VISUAL_STUDIO_PLATFORM_TOOLSET", "v141", label = "Visual Studio Platform Toolset", description = "Specify the toolset for the build. e.g. v141 or v143.", options = listOf("v141 (2017)" to "v141", "v143 (2022)" to "v143")) + param("VS_DEV_BAT_SWITCHES", "-arch=x64") param("env.CMAKE_BUILD_TARGETS", "all") param("env.CMAKE_INSTALL_PREFIX", ".build-artifact") param("env.CMAKE_CONFIG_TYPE", configType) @@ -91,7 +90,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) scriptContent = """ REM unfortunately ninja does not find the VS environment otherwise REM NB: the exported PATH also contains the location where we installed sentry-cli, e.g. teamcity.agent.work.dir - call "%env.VSDEV_BAT_PATH%" -arch=x64 + call "%env.VSDEV_BAT_PATH%" %VS_DEV_BAT_SWITCHES% echo ##teamcity[setParameter name='env.INCLUDE' value='%%INCLUDE%%'] echo ##teamcity[setParameter name='env.LIB' value='%%LIB%%'] echo ##teamcity[setParameter name='env.LIBPATH' value='%%LIBPATH%%'] @@ -140,7 +139,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) echo ${'$'}Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${'$'}User, ${'$'}Password echo New-PSDrive -Name "symbols" -PSProvider FileSystem -Root ${'$'}Env:TC_SYMBOL_STORE_PATH -Credential ${'$'}Credential echo Write-Host "##teamcity[progressMessage 'Storing symbols']" - echo ${'$'}symstoreFlags = ^@^("add","/compress","/t", "CCP Games", "/c", "TeamCity %build.number%", "/s", "${'$'}Env:TC_SYMBOL_STORE_PATH", "/o", "/r", "/f", "%env.CMAKE_BUILD_FOLDER%"^) + echo ${'$'}symstoreFlags = ^@^("add","/compress","/t", "CCP Games", "/c", "TeamCity %build.number%", "/s", "${'$'}Env:TC_SYMBOL_STORE_PATH", "/o", "/r", "/f", "%env.CMAKE_BUILD_FOLDER%"^) echo ^& ${'$'}Env:TC_SYMSTORE_PATH ${'$'}symstoreFlags ^| Tee-Object -file symstore.txt echo ${'$'}stored = get-content symstore.txt ^| Select-String "^SYMSTORE: Number of files stored = (.*)${'$'}" echo ${'$'}stored = ${'$'}stored.Matches.Groups[1].Value @@ -166,7 +165,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) ${'$'}Password = ConvertTo-SecureString -String "%DOMAIN_USER_PASSWORD%" -AsPlainText -Force ${'$'}Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${'$'}User, ${'$'}Password New-PSDrive -Name "symbols" -PSProvider FileSystem -Root ${'$'}Env:TC_SYMBOL_STORE_PATH -Credential ${'$'}Credential - + Write-Host "##teamcity[progressMessage 'Storing symbols']" ${'$'}symstoreFlags = @("add", "/compress", @@ -177,16 +176,16 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) "/r", # Recursive "/f", "%env.CMAKE_BUILD_FOLDER%") # source folder & ${'$'}Env:TC_SYMSTORE_PATH ${'$'}symstoreFlags | Tee-Object -file symstore.txt - + ${'$'}stored = get-content symstore.txt | Select-String "^SYMSTORE: Number of files stored = (.*)${'$'}" ${'$'}stored = ${'$'}stored.Matches.Groups[1].Value - + ${'$'}errors = get-content symstore.txt | Select-String "^SYMSTORE: Number of errors = (.*)${'$'}" ${'$'}errors = ${'$'}errors.Matches.Groups[1].Value - + ${'$'}ignored = get-content symstore.txt | Select-String "^SYMSTORE: Number of files ignored = (.*)${'$'}" ${'$'}ignored = ${'$'}ignored.Matches.Groups[1].Value - + Write-Host "##teamcity[buildStatus text='Stored: ${'$'}stored, Errors: ${'$'}errors, Ignored: ${'$'}ignored']" """.trimIndent() } @@ -210,7 +209,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) authType = token { token = "%GITHUB_CARBON_PAT%" } - filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER + filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY } } commitStatusPublisher { @@ -243,4 +242,4 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) requirements { startsWith("teamcity.agent.jvm.os.name", "Windows Server") } -}) +}) \ No newline at end of file diff --git a/.teamcity/_Self.kt/buildTypes/CreateUniversalBuilds.kt b/.teamcity/_Self.kt/buildTypes/CreateUniversalBuilds.kt index 0a770b6..6dd2dcc 100644 --- a/.teamcity/_Self.kt/buildTypes/CreateUniversalBuilds.kt +++ b/.teamcity/_Self.kt/buildTypes/CreateUniversalBuilds.kt @@ -1,5 +1,3 @@ -// Copyright © 2026 CCP ehf. - package _Self.buildTypes import jetbrains.buildServer.configs.kotlin.* @@ -13,7 +11,7 @@ class UniversalBuild() : BuildType({ name = "Create MacOS Universal Binaries" params{ - param("carbon-pipeline-tools-ref", "refs/heads/main") + param("carbon-pipeline-tools-ref", "refs/tags/v0.1.0") param("universal-output-dir", "%system.teamcity.build.workingDir%/output_build") param("universal-lib-path", "lib/macOS/universal/AppleClang/") param("universal-bin-path", "bin/macOS/universal/AppleClang/") @@ -32,7 +30,7 @@ class UniversalBuild() : BuildType({ ) } - artifactRules = "%universal-output-dir%" + artifactRules = "%universal-output-dir% => artifact.zip" vcs { root(AbsoluteId("CarbonPipelineTools"), "+:carbon/.=>carbon") @@ -88,7 +86,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64" } } dependency(MacOS.x64_Debug) { @@ -97,7 +95,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64" } } @@ -107,7 +105,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64" } } dependency(MacOS.x64_Release) { @@ -116,7 +114,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64" } } @@ -126,7 +124,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64" } } dependency(MacOS.x64_Internal) { @@ -135,7 +133,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64" } } @@ -145,7 +143,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64" } } dependency(MacOS.x64_TrinityDev) { @@ -154,7 +152,7 @@ class UniversalBuild() : BuildType({ } artifacts { - artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64" + artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64" } } } diff --git a/.teamcity/_Self.kt/buildTypes/PublishToPerforce.kt b/.teamcity/_Self.kt/buildTypes/PublishToPerforce.kt index 2baf8ff..acfc07d 100644 --- a/.teamcity/_Self.kt/buildTypes/PublishToPerforce.kt +++ b/.teamcity/_Self.kt/buildTypes/PublishToPerforce.kt @@ -1,5 +1,3 @@ -// Copyright © 2026 CCP ehf. - package _Self.buildTypes import jetbrains.buildServer.configs.kotlin.* @@ -33,7 +31,7 @@ class Publish(perforce_publish_path: String) : BuildType({ param("env.P4PORT", "p4is.ccp.ad.local:1666") param("env.TC_EVE_BRANCH_SHORTNAME", "%eve_branch_shortname%") param("env.TC_EVE_PROJECT", "%project%") - param("carbon-pipeline-tools-ref", "refs/heads/main") + param("carbon-pipeline-tools-ref", "refs/tags/v0.1.0") select("eve_branch_path", "//%project%/%eve_branch_shortname%/", label = "Perforce branch", description = "Is this a regular perforce branch or a perforce stream? Used for setting the proper branch path.", display = ParameterDisplay.PROMPT, options = listOf("Regular" to "//%project%/branches/%eve_branch_type%/%eve_branch_shortname%/", "Frontier Stream" to "//%project%/%eve_branch_shortname%/")) select("eve_branch_type", "sandbox", label = "Branch type", description = "The type of branch to publish into", display = ParameterDisplay.PROMPT, @@ -210,7 +208,7 @@ class Publish(perforce_publish_path: String) : BuildType({ } artifacts { - artifactRules = "**/*=>%perforce_path_to_publish_into%/${MacOS.arm64_Release.depParamRefs["env.GIT_TAG_HASH"]}" + artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${MacOS.arm64_Release.depParamRefs["env.GIT_TAG_HASH"]}" } } dependency(Windows.Debug) { @@ -219,7 +217,7 @@ class Publish(perforce_publish_path: String) : BuildType({ } artifacts { - artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.Debug.depParamRefs["env.GIT_TAG_HASH"]}" + artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.Debug.depParamRefs["env.GIT_TAG_HASH"]}" } } dependency(Windows.Internal) { @@ -228,7 +226,7 @@ class Publish(perforce_publish_path: String) : BuildType({ } artifacts { - artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.Internal.depParamRefs["env.GIT_TAG_HASH"]}" + artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.Internal.depParamRefs["env.GIT_TAG_HASH"]}" } } dependency(Windows.Release) { @@ -237,7 +235,7 @@ class Publish(perforce_publish_path: String) : BuildType({ } artifacts { - artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.Release.depParamRefs["env.GIT_TAG_HASH"]}" + artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.Release.depParamRefs["env.GIT_TAG_HASH"]}" } } dependency(Windows.TrinityDev) { @@ -246,7 +244,7 @@ class Publish(perforce_publish_path: String) : BuildType({ } artifacts { - artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.TrinityDev.depParamRefs["env.GIT_TAG_HASH"]}" + artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.TrinityDev.depParamRefs["env.GIT_TAG_HASH"]}" } } artifacts(AbsoluteId("Infrastructure_MetaTeamCity_Tools_TeamcityChanges")) {