Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .yamato/build_classlibs_win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Classlibs Windows

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-il2cpp-bokken:stable
flavor: b1.xlarge

commands:
- .yamato/scripts/build_classlibs.bat

triggers:
pull_requests:
- targets:
only:
- "unity-main"

artifacts:
win64:
paths:
- incomingbuilds\**
6 changes: 6 additions & 0 deletions .yamato/build_windows_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ agent:
commands:
- .yamato/scripts/build_win.bat

triggers:
pull_requests:
- targets:
only:
- "unity-main"

artifacts:
win64:
paths:
Expand Down
20 changes: 20 additions & 0 deletions .yamato/scripts/build_classlibs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@echo OFF

if not exist "incomingbuilds" mkdir "incomingbuilds"

for %%x IN ("windows", "OSX", "Linux") do (
ECHO build.cmd libs -os %%x -c release
build.cmd libs -os %%x -c release
if NOT %errorlevel% == 0 (
echo "build failed"
EXIT /B %errorlevel%
)
if not exist "incomingbuilds/coreclrjit-%%x" mkdir "incomingbuilds/coreclrjit-%%x"
ECHO xcopy /s /e /h /y "artifacts/bin/runtime/net7.0-%%x-Release-x64" "incomingbuilds/coreclrjit-%%x"
xcopy /s /e /h /y "artifacts/bin/runtime/net7.0-%%x-Release-x64" "incomingbuilds/coreclrjit-%%x"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create "functions" in batch files so we don't have to repeat these commands twice:

If you add this label to the end of the file

:EchoAndExecute
ECHO %*
CALL %*
GOTO :EOF

Then we can do

CALL :EchoAndExecute xcopy /s /e /h /y "artifacts/bin/runtime/net7.0-%%x-Release-x64" "incomingbuilds/coreclrjit-%%x"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea I'll try that

ECHO taskkill /IM "dotnet.exe" /F
taskkill /IM "dotnet.exe" /F
echo build.cmd -clean
build.cmd -clean
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen this hang once if the build fails... not sure if it was a fluke or there's something wrong in here.

)
EXIT /B %ERRORLEVEL%
5 changes: 4 additions & 1 deletion .yamato/scripts/build_win.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@echo off
build.cmd -subset clr -a x64 -c release
setlocal


powershell -ExecutionPolicy ByPass -NoProfile -Command "& 'eng\build.ps1'" -subset clr -a x64 -c release

if NOT %errorlevel% == 0 (
echo "build failed"
Expand Down