Skip to content

Commit

Permalink
Merge pull request #1172 from Unity-Technologies/unity-master-yamato
Browse files Browse the repository at this point in the history
Add Yamato configs
  • Loading branch information
ashwinimurt authored May 9, 2019
2 parents a88b14c + 0b341d0 commit a046492
Show file tree
Hide file tree
Showing 20 changed files with 246 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .yamato/build_android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
git submodule update --init --recursive
cd external/buildscripts
./bee
cd ../..
perl external/buildscripts/build_runtime_android.pl --stevedorebuilddeps=1
mkdir -p incomingbuilds/android
cp -r builds/* incomingbuilds/android/
14 changes: 14 additions & 0 deletions .yamato/build_android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: build_android

agent:
type: Unity::VM::osx
image: buildfarm/mac:stable
flavor: m1.mac

commands:
- .yamato/build_android.sh

artifacts:
android.zip:
paths:
- incomingbuilds/android/**
15 changes: 15 additions & 0 deletions .yamato/build_linux_x64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sudo apt-get install -y schroot
sudo apt-get install -y binutils debootstrap
git submodule update --init --recursive
# try again in case previous update failed
git submodule update --init --recursive
cd external/buildscripts
./bee
cd ../..
perl external/buildscripts/build_runtime_linux.pl -build64=1 --stevedorebuilddeps=1
echo "Making directory incomingbuilds/linux64"
mkdir -p incomingbuilds/linux64
ls -al incomingbuilds/linux64
echo "Copying builds to incomingbuilds"
cp -r builds/* incomingbuilds/linux64/
ls -al incomingbuilds/linux64
14 changes: 14 additions & 0 deletions .yamato/build_linux_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: build_linux_x64

agent:
type: Unity::VM
image: cds-ops/ubuntu-18.04-agent:v1.0.11-765607
flavor: b1.large

commands:
- .yamato/build_linux_x64.sh

artifacts:
linux64.zip:
paths:
- incomingbuilds/linux64/**
19 changes: 19 additions & 0 deletions .yamato/build_linux_x86.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sudo apt-get install -y schroot
sudo apt-get install -y binutils debootstrap
sudo apt-get install -y m4
sudo apt-get install -y libc6-i386
sudo apt-get install -y libc6-dev-i386
sudo apt-get install -y libncurses5-i386
git submodule update --init --recursive
# try again in case previous update failed
git submodule update --init --recursive
cd external/buildscripts
./bee
cd ../..
perl external/buildscripts/build_runtime_linux.pl -build64=0 --stevedorebuilddeps=1
echo "Making directory incomingbuilds/linux32"
mkdir -p incomingbuilds/linux32
ls -al incomingbuilds/linux32
echo "Copying builds to incomingbuilds"
cp -r -v builds/* incomingbuilds/linux32/
ls -al incomingbuilds/linux32
14 changes: 14 additions & 0 deletions .yamato/build_linux_x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: build_linux_x86

agent:
type: Unity::VM
image: cds-ops/ubuntu-18.04-agent:v1.0.11-765607
flavor: b1.large

commands:
- .yamato/build_linux_x86.sh

artifacts:
linux32.zip:
paths:
- incomingbuilds/linux32/**
11 changes: 11 additions & 0 deletions .yamato/build_osx_classlibs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
git submodule update --init --recursive
cd external/buildscripts
./bee
cd ../..
perl external/buildscripts/build_classlibs_osx.pl --stevedorebuilddeps=1
mkdir -p incomingbuilds/classlibs
cp -r ZippedClasslibs.tar.gz incomingbuilds/classlibs/
cd incomingbuilds/classlibs
tar -pzxf ZippedClasslibs.tar.gz
rm -f ZippedClasslibs.tar.gz
cd ../..
15 changes: 15 additions & 0 deletions .yamato/build_osx_classlibs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build_osx_classlibs

agent:
type: Unity::VM::osx
image: buildfarm/mac:latest
flavor: m1.mac

commands:
- .yamato/build_osx_classlibs.sh


artifacts:
classlibs.zip:
paths:
- incomingbuilds/classlibs/**
7 changes: 7 additions & 0 deletions .yamato/build_osx_runtime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
git submodule update --init --recursive
cd external/buildscripts
./bee
cd ../..
perl external/buildscripts/build_runtime_osx.pl --stevedorebuilddeps=1
mkdir -p incomingbuilds/osx-i386
cp -r builds/* incomingbuilds/osx-i386/
14 changes: 14 additions & 0 deletions .yamato/build_osx_runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: build_osx_runtime

agent:
type: Unity::VM::osx
image: buildfarm/mac:latest
flavor: m1.mac

commands:
- .yamato/build_osx_runtime.sh

artifacts:
osx-i386.zip:
paths:
- incomingbuilds/osx-i386/**
5 changes: 5 additions & 0 deletions .yamato/build_win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
git submodule update --init --recursive
perl external/buildscripts/build_runtime_win64.pl --stevedorebuilddeps=1
mkdir -p incomingbuilds\win64
xcopy /s /e /h /y builds\* incomingbuilds\win64
16 changes: 16 additions & 0 deletions .yamato/build_win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: build_win

agent:
type: Unity::VM
image: platform-foundation/windows-mono-bokken:latest
flavor: b1.xlarge

interpreter: powershell

commands:
- .yamato/build_win.bat

artifacts:
win64.zip:
paths:
- incomingbuilds\win64\**
5 changes: 5 additions & 0 deletions .yamato/build_win_bare_minimum.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
git submodule update --init --recursive
perl external/buildscripts/build_unityscript_bareminimum_win.pl
mkdir incomingbuilds\bareminimum
xcopy /s /e /h /y builds\* incomingbuilds\bareminimum
16 changes: 16 additions & 0 deletions .yamato/build_win_bare_minimum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: build_win_bare_minimum

agent:
type: Unity::VM
image: platform-foundation/windows-mono-bokken:latest
flavor: b1.xlarge

interpreter: powershell

commands:
- .yamato/build_win_bare_minimum.bat

artifacts:
bareminimum.zip:
paths:
- incomingbuilds\bareminimum\**
5 changes: 5 additions & 0 deletions .yamato/build_win_x86.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
git submodule update --init --recursive
perl external/buildscripts/build_runtime_win.pl --stevedorebuilddeps=1
mkdir -p incomingbuilds\win32
xcopy /s /e /h /y builds\* incomingbuilds\win32
16 changes: 16 additions & 0 deletions .yamato/build_win_x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: build_win_x86

agent:
type: Unity::VM
image: platform-foundation/windows-mono-bokken:latest
flavor: b1.xlarge

interpreter: powershell

commands:
- .yamato/build_win_x86.bat

artifacts:
win32.zip:
paths:
- incomingbuilds\win32\**
5 changes: 5 additions & 0 deletions .yamato/collate_builds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sudo apt-get install -qy zip unzip
sudo apt-get install -qy p7zip-full p7zip-rar
perl external/buildscripts/collect_allbuilds.pl
pwd
ls -al
24 changes: 24 additions & 0 deletions .yamato/collate_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: collate_builds

agent:
type: Unity::VM
image: cds-ops/ubuntu-18.04-agent:v1.0.11-765607
flavor: b1.large

dependencies:
- .yamato/build_android.yml
- .yamato/build_linux_x64.yml
- .yamato/build_linux_x86.yml
- .yamato/build_osx_classlibs.yml
- .yamato/build_osx_runtime.yml
- .yamato/build_win.yml
- .yamato/build_win_bare_minimum.yml
- .yamato/build_win_x86.yml

commands:
- .yamato/collate_builds.sh

artifacts:
builds.zip:
paths:
- collectedbuilds/builds.7z
11 changes: 11 additions & 0 deletions .yamato/config/LinuxBuildEnvironment-20170609.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[LinuxBuildEnvironment-20170609]
description=Unity Linux SDK 20170609
directory=/home/bokken/build/output/Unity-Technologies/mono/external/buildscripts/artifacts/Stevedore/linux-sdk-20170609/linux-sdk-20170609/LinuxBuildEnvironment-20170609
personality=linux
users=bokken,builduser
groups=sudo
root-groups=sudo
preserve-environment=true
type=directory
profile=linux-sdk-20170609
script-config=linux-sdk-20170609/config
17 changes: 13 additions & 4 deletions external/buildscripts/build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1161,10 +1161,19 @@
else
{
print(">>> Linux SDK needs to be extracted\n");
system('mkdir', '-p', $depsSdkFinal);
system('tar', 'xaf', $depsSdkArchive, '-C', $depsSdkFinal) eq 0 or die ("failed to extract Linux SDK\n");
system('sudo', 'cp', '-R', "$depsSdkFinal/linux-sdk-$sdkVersion", '/etc/schroot');
system("sed 's,^directory=.*,directory=$depsSdkFinal/$schroot,' \"$depsSdkFinal/$schroot.conf\" | sudo tee /etc/schroot/chroot.d/$schroot.conf") eq 0 or die ("failed to deploy Linux SDK\n");
system('mkdir', '-p', $depsSdkFinal) eq 0 or die ("failed to create directory $depsSdkFinal\n");
system('tar', 'xaf', $depsSdkArchive, '-C', $depsSdkFinal) eq 0 or die ("failed to extract Linux SDK\n");
system('sudo', 'cp', '-R', "$depsSdkFinal/linux-sdk-$sdkVersion", '/etc/schroot') eq 0 or die ("failed to copy SDK\n");

if($ENV{YAMATO_PROJECT_ID})
{
system('sudo', 'cp', "$monoroot/.yamato/config/LinuxBuildEnvironment-20170609.conf", '/etc/schroot/chroot.d/') eq 0 or die ("failed to copy conf file\n");
system('sudo', 'cat', '/etc/schroot/chroot.d/LinuxBuildEnvironment-20170609.conf') eq 0 or die ("failed to list contents on /etc/schroot/chroot.d\n");
}
else
{
system("sed 's,^directory=.*,directory=$depsSdkFinal/$schroot,' \"$depsSdkFinal/$schroot.conf\" | sudo tee /etc/schroot/chroot.d/$schroot.conf") eq 0 or die ("failed to deploy Linux SDK\n");
}
}

@commandPrefix = @linuxToolchain;
Expand Down

0 comments on commit a046492

Please sign in to comment.