diff --git a/.yamato/build_classlibs_win.yml b/.yamato/build_classlibs_win.yml new file mode 100644 index 0000000000000..d81ebeabe078b --- /dev/null +++ b/.yamato/build_classlibs_win.yml @@ -0,0 +1,20 @@ +name: Build Classlibs Windows + +agent: + type: Unity::VM + image: platform-foundation/windows-vs2019-il2cpp-bokken:stable + flavor: b1.xlarge + +commands: + - perl .yamato/scripts/build_classlibs.pl + +triggers: + pull_requests: + - targets: + only: + - "unity-main" + +artifacts: + win64: + paths: + - incomingbuilds\** \ No newline at end of file diff --git a/.yamato/build_windows_x64.yml b/.yamato/build_windows_x64.yml index 2f230462b0591..e7679a0efab9d 100644 --- a/.yamato/build_windows_x64.yml +++ b/.yamato/build_windows_x64.yml @@ -8,6 +8,12 @@ agent: commands: - .yamato/scripts/build_win.bat +triggers: + pull_requests: + - targets: + only: + - "unity-main" + artifacts: win64: paths: diff --git a/.yamato/scripts/build_classlibs.pl b/.yamato/scripts/build_classlibs.pl new file mode 100644 index 0000000000000..76fad4ce4b1b2 --- /dev/null +++ b/.yamato/scripts/build_classlibs.pl @@ -0,0 +1,25 @@ +use strict; +use warnings; +use File::Copy::Recursive qw(dircopy); +use Cwd qw(); + +my $path = Cwd::cwd(); +print("cwsd: $path\n"); + +unless (-e "incomingbuilds" or mkdir("incomingbuilds")) +{ + die "Unable to create directory incomingbuilds"; +} + +my @hostPlatforms = ("windows", "OSX", "Linux"); + +foreach my $hostPlatform(@hostPlatforms) +{ + system ("build.cmd", "libs", "-os $hostPlatform", "-c release") eq 0 or die ("Failed to make $hostPlatform host platform class libraries\n"); + + dircopy ("artifacts/bin/runtime/net7.0-$hostPlatform-Release-x64", "incomingbuilds/coreclrjit-$hostPlatform") or die $!; + + system ("taskkill", "/IM", "\"dotnet.exe\"", "/F"); + + system ("build.cmd", "-clean"); +} \ No newline at end of file diff --git a/.yamato/scripts/build_win.bat b/.yamato/scripts/build_win.bat index 7cb15792509d5..79ebdc83e32d3 100644 --- a/.yamato/scripts/build_win.bat +++ b/.yamato/scripts/build_win.bat @@ -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"