IntialCommit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From f7238064c8680f6392793eb664ee2c773daff594 Mon Sep 17 00:00:00 2001
|
||||
From: Oleksandr Kozlov <okozlov@microsoft.com>
|
||||
Date: Tue, 1 Apr 2025 15:22:14 +0200
|
||||
Subject: [PATCH] Support extra UBT args in UAT.BuildPlugin
|
||||
|
||||
Forwarding extra parameters to UBT to allow customizing the build of a plugin.
|
||||
Example: runuat.bat buildpluing -plugin=... -ubtargs="-LinkerArguments=\"/profile\""
|
||||
|
||||
---
|
||||
.../Scripts/BuildPluginCommand.Automation.cs | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs b/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs
|
||||
index 5a43dc0c4..aaf3f192f 100644
|
||||
--- a/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs
|
||||
+++ b/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs
|
||||
@@ -64,6 +64,9 @@ public sealed class BuildPlugin : BuildCommand
|
||||
// Option for verifying that all include directive s
|
||||
bool bStrictIncludes = ParseParam("StrictIncludes");
|
||||
|
||||
+ // Extra arguments forwarded to UBT
|
||||
+ string UBTArgs = ParseParamValue("ubtargs");
|
||||
+
|
||||
// Make sure the packaging directory is valid
|
||||
DirectoryReference PackageDir = new DirectoryReference(PackageParam);
|
||||
|
||||
@@ -126,6 +129,16 @@ public sealed class BuildPlugin : BuildCommand
|
||||
AdditionalArgs.Append(" -NoPCH -NoSharedPCH -DisableUnity");
|
||||
}
|
||||
|
||||
+ // Pass extra parameters to UBT
|
||||
+ if (string.IsNullOrEmpty(UBTArgs) == false)
|
||||
+ {
|
||||
+ Logger.LogInformation("Building with extra UBT parameters: {UBTArgs}", UBTArgs);
|
||||
+ string Arg = UBTArgs;
|
||||
+ Arg = Arg.TrimStart(new char[] { '\"' });
|
||||
+ Arg = Arg.TrimEnd(new char[] { '\"' });
|
||||
+ AdditionalArgs.Append(' ').Append(Arg);
|
||||
+ }
|
||||
+
|
||||
// check if any architectures were specified
|
||||
foreach (UnrealTargetPlatform Platform in UnrealTargetPlatform.GetValidPlatforms())
|
||||
{
|
||||
--
|
||||
2.49.0.windows.1
|
||||
|
||||
21
Plugins/VisualStudioTools/azure-pipelines/TSAOptions.json
Normal file
21
Plugins/VisualStudioTools/azure-pipelines/TSAOptions.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"tsaVersion": "TsaV2",
|
||||
"codebase": "NewOrUpdate",
|
||||
"codebaseName": "vc-ue-extensions",
|
||||
"tsaStamp": "DevDiv",
|
||||
"tsaEnvironment": "PROD",
|
||||
"notificationAliases": [
|
||||
"hebaggio@microsoft.com",
|
||||
"cpp-apogee@microsoft.com"
|
||||
],
|
||||
"codebaseAdmins": [
|
||||
"REDMOND\\hebaggio",
|
||||
"REDMOND\\cpp-apogee"
|
||||
],
|
||||
"instanceUrl": "https://devdiv.visualstudio.com",
|
||||
"projectName": "DevDiv",
|
||||
"areaPath": "DevDiv\\Cpp Developer Experience\\GameDev Experience\\Unreal Engine integrations",
|
||||
"iterationPath": "DevDiv",
|
||||
"alltools": true,
|
||||
"repositoryName": "vc-ue-extensions"
|
||||
}
|
||||
123
Plugins/VisualStudioTools/azure-pipelines/compliance.yml
Normal file
123
Plugins/VisualStudioTools/azure-pipelines/compliance.yml
Normal file
@@ -0,0 +1,123 @@
|
||||
# IMPORTANT:
|
||||
# Do not run BinSkim because we do not control producing the binaries. That process is owned by
|
||||
# Epic. We just provide source code. Since we do not control the build, BinSkim is not needed.
|
||||
|
||||
variables:
|
||||
Codeql.Enabled: true
|
||||
Codeql.SourceRoot: '$(Build.SourcesDirectory)'
|
||||
|
||||
trigger:
|
||||
- main
|
||||
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- dev/*
|
||||
|
||||
schedules:
|
||||
- cron: "0 12 * * Sun"
|
||||
displayName: Weekly run
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: true
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1ESPipelineTemplates
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
parameters:
|
||||
pool:
|
||||
name: VSEngSS-MicroBuild2022-1ES
|
||||
os: windows
|
||||
customBuildTags:
|
||||
- ES365AIMigrationTooling
|
||||
stages:
|
||||
- stage: stage
|
||||
jobs:
|
||||
- job: 'UnrealEngine_VisualStudioTools_Compliance'
|
||||
timeoutInMinutes: 1440
|
||||
steps:
|
||||
- task: CmdLine@2
|
||||
displayName: 'Clone Unreal Engine Repository'
|
||||
inputs:
|
||||
script: 'git clone "https://$(token)@github.com/EpicGames/UnrealEngine" --single-branch --branch $(ue_branch) --depth 1 ue'
|
||||
workingDirectory: '$(Agent.BuildDirectory)'
|
||||
- task: CmdLine@2
|
||||
displayName: 'Apply patch to allow us to pass linker flags to the build'
|
||||
inputs:
|
||||
script: 'git apply --ignore-whitespace $(Build.SourcesDirectory)/azure-pipelines/Support-extra-UBT-args-in-UAT.BuildPlugin.patch'
|
||||
workingDirectory: '$(Agent.BuildDirectory)\ue'
|
||||
- task: PowerShell@2
|
||||
displayName: '[UE] Append /unattended option'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script:
|
||||
$filePath = "$(Agent.BuildDirectory)/ue/Setup.bat";
|
||||
(Get-Content $filePath).Replace("/register", "/register /unattended") | Set-Content $filePath
|
||||
- task: CmdLine@2
|
||||
displayName: '[UE] Run Setup.bat'
|
||||
inputs:
|
||||
script: 'ue\Setup.bat --force'
|
||||
workingDirectory: '$(Agent.BuildDirectory)'
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Plugin'
|
||||
timeoutInMinutes: 300
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)/build.proj'
|
||||
msbuildArguments: '/p:UnrealEngine=$(Agent.BuildDirectory)\ue /p:OutputPath=$(Build.ArtifactStagingDirectory)\drop /p:VulkanReadyBinaries=true'
|
||||
createLogFile: true
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Collect binaries to analyze'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.ArtifactStagingDirectory)\drop'
|
||||
Contents: '**\unrealeditor-visualstudiotools.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)\binariesToAnalyze'
|
||||
CleanTargetFolder: true
|
||||
OverWrite: true
|
||||
- task: PoliCheck@2
|
||||
inputs:
|
||||
targetType: 'F'
|
||||
targetArgument: '$(Build.SourcesDirectory)'
|
||||
- task: ComponentGovernanceComponentDetection@0
|
||||
inputs:
|
||||
ignoreDirectories: '$(Agent.BuildDirectory)\ue'
|
||||
displayName: 'Component Detection'
|
||||
- task: APIScan@2
|
||||
displayName: 'Run APIScan'
|
||||
inputs:
|
||||
softwareFolder: '$(Build.ArtifactStagingDirectory)/binariesToAnalyze'
|
||||
softwareName: 'Visual Studio Tools for Unreal Engine'
|
||||
softwareVersionNum: '2.4'
|
||||
softwareBuildNum: '$(Build.BuildId)'
|
||||
toolVersion: 'Latest'
|
||||
env:
|
||||
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId)
|
||||
- task: SDLNativeRules@3
|
||||
displayName: 'Run the PREfast SDL Native Rules for MSBuild'
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
publishXML: true
|
||||
userProvideBuildInfo: auto
|
||||
rulesetName: Recommended
|
||||
setupCommandlinePicker: 'vs2022'
|
||||
- task: PublishSecurityAnalysisLogs@3
|
||||
displayName: 'Publish security analysis logs'
|
||||
inputs:
|
||||
ArtifactName: 'CodeAnalysisLogs'
|
||||
ArtifactType: 'Container'
|
||||
AllTools: true
|
||||
ToolLogsNotFoundAction: 'Standard'
|
||||
- task: TSAUpload@2
|
||||
displayName: 'TSA upload'
|
||||
inputs:
|
||||
GdnPublishTsaOnboard: True
|
||||
GdnPublishTsaConfigFile: '$(Build.SourcesDirectory)/azure-pipelines/TSAOptions.json'
|
||||
117
Plugins/VisualStudioTools/azure-pipelines/release.yml
Normal file
117
Plugins/VisualStudioTools/azure-pipelines/release.yml
Normal file
@@ -0,0 +1,117 @@
|
||||
# IMPORTANT:
|
||||
# Do not run BinSkim because we do not control producing the binaries. That process is owned by
|
||||
# Epic. We just provide source code. Since we do not control the build, BinSkim is not needed.
|
||||
|
||||
# Manual trigger for now
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
parameters:
|
||||
- name: SignTypeOverride
|
||||
displayName: Signing Type (default is real for the main branch and test otherwise)
|
||||
type: string
|
||||
default: default
|
||||
values:
|
||||
- default
|
||||
- test
|
||||
- real
|
||||
|
||||
variables:
|
||||
# MicroBuild requires TeamName to be set.
|
||||
- name: TeamName
|
||||
value: C++ Unreal Engine
|
||||
- name: TagName
|
||||
value: $[replace(variables['Build.SourceBranch'], 'refs/tags/', '')]
|
||||
# If the user didn't override the signing type, then only real-sign on main.
|
||||
- ${{ if ne(parameters.SignTypeOverride, 'default') }}:
|
||||
- name: SignType
|
||||
value: ${{ parameters.SignTypeOverride }}
|
||||
- ${{ if and(eq(parameters.SignTypeOverride, 'default'), or(eq(variables['Build.SourceBranchName'], 'main'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))) }}:
|
||||
- name: SignType
|
||||
value: real
|
||||
- ${{ if and(eq(parameters.SignTypeOverride, 'default'), not(or(eq(variables['Build.SourceBranchName'], 'main'), startsWith(variables['Build.SourceBranch'], 'refs/tags')))) }}:
|
||||
- name: SignType
|
||||
value: test
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1ESPipelineTemplates
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
parameters:
|
||||
pool:
|
||||
name: VSEngSS-MicroBuild2022-1ES
|
||||
os: windows
|
||||
customBuildTags:
|
||||
- ES365AIMigrationTooling
|
||||
stages:
|
||||
- stage: stage
|
||||
jobs:
|
||||
- job: 'UnrealEngine_VisualStudioTools_Release'
|
||||
timeoutInMinutes: 1440
|
||||
templateContext:
|
||||
outputParentDirectory: $(Agent.BuildDirectory)/out/
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
displayName: 'Publish signed plugin files'
|
||||
targetPath: $(Agent.BuildDirectory)/out
|
||||
artifactName: SignedPlugin
|
||||
artifactType: container
|
||||
sbomEnabled: false
|
||||
steps:
|
||||
- powershell: |
|
||||
Write-Host "##vso[task.setVariable variable=SHA1]$(git rev-parse HEAD)"
|
||||
displayName: Save tag commit hash
|
||||
workingDirectory: '$(Build.SourcesDirectory)'
|
||||
- task: MicroBuildSigningPlugin@4
|
||||
displayName: Install MicroBuild Signing
|
||||
inputs:
|
||||
signType: $(SignType)
|
||||
zipSources: true
|
||||
- task: PowerShell@2
|
||||
displayName: "Create zip excluding .git folder"
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
$destinationDirectory = "$(Agent.BuildDirectory)/out"
|
||||
New-Item -Path $destinationDirectory -ItemType Directory
|
||||
git archive -o "$destinationDirectory/VisualStudioTools.zip" $(SHA1)
|
||||
- powershell: New-FileCatalog -Path .\VisualStudioTools.zip -CatalogFilePath .\VisualStudioTools.zip.cat -CatalogVersion 2.0
|
||||
displayName: Create standalone catalog
|
||||
workingDirectory: '$(Agent.BuildDirectory)\out'
|
||||
- task: NuGetToolInstaller@1
|
||||
inputs:
|
||||
versionSpec: 5.7
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet Restore MicroBuild Signing Extension'
|
||||
inputs:
|
||||
command: 'restore'
|
||||
restoreSolution: 'Scripts/SignDetached.proj'
|
||||
feedsToUse: 'config'
|
||||
restoreDirectory: '$(Build.SourcesDirectory)\Scripts\packages'
|
||||
- task: MSBuild@1
|
||||
displayName: Sign catalogs
|
||||
inputs:
|
||||
solution: Scripts/SignDetached.proj
|
||||
msbuildArguments: /p:SignType=$(SignType) /p:BaseOutputDirectory=$(Agent.BuildDirectory)\out
|
||||
# === Disabled for now in favor of uploading the artifacts to the pipeline ===
|
||||
# - task: GitHubRelease@1
|
||||
# displayName: Pre-release to public repo
|
||||
# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
|
||||
# inputs:
|
||||
# gitHubConnection: GitHub-VSCodeExtensions
|
||||
# repositoryName: microsoft/vc-ue-extensions
|
||||
# action: create
|
||||
# target: $(SHA1)
|
||||
# tagSource: gitTag
|
||||
# tag: $(TagName)
|
||||
# title: $(TagName)
|
||||
# isDraft: true
|
||||
# isPreRelease: true
|
||||
# assets: |
|
||||
# $(Agent.BuildDirectory)\out\VisualStudioTools.zip
|
||||
# $(Agent.BuildDirectory)\out\VisualStudioTools.zip.cat
|
||||
Reference in New Issue
Block a user