Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set using stevedoreBuildDeps as default #1103

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 0 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ build_win:
- windows
script:
- git submodule update --init --recursive
- cd external/buildscripts
- ./bee.exe
- cd ../..
- perl external/buildscripts/build_runtime_win64.pl --stevedorebuilddeps=1
- mkdir -p incomingbuilds/win64
- cp -r builds/* incomingbuilds/win64/
Expand All @@ -143,9 +140,6 @@ build_win_x86:
- windows
script:
- git submodule update --init --recursive
- cd external/buildscripts
- ./bee.exe
- cd ../..
- perl external/buildscripts/build_runtime_win.pl --stevedorebuilddeps=1
- mkdir -p incomingbuilds/win32
- cp -r builds/* incomingbuilds/win32/
Expand All @@ -164,9 +158,6 @@ build_win_bare_minimum:
- windows
script:
- git submodule update --init --recursive
- cd external/buildscripts
- ./bee.exe
- cd ../..
- perl external/buildscripts/build_unityscript_bareminimum_win.pl
- mkdir -p incomingbuilds/bareminimum
- cp -r builds/* incomingbuilds/bareminimum/
Expand Down
32 changes: 21 additions & 11 deletions external/buildscripts/build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
my $tizen=0;
my $tizenEmulator=0;
my $windowsSubsystemForLinux=0;
my $stevedoreBuildDeps=0;
my $stevedoreBuildDeps=1;

# Handy troubleshooting/niche options
my $skipMonoMake=0;
Expand Down Expand Up @@ -304,20 +304,30 @@

if (!(-d "$externalBuildDeps"))
{
if (not $checkoutonthefly)
if($stevedoreBuildDeps)
{
print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n");
print(">>> Running bee to download build-deps...\n");
chdir($buildscriptsdir) eq 1 or die ("failed to chdir to $buildscriptsdir directory\n");
system("./bee") eq 0 or die ("failed to run bee\n");
chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n");
}
else
{
if (not $checkoutonthefly)
{
print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n");
}

# Check out on the fly
print(">>> Checking out mono build dependencies to : $externalBuildDeps\n");
my $repo = "https://ono.unity3d.com/unity-extra/mono-build-deps";
print(">>> Cloning $repo at $externalBuildDeps\n");
my $checkoutResult = system("hg", "clone", $repo, "$externalBuildDeps");
# Check out on the fly
print(">>> Checking out mono build dependencies to : $externalBuildDeps\n");
my $repo = "https://ono.unity3d.com/unity-extra/mono-build-deps";
print(">>> Cloning $repo at $externalBuildDeps\n");
my $checkoutResult = system("hg", "clone", $repo, "$externalBuildDeps");

if ($checkoutOnTheFly && $checkoutResult ne 0)
{
die("failed to checkout mono build dependencies\n");
if ($checkoutOnTheFly && $checkoutResult ne 0)
{
die("failed to checkout mono build dependencies\n");
}
}

# Only clean up if the dir exists. Otherwise abs_path will return empty string
Expand Down
2 changes: 1 addition & 1 deletion external/buildscripts/build_classlibs_osx.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
my $clean = 1;
my $mcsOnly = 0;
my $skipMonoMake = 0;
my $stevedoreBuildDeps=0;
my $stevedoreBuildDeps=1;

# Handy troubleshooting/niche options

Expand Down
4 changes: 2 additions & 2 deletions external/buildscripts/build_runtime_android.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
my $androidArch = "";
my $clean = 1;
my $windowsSubsystemForLinux = 0;
my $stevedoreBuildDeps = 0;
my $stevedoreBuildDeps = 1;

GetOptions(
"androidarch=s"=>\$androidArch,
Expand All @@ -28,5 +28,5 @@
}
else
{
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--androidarch=$androidArch", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for $androidArch\n");
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--androidarch=$androidArch", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono for $androidArch\n");
}
3 changes: 1 addition & 2 deletions external/buildscripts/build_runtime_linux.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
my $monoroot = abs_path($monoroot);
my $buildScriptsRoot = "$monoroot/external/buildscripts";

my $stevedoreBuildDeps = 0;
my $stevedoreBuildDeps = 1;
my $build64 = 0;

GetOptions(
Expand Down
3 changes: 1 addition & 2 deletions external/buildscripts/build_runtime_osx.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
my $monoroot = abs_path($monoroot);
my $buildScriptsRoot = "$monoroot/external/buildscripts";

my $stevedoreBuildDeps=0;
my $stevedoreBuildDeps=1;

GetOptions(
'stevedorebuilddeps=i'=>\$stevedoreBuildDeps,
Expand Down
2 changes: 1 addition & 1 deletion external/buildscripts/build_runtime_win.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
my $monoroot = abs_path($monoroot);
my $buildScriptsRoot = "$monoroot/external/buildscripts";
my $stevedoreBuildDeps = 0;
my $stevedoreBuildDeps = 1;

GetOptions(
"stevedorebuilddeps=i"=>\$stevedoreBuildDeps,
Expand Down
2 changes: 1 addition & 1 deletion external/buildscripts/build_runtime_win64.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
my $monoroot = abs_path($monoroot);
my $buildScriptsRoot = "$monoroot/external/buildscripts";

my $stevedoreBuildDeps = 0;
my $stevedoreBuildDeps = 1;

GetOptions(
"stevedorebuilddeps=i"=>\$stevedoreBuildDeps,
Expand Down
55 changes: 3 additions & 52 deletions external/buildscripts/build_win_no_cygwin.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
my $winMonoRoot = $monoroot;
my $msBuildVersion = "14.0";
my $buildDeps = "";
my $stevedoreBuildDeps=0;
my $stevedoreBuildDeps=1;

print(">>> Build All Args = @ARGV\n");

Expand Down Expand Up @@ -98,58 +98,9 @@

if ($build)
{
if ($existingMonoRootPath eq "")
if (!(-d "$externalBuildDeps"))
{
print(">>> No existing mono supplied. Checking for external...\n");

if (!(-d "$externalBuildDeps"))
{
if (not $checkoutonthefly)
{
print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n");
}

# Check out on the fly
print(">>> Checking out mono build dependencies to : $externalBuildDeps\n");
my $repo = "https://ono.unity3d.com/unity-extra/mono-build-deps";
print(">>> Cloning $repo at $externalBuildDeps\n");
my $checkoutResult = system("hg", "clone", $repo, "$externalBuildDeps");

if ($checkoutOnTheFly && $checkoutResult ne 0)
{
die("failed to checkout mono build dependencies\n");
}
}

if (-d "$existingExternalMono")
{
print(">>> External mono found at : $existingExternalMono\n");

if (-d "$existingExternalMono/builds")
{
print(">>> Mono already extracted at : $existingExternalMono/builds\n");
}

if (!(-d "$existingExternalMono/builds"))
{
# We need to extract builds.zip
print(">>> Extracting mono builds.zip...\n");
my $SevenZip = "$externalBuildDeps/7z/win64/7za.exe";
print(">>> Using 7z : $SevenZip\n");
system("$SevenZip", "x", "$existingExternalMono/builds.zip", "-o$existingExternalMono") eq 0 or die("Failed extracting mono builds.zip\n");
}

$existingMonoRootPath = "$existingExternalMono/builds";
}
else
{
print(">>> No external mono found. Trusting a new enough mono is in your PATH.\n");
}
}

if ($existingMonoRootPath ne "" && !(-d $existingMonoRootPath))
{
die("Existing mono not found at : $existingMonoRootPath\n");
print(">>> mono-build-deps is not required for windows runtime builds...\n");
}

system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--msbuildversion=$msBuildVersion", "--clean=$clean", "--debug=$debug", "--gc=bdwgc") eq 0 or die ('failed building mono bdwgc with VS\n');
Expand Down