diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8f2c5dbe171aa98c6e1e6e1f3b73d025e0b36ca..8e62cd77dcff2026d3e680585941e74ff855aa58 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,13 +20,14 @@ build_osx_runtime: tags: - buildfarm - darwin + when: manual script: - git submodule update --init --recursive - chmod +x external/buildscripts/bee - cd external/buildscripts - ./bee - cd ../.. - - perl external/buildscripts/build_runtime_osx.pl + - perl external/buildscripts/build_runtime_osx.pl --stevedorebuilddeps=1 - mkdir -p incomingbuilds/osx-i386 - cp -r builds/ incomingbuilds/osx-i386/ artifacts: @@ -42,13 +43,14 @@ build_osx_classlibs: tags: - buildfarm - darwin + when: manual script: - git submodule update --init --recursive - chmod +x external/buildscripts/bee - cd external/buildscripts - ./bee - cd ../.. - - perl external/buildscripts/build_classlibs_osx.pl + - perl external/buildscripts/build_classlibs_osx.pl --stevedorebuilddeps=1 - mkdir -p incomingbuilds/classlibs - cp -r ZippedClasslibs.tar.gz incomingbuilds/classlibs/ - cd incomingbuilds/classlibs @@ -68,13 +70,14 @@ build_android: tags: - buildfarm - darwin + when: manual script: - git submodule update --init --recursive - chmod +x external/buildscripts/bee - cd external/buildscripts - ./bee - cd ../.. - - bash external/buildscripts/build_runtime_android.sh + - perl external/buildscripts/build_runtime_android.pl --stevedorebuilddeps=1 - mkdir -p incomingbuilds/android/ - cp -r builds/* incomingbuilds/android/ artifacts: @@ -90,12 +93,13 @@ build_win: tags: - buildfarm - windows + when: manual script: - git submodule update --init --recursive - cd external/buildscripts - ./bee.exe - cd ../.. - - perl external/buildscripts/build_runtime_win64.pl + - perl external/buildscripts/build_runtime_win64.pl --stevedorebuilddeps=1 - mkdir -p incomingbuilds/win64 - cp -r builds/* incomingbuilds/win64/ artifacts: @@ -111,12 +115,13 @@ build_win_x86: tags: - buildfarm - windows + when: manual script: - git submodule update --init --recursive - cd external/buildscripts - ./bee.exe - cd ../.. - - perl external/buildscripts/build_runtime_win.pl + - perl external/buildscripts/build_runtime_win.pl --stevedorebuilddeps=1 - mkdir -p incomingbuilds/win32 - cp -r builds/* incomingbuilds/win32/ artifacts: @@ -132,6 +137,7 @@ build_win_bare_minimum: tags: - buildfarm - windows + when: manual script: - git submodule update --init --recursive - cd external/buildscripts @@ -153,13 +159,14 @@ build_linux_x64: tags: - buildfarm - linux + when: manual script: - git submodule update --init --recursive - chmod +x external/buildscripts/bee - cd external/buildscripts - ./bee - cd ../.. - - perl external/buildscripts/build_runtime_linux.pl -build64=1 + - perl external/buildscripts/build_runtime_linux.pl -build64=1 --stevedorebuilddeps=1 - mkdir -p incomingbuilds/linux64 - cp -r builds/* incomingbuilds/linux64/ artifacts: @@ -175,13 +182,14 @@ build_linux_x86: tags: - buildfarm - linux + when: manual script: - git submodule update --init --recursive - chmod +x external/buildscripts/bee - cd external/buildscripts - ./bee - cd ../.. - - perl external/buildscripts/build_runtime_linux.pl + - perl external/buildscripts/build_runtime_linux.pl --stevedorebuilddeps=1 - mkdir -p incomingbuilds/linux32 - cp -r builds/* incomingbuilds/linux32/ artifacts: @@ -195,6 +203,7 @@ build_linux_x86: collate_builds: image: ubuntu:latest stage: collate + when: manual dependencies: - build_android - build_osx_runtime diff --git a/external/buildscripts/Build.bee.cs b/external/buildscripts/Build.bee.cs index 815c9d3443a60e46309338f671f126d65fb1b6e0..1cb8a1beeb3040f002eaaffc8da2e8f48e6db1c6 100644 --- a/external/buildscripts/Build.bee.cs +++ b/external/buildscripts/Build.bee.cs @@ -23,9 +23,6 @@ namespace BuildProgram var buildScriptsRoot = monoRoot.Combine("external").Combine("buildscripts"); Console.WriteLine(">>> Build scripts directory: " + buildScriptsRoot); - var monoBuildDeps = monoRoot.Parent.Parent.Combine("mono-build-deps").Combine("build"); - Console.WriteLine(">>> Mono build dependecies directory: " + monoBuildDeps); - var buildDependenciesConfigFile = buildScriptsRoot.Combine("buildDependencies.txt"); Console.WriteLine(">>> Mono build dependecies stevedore version config file: " + buildDependenciesConfigFile); @@ -34,21 +31,14 @@ namespace BuildProgram if (buildDependenciesConfigFile.Exists()) { - if (!monoBuildDeps.DirectoryExists()) - { - Console.WriteLine(">>> " + monoBuildDeps + " does not exist. Creating it ..."); - monoBuildDeps.CreateDirectory(); - } + var artifactList = ParseBuildDependenciesConfigFile(buildDependenciesConfigFile.ToString()); - var artifactNameIdFilesDictionary = ParseBuildDependenciesConfigFile(buildDependenciesConfigFile.ToString()); - - foreach (var item in artifactNameIdFilesDictionary) + foreach (var item in artifactList) { - var artifactName = item.Key.Item1; - var artifactId = item.Key.Item2; - var repoName = item.Key.Item3; - var artifactFiles = item.Value; - DownloadAndCopyArtifact(artifactId, artifactName, repoName, artifactFiles, monoBuildDeps, stevedoreArtifactsDir); + var artifactName = item.Item1; + var artifactId = item.Item2; + var repoName = item.Item3; + DownloadArtifact(artifactId, artifactName, repoName); } } else @@ -57,46 +47,13 @@ namespace BuildProgram } } - private static void DownloadAndCopyArtifact(string artifactId, string artifactName, string repoName, IEnumerable artifacts, NPath monoBuildDeps, NPath stevedoreArtifactsDir) + private static void DownloadArtifact(string artifactId, string artifactName, string repoName) { + Console.WriteLine($">>> Registering artifact {artifactName}"); var artifact = new StevedoreArtifact(repoName, new ArtifactId(artifactId)); Backend.Current.Register(artifact); - - var inputs = new List(); - var targetFiles = new List(); - foreach (var item in artifacts) - { - inputs.Add(stevedoreArtifactsDir.Combine(artifactName).Combine(item)); - targetFiles.Add(monoBuildDeps.Combine(artifactName).Combine(item)); - } - - var targetDir = monoBuildDeps; - if (HostPlatform.IsWindows) - { - targetDir = monoBuildDeps.Combine(artifactName); - } - - Backend.Current.AddAction( - actionName: "CopyArtifact", - targetFiles: targetFiles.ToArray(), - inputs: inputs.ToArray(), - executableStringFor: ExecutableStringForDirectoryCopy(stevedoreArtifactsDir.Combine(artifactName), targetDir), - commandLineArguments: new string[] { }, - allowUnwrittenOutputFiles: true - ); } - private static void ExecuteBuildScript(NPath[] inputFiles, NPath buildScript, NPath buildRoot) - { - Backend.Current.AddAction( - actionName: "ExecuteBuildScript", - targetFiles: new[] { buildRoot}, - inputs: inputFiles, - executableStringFor: $"perl {buildScript}", - commandLineArguments: new string[] { }, - allowUnwrittenOutputFiles: true - ); - } private static NPath GetMonoRootDir() { var exePath = new NPath(System.Reflection.Assembly.GetEntryAssembly().Location); @@ -109,13 +66,6 @@ namespace BuildProgram return monoRoot; } - private static string ExecutableStringForDirectoryCopy(NPath from, NPath target) - { - return HostPlatform.IsWindows - ? $"xcopy {from.InQuotes(SlashMode.Native)} {target.InQuotes(SlashMode.Native)} /s /e /d /Y" - : $"cp -r -v {from.InQuotes(SlashMode.Native)} {target.InQuotes(SlashMode.Native)}"; - } - private static bool IsRunningOnBuildMachine() { var buildMachine = Environment.GetEnvironmentVariable("UNITY_THISISABUILDMACHINE"); @@ -128,21 +78,18 @@ namespace BuildProgram # name : # id : # repo : - # files : name: 7z id: 7z/9df1e3b3b120_12ed325f6a47f0e5cebc247dbe9282a5da280d392cce4e6c9ed227d57ff1e2ff.7z repo: testing - files : 7z name: libgdiplus id : libgdiplus/9df1e3b3b120_4cf7c08770db93922f54f38d2461b9122cddc898db58585864446e70c5ad3057.7z repo: public - files : libgdiplus,lib2 */ - private static Dictionary, List> ParseBuildDependenciesConfigFile(string buildDependenciesConfigFile) + private static List> ParseBuildDependenciesConfigFile(string buildDependenciesConfigFile) { - var artifactNameIdFilesDictionary = new Dictionary, List>(); + var artifactNameIdFilesDictionary = new List>(); var fileStream = new FileStream(buildDependenciesConfigFile, FileMode.Open, FileAccess.Read); using (var streamReader = new StreamReader(fileStream, Encoding.UTF8)) @@ -158,7 +105,6 @@ namespace BuildProgram var name = ""; var id = ""; var repoName = ""; - var files = ""; //read name name = line.Split(':')[1].Trim(); @@ -175,25 +121,7 @@ namespace BuildProgram else throw new Exception($">>> Invalid {buildDependenciesConfigFile}, repo name does not exist"); - //read comma separated folder/files list - if ((line = streamReader.ReadLine()) != null) - files = line.Split(':')[1].Trim(); - else - throw new Exception($">>> Invalid {buildDependenciesConfigFile}, files do not exist"); - - var filesList = new List(); - if (!string.IsNullOrEmpty(files)) - { - if (files.Contains(",")) - files.Split(',').ForEach(f => { filesList.Add(new NPath(f.Trim())); }); - else - filesList.Add(new NPath(files.Trim())); - } - else - { - throw new Exception($">>> Invalid {buildDependenciesConfigFile}"); - } - artifactNameIdFilesDictionary.Add(new Tuple(name, id, repoName), filesList); + artifactNameIdFilesDictionary.Add(new Tuple(name, id, repoName)); } } } diff --git a/external/buildscripts/build.pl b/external/buildscripts/build.pl index 3c303fc1c6bb3ba82674fb650ec8235100ec2366..396fab0f230b7639b39f33905036fa985100ffee 100644 --- a/external/buildscripts/build.pl +++ b/external/buildscripts/build.pl @@ -64,6 +64,7 @@ my $iphoneSimulatorArch=""; my $tizen=0; my $tizenEmulator=0; my $windowsSubsystemForLinux=0; +my $stevedoreBuildDeps=0; # Handy troubleshooting/niche options my $skipMonoMake=0; @@ -115,6 +116,7 @@ GetOptions( 'tizenemulator=i'=>\$tizenEmulator, 'windowssubsystemforlinux=i'=>\$windowsSubsystemForLinux, 'enablecachefile=i'=>\$enableCacheFile, + 'stevedorebuilddeps=i'=>\$stevedoreBuildDeps, ) or die ("illegal cmdline options"); print ">>> Mono checkout = $monoroot\n"; @@ -173,8 +175,16 @@ if ($buildDeps ne "" && not $forceDefaultBuildDeps) } else { - $externalBuildDeps = "$monoroot/../../mono-build-deps/build"; + if($stevedoreBuildDeps) + { + $externalBuildDeps = "$monoroot/external/buildscripts/artifacts/Stevedore"; + } + else + { + $externalBuildDeps = "$monoroot/../../mono-build-deps/build"; + } } +print(">>> External build deps = $externalBuildDeps\n"); # Only clean up the path if the directory exists, if it doesn't exist, # abs_path ends up returning an empty string @@ -356,41 +366,63 @@ if ($build) my $automakeDir = "$externalBuildDeps/automake-1-16-1/automake-$automakeVersion"; my $libtoolDir = "$externalBuildDeps/libtool-2-4-6/libtool-$libtoolVersion"; my $builtToolsDir = "$externalBuildDeps/built-tools"; - + $ENV{PATH} = "$builtToolsDir/bin:$ENV{PATH}"; - if (!(-d "$autoconfDir")) + if ($stevedoreBuildDeps) + { + $autoconfDir = "$externalBuildDeps/autoconf-src/autoconf-$autoconfVersion"; + } + elsif (!(-d "$autoconfDir")) { + print(">>> Extracting autoconf\n"); chdir("$externalBuildDeps/autoconf-2-69") eq 1 or die ("failed to chdir to external directory\n"); system("tar xzf autoconf-$autoconfVersion.tar.gz") eq 0 or die ("failed to extract autoconf\n"); - + } + if (-d "$autoconfDir") + { + print(">>> Installing autoconf from $autoconfDir\n"); chdir("$autoconfDir") eq 1 or die ("failed to chdir to autoconf directory\n"); system("./configure --prefix=$builtToolsDir") eq 0 or die ("failed to configure autoconf\n"); system("make") eq 0 or die ("failed to make autoconf\n"); system("make install") eq 0 or die ("failed to make install autoconf\n"); - - chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n"); + chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n"); } - - if (!(-d "$texinfoDir") and $windowsSubsystemForLinux) + + if ($stevedoreBuildDeps and $windowsSubsystemForLinux) + { + $texinfoDir = "$externalBuildDeps/texinfo-src/texinfo-$texinfoVersion"; + } + elsif (!(-d "$texinfoDir") and $windowsSubsystemForLinux) { + print(">>> Extracting texinfo\n"); chdir("$externalBuildDeps/texinfo-4-8") eq 1 or die ("failed to chdir to external directory\n"); system("tar xzf texinfo-$texinfoVersion.tar.gz") eq 0 or die ("failed to extract texinfo\n"); - + } + if (-d "$texinfoDir") + { + print(">>> Installing texinfo from $texinfoDir\n"); chdir($texinfoDir) eq 1 or die ("failed to chdir to texinfo directory\n"); system("./configure --prefix=$builtToolsDir") eq 0 or die ("failed to configure texinfo\n"); system("make") eq 0 or die ("failed to make texinfo\n"); system("make install") eq 0 or die ("failed to make install texinfo\n"); - chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n"); } - if (!(-d "$automakeDir")) + if ($stevedoreBuildDeps) { - my $automakeMakeFlags = ""; - chdir("$externalBuildDeps/automake-1-16-1") eq 1 or die ("failed to chdir to external directory\n"); + $automakeDir = "$externalBuildDeps/automake-src/automake-$automakeVersion"; + } + elsif (!(-d "$automakeDir")) + { + print(">>> Extracting automake\n"); + chdir("$externalBuildDeps/automake-1-16-1"") eq 1 or die ("failed to chdir to external directory\n"); system("tar xzf automake-$automakeVersion.tar.gz") eq 0 or die ("failed to extract automake\n"); - + } + if (-d "$automakeDir") + { + my $automakeMakeFlags = ""; + print(">>> Installing automake from $automakeDir\n"); chdir("$automakeDir") eq 1 or die ("failed to chdir to automake directory\n"); if($windowsSubsystemForLinux) { @@ -404,16 +436,23 @@ if ($build) chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n"); } - if (!(-d "$libtoolDir")) + if ($stevedoreBuildDeps) + { + $libtoolDir = "$externalBuildDeps/libtool-src/libtool-$libtoolVersion"; + } + elsif (!(-d "$libtoolDir")) { + print(">>> Extracting libtool\n"); chdir("$externalBuildDeps/libtool-2-4-6") eq 1 or die ("failed to chdir to external directory\n"); system("tar xzf libtool-$libtoolVersion.tar.gz") eq 0 or die ("failed to extract libtool\n"); - + } + if (-d "$libtoolDir") + { + print(">>> Installing libtool from $libtoolDir\n"); chdir("$libtoolDir") eq 1 or die ("failed to chdir to libtool directory\n"); system("./configure --prefix=$builtToolsDir") eq 0 or die ("failed to configure libtool\n"); system("make") eq 0 or die ("failed to make libtool\n"); system("make install") eq 0 or die ("failed to make install libtool\n"); - chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n"); } diff --git a/external/buildscripts/buildDependencies.txt b/external/buildscripts/buildDependencies.txt index 6ce18ea3feb31fc817c59ebcb2fc05153faee353..939dc6f38ac6ad0446af202b0415f023acbda0ba 100644 --- a/external/buildscripts/buildDependencies.txt +++ b/external/buildscripts/buildDependencies.txt @@ -2,74 +2,59 @@ # name : # id : # repo : -# files : name : 7z id: 7z/9df1e3b3b120_12ed325f6a47f0e5cebc247dbe9282a5da280d392cce4e6c9ed227d57ff1e2ff.7z repo: testing -files : 7z name : libgdiplus id : libgdiplus/9df1e3b3b120_4cf7c08770db93922f54f38d2461b9122cddc898db58585864446e70c5ad3057.7z repo: testing -files : libgdiplus name : MacBuildEnvironment id : MacBuildEnvironment/9df1e3b3b120_2fc8e616a2e5dfb7907fc42d9576b427e692223c266dc3bc305de4bf03714e30.7z repo: testing -files : MacBuildEnvironment name : mono id : mono/9df1e3b3b120_f81c172b91f45b2e045f4ba52d5f65cc54041da1527f2c854bf9db3a99495007.7z repo: testing -files : mono name : MonoBleedingEdge id : MonoBleedingEdge/9df1e3b3b120_ab6d2f131e6bd4fe2aacafb0f683e8fa4e1ccba35552b6fe89bf359b6ee16215.7z repo: testing -files : MonoBleedingEdge name : reference-assemblies id : reference-assemblies/9df1e3b3b120_bbb4750c6bf0a1784bec7d7c04b8ef5881f31f6212136e014694f3864a388886.7z repo: testing -files : reference-assemblies name : linux-sdk-20170609 id : linux-sdk-20170609/9df1e3b3b120_9a3a0847d5b3767579e908b5a9ce050936617b1b9275a79a8b71bb3229998957.7z repo: testing -files : linux-sdk-20170609 -name : libtool-2-4-6 -id : libtool-2-4-6/9df1e3b3b120_50f88211570edd89e1bf344d33e416a2eb04519f54940ae72d954a5ee0b8a69c.7z -repo: testing -files : libtool-2-4-6 +name : libtool-src +id : libtool-src/2.4.6_49a0ed204b3b24572e044400cd05513f611bcca6ced0d0816a57ac3b17376257.7z +repo: public -name : texinfo-4-8 -id : texinfo-4-8/9df1e3b3b120_f0f8445fc0e8b8d6f52b8be4c3ff09fa59c30ff4424fe8c9bea951b9893540c9.7z -repo: testing -files : texinfo-4-8 +name : texinfo-src +id : texinfo-src/4.8_975b9657ebef8a4fe3897047ca450b757a0a956b05399dc813f63e84829bac6a.7z +repo: public -name : automake-1-15 -id : automake-1-15/9df1e3b3b120_815e3ebf8d8bd08aa7f6ac1bbdff50d0379febba2049a5520247f7f4a1a6b3a3.7z -repo: testing -files : automake-1-15 +name : automake-src +id : automake-src/1.15_de1f60706336df404881d3c789d8e04f0bc50e6bf577d78cae438b089b02d8ed.7z +repo: public -name : autoconf-2-69 -id : autoconf-2-69/9df1e3b3b120_08915db7451aeafc86abedc46ef88243a1179ebaef4829ac75e5de8bfc80d0d2.7z -repo: testing -files : autoconf-2-69 +name : autoconf-src +id : autoconf-src/2.69_0e4ba7a0363c68ad08a7d138b228596aecdaea68e1d8b8eefc645e6ac8fc85c7.7z +repo: public name : android-ndk-r16b-darwin id : android-ndk-r16b-darwin/9df1e3b3b120_c7cda5a221dd72799b7e618597b3f8766df7183d386becb2785631c2d3ac0d75.7z repo: testing -files : android-ndk-r16b-darwin name : android-ndk-r16b-linux id : android-ndk-r16b-linux/9df1e3b3b120_fbabd18208d82cbc810266e8b566bb0ea4e1e438de38d450a92deaa3e23757b6.7z repo: testing -files : android-ndk-r16b-linux name : android-ndk-r16b-windows id : android-ndk-r16b-windows/9df1e3b3b120_403e0d58eabae03f0d9e8d1d2cea2dbf1d14c380c3d1c7eeb6e8c60ffc15e1b8.7z -repo: testing -files : android-ndk-r16b-windows \ No newline at end of file +repo: testing \ No newline at end of file diff --git a/external/buildscripts/build_classlibs_osx.pl b/external/buildscripts/build_classlibs_osx.pl index fa96cc74cf32deff85662a67d872e998a91fa687..30d695655281fdef3564d2c613939501c685f80d 100644 --- a/external/buildscripts/build_classlibs_osx.pl +++ b/external/buildscripts/build_classlibs_osx.pl @@ -12,6 +12,7 @@ my $build = 1; my $clean = 1; my $mcsOnly = 0; my $skipMonoMake = 0; +my $stevedoreBuildDeps=0; # Handy troubleshooting/niche options @@ -24,6 +25,7 @@ GetOptions( "mcsOnly=i"=>\$mcsOnly, 'skipmonomake=i'=>\$skipMonoMake, 'shortprefix=i'=>\$shortPrefix, + 'stevedorebuilddeps=i'=>\$stevedoreBuildDeps, ) or die ("illegal cmdline options"); system( @@ -37,4 +39,5 @@ system( "--artifactscommon=1", "--buildusandboo=1", "--forcedefaultbuilddeps=1", + "--stevedorebuilddeps=$stevedoreBuildDeps", "--shortprefix=$shortPrefix") eq 0 or die ("Failed building mono\n"); diff --git a/external/buildscripts/build_runtime_android.pl b/external/buildscripts/build_runtime_android.pl index baf687dc903431a619a8802bc2f17841d5ad576e..f11767bf4b294bdd0d88fb4a8ba4cbdbc3ec4f7f 100644 --- a/external/buildscripts/build_runtime_android.pl +++ b/external/buildscripts/build_runtime_android.pl @@ -11,22 +11,24 @@ my $buildScriptsRoot = "$monoroot/external/buildscripts"; my $androidArch = ""; my $clean = 1; my $windowsSubsystemForLinux = 0; +my $stevedoreBuildDeps = 0; GetOptions( "androidarch=s"=>\$androidArch, "clean=i"=>\$clean, "windowssubsystemforlinux=i"=>\$windowsSubsystemForLinux, + "stevedorebuilddeps=i"=>\$stevedoreBuildDeps, ) or die ("illegal cmdline options"); # By default, build runtime for all the variants we need. But allow something to specify an individual variation to build if ($androidArch eq "") { - system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv5", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv5\n"); - system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv6_vfp", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv6_vfp\n"); - system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv7a", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv7a\n"); - system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=x86", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for x86\n"); + system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv5", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono for armv5\n"); + system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv6_vfp", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono for armv6_vfp\n"); + system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv7a", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono for armv7a\n"); + system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=x86", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono for x86\n"); } 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"); } diff --git a/external/buildscripts/build_runtime_linux.pl b/external/buildscripts/build_runtime_linux.pl index 836b7407d10aa88d3d2c032042b5a0f35deece96..a85d48cf7364a6506fab1cc630b2e936d6187923 100644 --- a/external/buildscripts/build_runtime_linux.pl +++ b/external/buildscripts/build_runtime_linux.pl @@ -8,10 +8,12 @@ my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../.."); my $monoroot = abs_path($monoroot); my $buildScriptsRoot = "$monoroot/external/buildscripts"; +my $stevedoreBuildDeps = 0; my $build64 = 0; GetOptions( "build64=i"=>\$build64, + "stevedorebuilddeps=i"=>\$stevedoreBuildDeps, ) or die ("illegal cmdline options"); my $arch32 = 1; @@ -20,4 +22,4 @@ if ($build64) $arch32 = 0; } -system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--test=1", "--artifact=1", "--arch32=$arch32", "--classlibtests=0", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building mono\n"); +system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--test=1", "--artifact=1", "--arch32=$arch32", "--classlibtests=0", "--forcedefaultbuilddeps=1", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono\n"); diff --git a/external/buildscripts/build_runtime_osx.pl b/external/buildscripts/build_runtime_osx.pl index 82b9d5f64b3b2b266437e2aea325112ea361b0a9..5f2c3ae7f31e6124e3b353fc2a0dae3bd4570300 100644 --- a/external/buildscripts/build_runtime_osx.pl +++ b/external/buildscripts/build_runtime_osx.pl @@ -8,4 +8,10 @@ my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../.."); my $monoroot = abs_path($monoroot); my $buildScriptsRoot = "$monoroot/external/buildscripts"; -system("perl", "$buildScriptsRoot/build_all_osx.pl", "--build=1", "--artifact=1", "--test=1", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building mono\n"); +my $stevedoreBuildDeps=0; + +GetOptions( + 'stevedorebuilddeps=i'=>\$stevedoreBuildDeps, +) or die ("illegal cmdline options"); + +system("perl", "$buildScriptsRoot/build_all_osx.pl", "--build=1", "--artifact=1", "--test=1", "--forcedefaultbuilddeps=1", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono\n"); diff --git a/external/buildscripts/build_runtime_win.pl b/external/buildscripts/build_runtime_win.pl index 9022ed3f5413527c247429382fd0196923dd44db..7a3e8a41930fe24319dccc9c74049230a4e8e889 100644 --- a/external/buildscripts/build_runtime_win.pl +++ b/external/buildscripts/build_runtime_win.pl @@ -7,8 +7,13 @@ use File::Path; my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../.."); my $monoroot = abs_path($monoroot); my $buildScriptsRoot = "$monoroot/external/buildscripts"; +my $stevedoreBuildDeps = 0; + +GetOptions( + "stevedorebuilddeps=i"=>\$stevedoreBuildDeps, +) or die ("illegal cmdline options"); # Note : Ideally we can switch back to this build approach once the random cygwin hangs on the build machines are sorted out -#system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--test=1", "--artifact=1", "--arch32=1", "--classlibtests=0", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building mono\n"); +#system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--test=1", "--artifact=1", "--arch32=1", "--classlibtests=0", "--forcedefaultbuilddeps=1", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono\n"); -system("perl", "$buildScriptsRoot/build_win_no_cygwin.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building mono\n"); +system("perl", "$buildScriptsRoot/build_win_no_cygwin.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--forcedefaultbuilddeps=1", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono\n"); diff --git a/external/buildscripts/build_runtime_win64.pl b/external/buildscripts/build_runtime_win64.pl index 24bf9821282d9e1a0ace0d889580f550ac1a18a7..1de06035212b0f3fc17af76d0318cd09b8621f4e 100644 --- a/external/buildscripts/build_runtime_win64.pl +++ b/external/buildscripts/build_runtime_win64.pl @@ -8,7 +8,13 @@ my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../.."); my $monoroot = abs_path($monoroot); my $buildScriptsRoot = "$monoroot/external/buildscripts"; +my $stevedoreBuildDeps = 0; + +GetOptions( + "stevedorebuilddeps=i"=>\$stevedoreBuildDeps, +) or die ("illegal cmdline options"); + # Note : Ideally we can switch back to this build approach once the random cygwin hangs on the build machines are sorted out -#system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--test=1", "--artifact=1", "--classlibtests=0", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building mono\n"); +#system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--test=1", "--artifact=1", "--classlibtests=0", "--forcedefaultbuilddeps=1", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono\n"); -system("perl", "$buildScriptsRoot/build_win_no_cygwin.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=0", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building mono\n"); +system("perl", "$buildScriptsRoot/build_win_no_cygwin.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=0", "--forcedefaultbuilddeps=1", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono\n"); diff --git a/external/buildscripts/build_win_no_cygwin.pl b/external/buildscripts/build_win_no_cygwin.pl index 3249c10c959b24694578d2144475df84256a1898..be2eef11e3f7c3b2730dc592d7a93e3886c03dda 100644 --- a/external/buildscripts/build_win_no_cygwin.pl +++ b/external/buildscripts/build_win_no_cygwin.pl @@ -37,6 +37,7 @@ my $winPerl = "perl"; my $winMonoRoot = $monoroot; my $msBuildVersion = "14.0"; my $buildDeps = ""; +my $stevedoreBuildDeps=0; print(">>> Build All Args = @ARGV\n"); @@ -53,6 +54,7 @@ GetOptions( 'checkoutonthefly=i'=>\$checkoutOnTheFly, 'builddeps=s'=>\$buildDeps, 'forcedefaultbuilddeps=i'=>\$forceDefaultBuildDeps, + 'stevedorebuilddeps=i'=>\$stevedoreBuildDeps, ) or die ("illegal cmdline options"); my $monoRevision = `git rev-parse HEAD`; @@ -72,8 +74,16 @@ if ($buildDeps ne "" && not $forceDefaultBuildDeps) } else { - $externalBuildDeps = "$monoroot/../../mono-build-deps/build"; + if($stevedoreBuildDeps) + { + $externalBuildDeps = "$monoroot/external/buildscripts/artifacts/Stevedore"; + } + else + { + $externalBuildDeps = "$monoroot/../../mono-build-deps/build"; + } } +print(">>> External build deps = $externalBuildDeps\n"); my $existingExternalMonoRoot = "$externalBuildDeps\\mono"; my $existingExternalMono = "$existingExternalMonoRoot\\win";