Skip to content

Commit

Permalink
Use build cmd instead of settings.json and fix binlog copy logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcollins25 authored Jul 28, 2024
1 parent e3f266a commit d259b23
Show file tree
Hide file tree
Showing 26 changed files with 44 additions and 36 deletions.
5 changes: 5 additions & 0 deletions repos/.build/arcade.copybinlogs.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REM Copy binlogs
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/copybinlogs.ps1 -Source %SrcDir%\artifacts\log -Target %BinlogDir%"

REM Copy binlogs to debug dir
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/copybinlogs.ps1 -Source %SrcDir%\artifacts\log -Target %CodexDebugDir%"
3 changes: 1 addition & 2 deletions repos/.build/arcadebuild.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
REM Build using arcade build logic
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -nodeReuse:$false %*"

REM Copy binlogs
xcopy "%SrcDir%\*.binlog" "%BinlogDir%" /S /I /Y
call "%CodexBuildConfigRoot%\arcade.copybinlogs.cmd"
20 changes: 20 additions & 0 deletions repos/.build/copybinlogs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
param(
[Parameter(Mandatory=$true)]
[string] $Source,

[Parameter(Mandatory=$true)]
[string] $Target
)

# Create destination directory if it doesn't exist
if (-not (Test-Path -Path $Target)) {
New-Item -ItemType Directory -Path $Target
}

# Copy all .binlog files from source to destination
Get-ChildItem -Path $Source -Filter *.binlog -Recurse | ForEach-Object {
Write-Host "Copying binlog $($_.FullName) to $($Target)"
Copy-Item -Path $_.FullName -Destination $Target -Force
}

Write-Output "Copying binlogs complete."
6 changes: 1 addition & 5 deletions repos/github/dotnet/.build/arcadebuild.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
REM Build using arcade build logic
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -nodeReuse:$false"

REM Copy binlogs
xcopy "%SrcDir%\*.binlog" "%BinlogDir%" /S /I /Y
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/arcade/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/efcore/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/extensions/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/iot/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/machinelearning/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/msbuild/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
3 changes: 0 additions & 3 deletions repos/github/dotnet/razor/analyze.settings.json

This file was deleted.

1 change: 1 addition & 0 deletions repos/github/dotnet/razor/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
3 changes: 0 additions & 3 deletions repos/github/dotnet/roslyn-analyzers/analyze.settings.json

This file was deleted.

1 change: 1 addition & 0 deletions repos/github/dotnet/roslyn-analyzers/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
13 changes: 2 additions & 11 deletions repos/github/dotnet/runtime/build.cmd
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
REM Disk space Before Build
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "%CodexBuildConfigRoot%/diskspace.ps1"

REM Build using arcade build logic
build.cmd clr+libs -rc Debug -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
REM Copy binlogs from arcade logs folder
call "%CodexBuildConfigRoot%\arcade.copybinlogs.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/sdk/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
3 changes: 0 additions & 3 deletions repos/github/dotnet/symreader-portable/analyze.settings.json

This file was deleted.

1 change: 1 addition & 0 deletions repos/github/dotnet/symreader-portable/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
3 changes: 0 additions & 3 deletions repos/github/dotnet/symreader/analyze.settings.json

This file was deleted.

1 change: 1 addition & 0 deletions repos/github/dotnet/symreader/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
3 changes: 0 additions & 3 deletions repos/github/dotnet/symstore/analyze.settings.json

This file was deleted.

1 change: 1 addition & 0 deletions repos/github/dotnet/symstore/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
3 changes: 0 additions & 3 deletions repos/github/dotnet/tye/analyze.settings.json

This file was deleted.

1 change: 1 addition & 0 deletions repos/github/dotnet/tye/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/wcf/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"
1 change: 1 addition & 0 deletions repos/github/dotnet/winforms/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
call "%CodexBuildConfigRoot%\arcadebuild.cmd"

0 comments on commit d259b23

Please sign in to comment.