From ccc7fd77f25579edab2f6b2255e7016186ab26fe Mon Sep 17 00:00:00 2001 From: Alex Thibodeau Date: Thu, 28 Oct 2021 13:08:29 -0400 Subject: [PATCH 1/2] Calling build.cmd would exit early it appears so needed to call build.ps1 directly instead to keep the artifact copying. --- .yamato/scripts/build_win.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" From 36c864807cc09362c7217f27ff3a93adb1488ef7 Mon Sep 17 00:00:00 2001 From: Alex Thibodeau Date: Fri, 29 Oct 2021 16:41:45 -0400 Subject: [PATCH 2/2] Build script updates * Trigger current yamato targets on PRs so at least something runs :-) * Add classlib building. Currently leverages perl but not enthusiastic about it. --- .yamato/build_classlibs_win.yml | 20 ++++++++++++++++++++ .yamato/build_windows_x64.yml | 6 ++++++ .yamato/scripts/build_classlibs.pl | 25 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 .yamato/build_classlibs_win.yml create mode 100644 .yamato/scripts/build_classlibs.pl 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