From 4d2277233c49930bc24ca8b4f6cceaf522f9807c Mon Sep 17 00:00:00 2001 From: Lance Collins Date: Sat, 27 Jul 2024 13:29:33 -0700 Subject: [PATCH] Add runtime autoindex. --- envvars.csx | 12 ++++++++++++ .../{github/dotnet/roslyn => .build}/diskspace.ps1 | 0 repos/github/dotnet/roslyn/build.cmd | 4 ++-- repos/github/dotnet/runtime/build.cmd | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 envvars.csx rename repos/{github/dotnet/roslyn => .build}/diskspace.ps1 (100%) create mode 100644 repos/github/dotnet/runtime/build.cmd diff --git a/envvars.csx b/envvars.csx new file mode 100644 index 0000000..9a5f674 --- /dev/null +++ b/envvars.csx @@ -0,0 +1,12 @@ +["CodexConfigRoot"] = arguments.ConfigRoot, +["CodexRepoConfigRoot"] = arguments.RepoConfigRoot, +["CodexReposConfigRoot"] = Path.Combine(arguments.ConfigRoot ?? "", "repos"), +["CodexBuildConfigRoot"] = Path.Combine(arguments.ConfigRoot ?? "", "repos", ".build"), +["SrcDir"] = arguments.SourcesDirectory, +["BinLogDir"] = arguments.BinLogDir, +["CodexDebugDir"] = arguments.DebugDir, +["CodexBuildTempDir"] = arguments.BuildTempDir, +["CodexBinDir"] = arguments.CodexBinDir, +["CodexExtractTargets"] = Path.Combine(arguments.CodexBinDir ?? "", "Codex.Managed.Extractor.targets"), +["CodexCommonArgs"] = arguments.ProjectDataArgs?.ToString(), +["CodexProjectExtractionRoot"] = arguments.ExtractionRoot, \ No newline at end of file diff --git a/repos/github/dotnet/roslyn/diskspace.ps1 b/repos/.build/diskspace.ps1 similarity index 100% rename from repos/github/dotnet/roslyn/diskspace.ps1 rename to repos/.build/diskspace.ps1 diff --git a/repos/github/dotnet/roslyn/build.cmd b/repos/github/dotnet/roslyn/build.cmd index fdbb227..14e13e6 100644 --- a/repos/github/dotnet/roslyn/build.cmd +++ b/repos/github/dotnet/roslyn/build.cmd @@ -1,11 +1,11 @@ REM Disk space Before Build -powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%~dp0/diskspace.ps1" +powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/diskspace.ps1" REM Build using arcade build logic powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/build.ps1 -ci -restore -build -binaryLog /p:GeneratePkgDefFile=false /p:CreateVsixContainer=false /p:DeployExtension=false /p:IsSwixProject=false /p:UsingToolVSSDK=false" REM Disk space Post Build -powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%~dp0/diskspace.ps1" +powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/diskspace.ps1" REM Copy binlogs xcopy "%SrcDir%\artifacts\log\*.binlog" "%BinlogDir%" /S /I /Y diff --git a/repos/github/dotnet/runtime/build.cmd b/repos/github/dotnet/runtime/build.cmd new file mode 100644 index 0000000..8e9d31c --- /dev/null +++ b/repos/github/dotnet/runtime/build.cmd @@ -0,0 +1,14 @@ +REM Disk space Before Build +powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/diskspace.ps1" + +REM Build using arcade build logic +powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/build.ps1 -ci -restore -build -binaryLog + +REM Disk space Post Build +powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/diskspace.ps1" + +REM Copy binlogs +xcopy "%SrcDir%\artifacts\log\*.binlog" "%BinlogDir%" /S /I /Y + +REM Copy binlogs to debug dir +xcopy "%SrcDir%\artifacts\log\*.binlog" "%CodexDebugDir%" /S /I /Y \ No newline at end of file