59 * input.target_os
60 * input.target_cpu
61 * input.build_os
62 * input.build_cpu
63 * input.target_platform
64 * input.build_platform
65 * // The build_osenv_* variables describe the unix layer on Windows systems,
66 * // i.e. Cygwin, which may also be 32 or 64 bit.
67 * input.build_osenv
68 * input.build_osenv_cpu
69 * input.build_osenv_platform
70 *
71 * For more complex nested attributes, there is a method "get":
72 *
73 * input.get("<dependency>", "<attribute>")
74 *
75 * Valid attributes are:
76 * install_path
77 * download_path
78 * download_dir
79 *
80 *
81 * The output data generated by this configuration file has the following
82 * format:
83 *
84 * data: {
85 * // Identifies the version of this format to the tool reading it
86 * format_version: "1.0",
87 *
88 * // Name of base outputdir. JIB assumes the actual output dir is formed
89 * // by adding the configuration name: <output_basedir>/<config-name>
90 * output_basedir: "build",
91 * // Configure argument to use to specify configuration name
92 * configuration_configure_arg:
93 * // Make argument to use to specify configuration name
94 * configuration_make_arg:
95 *
96 * profiles: {
97 * <profile-name>: {
98 * // Name of os the profile is built to run on
168 * checksum_path: <string>
169 * path: <string>
170 * }
171 * }
172 * }
173 */
174
175 /**
176 * Main entry to generate the profile configuration
177 *
178 * @param input External data to use for generating the configuration
179 * @returns {{}} Profile configuration
180 */
181 var getJibProfiles = function (input) {
182
183 var data = {};
184
185 // Identifies the version of this format to the tool reading it.
186 // 1.1 signifies that the publish, publish-src and get-src features are usable.
187 // 1.2 signifies that artifact uploads should fail on missing artifacts by default.
188 data.format_version = "1.2";
189
190 // Organization, product and version are used when uploading/publishing build results
191 data.organization = "";
192 data.product = "jdk";
193 data.version = getVersion();
194
195 // The base directory for the build output. JIB will assume that the
196 // actual build directory will be <output_basedir>/<configuration>
197 data.output_basedir = "build";
198 // The configure argument to use to specify the name of the configuration
199 data.configuration_configure_arg = "--with-conf-name=";
200 // The make argument to use to specify the name of the configuration
201 data.configuration_make_arg = "CONF_NAME=";
202
203 // Exclude list to use when Jib creates a source bundle
204 data.src_bundle_excludes = [
205 "build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork", "{,**/}JTreport",
206 "{,**/}.git"
207 ];
208 // Include list to use when creating a minimal jib source bundle which
346 remote: [
347 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-debug.tar.gz",
348 "bundles/" + pf + "/\\1"
349 ],
350 exploded: "images/test"
351 },
352 jdk_symbols: {
353 local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)",
354 remote: [
355 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
356 "bundles/" + pf + "/\\1"
357 ],
358 subdir: jdk_subdir,
359 exploded: "images/jdk"
360 },
361 }
362 };
363 };
364
365 common.boot_jdk_version = "11";
366 common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk-"
367 + common.boot_jdk_version
368 + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
369
370 return common;
371 };
372
373 /**
374 * Generates the profiles part of the configuration.
375 *
376 * @param input External data to use for generating the configuration
377 * @param common The common values
378 * @returns {{}} Profiles part of the configuration
379 */
380 var getJibProfilesProfiles = function (input, common, data) {
381 // Main SE profiles
382 var profiles = {
383
384 "linux-x64": {
385 target_os: "linux",
386 target_cpu: "x64",
469 });
470
471 // Generate debug versions of all the main profiles
472 common.main_profile_names.forEach(function (name) {
473 var debugName = name + common.debug_suffix;
474 profiles[debugName] = concatObjects(profiles[name],
475 common.debug_profile_base);
476 });
477 // Generate slowdebug versions of all the main profiles
478 common.main_profile_names.forEach(function (name) {
479 var debugName = name + common.slowdebug_suffix;
480 profiles[debugName] = concatObjects(profiles[name],
481 common.slowdebug_profile_base);
482 });
483 // Generate testmake profiles for the main profile of each build host
484 // platform. This profile only runs the makefile tests.
485 // Ant is needed to run the idea project generator test.
486 var testmakeBase = {
487 dependencies: [ "ant" ],
488 environment: {
489 "ANT_HOME": input.get("ant", "install_path") + "/apache-ant-1.7.1"
490 }
491 };
492 [ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"]
493 .forEach(function (name) {
494 var maketestName = name + "-testmake";
495 profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
496 profiles[maketestName].default_make_targets = [ "test-make" ];
497 });
498
499 // Profiles for building the zero jvm variant. These are used for verification.
500 var zeroProfiles = {
501 "linux-x64-zero": {
502 target_os: "linux",
503 target_cpu: "x64",
504 dependencies: ["devkit"],
505 configure_args: concat(common.configure_args_64bit, [
506 "--with-zlib=system",
507 "--with-jvm-variants=zero",
508 "--enable-libffi-bundling"
509 ])
844 profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
845 runTestPrebuiltSrcFullExtra);
846 }
847
848 // Generate the missing platform attributes
849 profiles = generatePlatformAttributes(profiles);
850 profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
851 return profiles;
852 };
853
854 /**
855 * Generate the dependencies part of the configuration
856 *
857 * @param input External data to use for generating the configuration
858 * @param common The common values
859 * @returns {{}} Dependencies part of configuration
860 */
861 var getJibProfilesDependencies = function (input, common) {
862
863 var devkit_platform_revisions = {
864 linux_x64: "gcc7.3.0-OEL6.4+1.1",
865 macosx_x64: "Xcode9.4-MacOSX10.13+1.0",
866 solaris_x64: "SS12u4-Solaris11u1+1.0",
867 solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
868 windows_x64: "VS2017-15.5.5+1.0",
869 linux_aarch64: "gcc7.3.0-Fedora27+1.2",
870 linux_arm: "gcc7.3.0-Fedora27+1.2"
871 };
872
873 var devkit_platform = (input.target_cpu == "x86"
874 ? input.target_os + "_x64"
875 : input.target_platform);
876
877 var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
878 + "-" + input.build_cpu;
879 var boot_jdk_ext = (input.build_os == "windows" ? ".zip" : ".tar.gz")
880 // If running in WSL and building for Windows, it will look like Linux,
881 // but we need a Windows boot JDK.
882 if (isWsl(input) && input.target_os == "windows") {
883 boot_jdk_platform = "windows-" + input.build_cpu;
884 boot_jdk_ext = ".zip";
986 configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
987 environment_path: input.get("graphviz", "install_path")
988 },
989
990 pandoc: {
991 organization: common.organization,
992 ext: "tar.gz",
993 revision: "2.3.1+1.0",
994 module: "pandoc-" + input.build_platform,
995 configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
996 environment_path: input.get("pandoc", "install_path") + "/pandoc"
997 },
998
999 // This adds java jib as a dependency for the test artifacts resolver
1000 jib: {
1001 organization: "com.oracle.java.jib",
1002 ext: "zip",
1003 classifier: "distribution",
1004 revision: "3.0-SNAPSHOT",
1005 environment_name: "JIB_HOME",
1006 environment_value: input.get("jib", "install_path")
1007 + "/jib-3.0-SNAPSHOT-distribution"
1008 },
1009
1010 ant: {
1011 organization: common.organization,
1012 ext: "zip",
1013 revision: "1.7.1+1.0",
1014 configure_args: "",
1015 },
1016
1017 graalunit_lib: {
1018 organization: common.organization,
1019 ext: "zip",
1020 revision: "619_Apr_12_2018",
1021 module: "graalunit-lib",
1022 configure_args: "--with-graalunit-lib=" + input.get("graalunit_lib", "install_path"),
1023 environment_name: "GRAALUNIT_LIB"
1024 },
1025 };
1026
1027 return dependencies;
|
59 * input.target_os
60 * input.target_cpu
61 * input.build_os
62 * input.build_cpu
63 * input.target_platform
64 * input.build_platform
65 * // The build_osenv_* variables describe the unix layer on Windows systems,
66 * // i.e. Cygwin, which may also be 32 or 64 bit.
67 * input.build_osenv
68 * input.build_osenv_cpu
69 * input.build_osenv_platform
70 *
71 * For more complex nested attributes, there is a method "get":
72 *
73 * input.get("<dependency>", "<attribute>")
74 *
75 * Valid attributes are:
76 * install_path
77 * download_path
78 * download_dir
79 * home_path
80 *
81 *
82 * The output data generated by this configuration file has the following
83 * format:
84 *
85 * data: {
86 * // Identifies the version of this format to the tool reading it
87 * format_version: "1.0",
88 *
89 * // Name of base outputdir. JIB assumes the actual output dir is formed
90 * // by adding the configuration name: <output_basedir>/<config-name>
91 * output_basedir: "build",
92 * // Configure argument to use to specify configuration name
93 * configuration_configure_arg:
94 * // Make argument to use to specify configuration name
95 * configuration_make_arg:
96 *
97 * profiles: {
98 * <profile-name>: {
99 * // Name of os the profile is built to run on
169 * checksum_path: <string>
170 * path: <string>
171 * }
172 * }
173 * }
174 */
175
176 /**
177 * Main entry to generate the profile configuration
178 *
179 * @param input External data to use for generating the configuration
180 * @returns {{}} Profile configuration
181 */
182 var getJibProfiles = function (input) {
183
184 var data = {};
185
186 // Identifies the version of this format to the tool reading it.
187 // 1.1 signifies that the publish, publish-src and get-src features are usable.
188 // 1.2 signifies that artifact uploads should fail on missing artifacts by default.
189 // 1.3 input.get(<dep>, "home_path") automatically goes down into a single top
190 // dir just like default configure_args and environment_path variables.
191 data.format_version = "1.3";
192
193 // Organization, product and version are used when uploading/publishing build results
194 data.organization = "";
195 data.product = "jdk";
196 data.version = getVersion();
197
198 // The base directory for the build output. JIB will assume that the
199 // actual build directory will be <output_basedir>/<configuration>
200 data.output_basedir = "build";
201 // The configure argument to use to specify the name of the configuration
202 data.configuration_configure_arg = "--with-conf-name=";
203 // The make argument to use to specify the name of the configuration
204 data.configuration_make_arg = "CONF_NAME=";
205
206 // Exclude list to use when Jib creates a source bundle
207 data.src_bundle_excludes = [
208 "build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork", "{,**/}JTreport",
209 "{,**/}.git"
210 ];
211 // Include list to use when creating a minimal jib source bundle which
349 remote: [
350 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-debug.tar.gz",
351 "bundles/" + pf + "/\\1"
352 ],
353 exploded: "images/test"
354 },
355 jdk_symbols: {
356 local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)",
357 remote: [
358 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
359 "bundles/" + pf + "/\\1"
360 ],
361 subdir: jdk_subdir,
362 exploded: "images/jdk"
363 },
364 }
365 };
366 };
367
368 common.boot_jdk_version = "11";
369 common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
370 + common.boot_jdk_version
371 + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
372
373 return common;
374 };
375
376 /**
377 * Generates the profiles part of the configuration.
378 *
379 * @param input External data to use for generating the configuration
380 * @param common The common values
381 * @returns {{}} Profiles part of the configuration
382 */
383 var getJibProfilesProfiles = function (input, common, data) {
384 // Main SE profiles
385 var profiles = {
386
387 "linux-x64": {
388 target_os: "linux",
389 target_cpu: "x64",
472 });
473
474 // Generate debug versions of all the main profiles
475 common.main_profile_names.forEach(function (name) {
476 var debugName = name + common.debug_suffix;
477 profiles[debugName] = concatObjects(profiles[name],
478 common.debug_profile_base);
479 });
480 // Generate slowdebug versions of all the main profiles
481 common.main_profile_names.forEach(function (name) {
482 var debugName = name + common.slowdebug_suffix;
483 profiles[debugName] = concatObjects(profiles[name],
484 common.slowdebug_profile_base);
485 });
486 // Generate testmake profiles for the main profile of each build host
487 // platform. This profile only runs the makefile tests.
488 // Ant is needed to run the idea project generator test.
489 var testmakeBase = {
490 dependencies: [ "ant" ],
491 environment: {
492 "ANT_HOME": input.get("ant", "home_path")
493 }
494 };
495 [ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"]
496 .forEach(function (name) {
497 var maketestName = name + "-testmake";
498 profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
499 profiles[maketestName].default_make_targets = [ "test-make" ];
500 });
501
502 // Profiles for building the zero jvm variant. These are used for verification.
503 var zeroProfiles = {
504 "linux-x64-zero": {
505 target_os: "linux",
506 target_cpu: "x64",
507 dependencies: ["devkit"],
508 configure_args: concat(common.configure_args_64bit, [
509 "--with-zlib=system",
510 "--with-jvm-variants=zero",
511 "--enable-libffi-bundling"
512 ])
847 profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
848 runTestPrebuiltSrcFullExtra);
849 }
850
851 // Generate the missing platform attributes
852 profiles = generatePlatformAttributes(profiles);
853 profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
854 return profiles;
855 };
856
857 /**
858 * Generate the dependencies part of the configuration
859 *
860 * @param input External data to use for generating the configuration
861 * @param common The common values
862 * @returns {{}} Dependencies part of configuration
863 */
864 var getJibProfilesDependencies = function (input, common) {
865
866 var devkit_platform_revisions = {
867 linux_x64: "gcc7.3.0-OEL6.4+1.2",
868 macosx_x64: "Xcode9.4-MacOSX10.13+1.0",
869 solaris_x64: "SS12u4-Solaris11u1+1.0",
870 solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
871 windows_x64: "VS2017-15.5.5+1.0",
872 linux_aarch64: "gcc7.3.0-Fedora27+1.2",
873 linux_arm: "gcc7.3.0-Fedora27+1.2"
874 };
875
876 var devkit_platform = (input.target_cpu == "x86"
877 ? input.target_os + "_x64"
878 : input.target_platform);
879
880 var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
881 + "-" + input.build_cpu;
882 var boot_jdk_ext = (input.build_os == "windows" ? ".zip" : ".tar.gz")
883 // If running in WSL and building for Windows, it will look like Linux,
884 // but we need a Windows boot JDK.
885 if (isWsl(input) && input.target_os == "windows") {
886 boot_jdk_platform = "windows-" + input.build_cpu;
887 boot_jdk_ext = ".zip";
989 configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
990 environment_path: input.get("graphviz", "install_path")
991 },
992
993 pandoc: {
994 organization: common.organization,
995 ext: "tar.gz",
996 revision: "2.3.1+1.0",
997 module: "pandoc-" + input.build_platform,
998 configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
999 environment_path: input.get("pandoc", "install_path") + "/pandoc"
1000 },
1001
1002 // This adds java jib as a dependency for the test artifacts resolver
1003 jib: {
1004 organization: "com.oracle.java.jib",
1005 ext: "zip",
1006 classifier: "distribution",
1007 revision: "3.0-SNAPSHOT",
1008 environment_name: "JIB_HOME",
1009 environment_value: input.get("jib", "home_path")
1010 },
1011
1012 ant: {
1013 organization: common.organization,
1014 ext: "zip",
1015 revision: "1.7.1+1.0",
1016 configure_args: "",
1017 },
1018
1019 graalunit_lib: {
1020 organization: common.organization,
1021 ext: "zip",
1022 revision: "619_Apr_12_2018",
1023 module: "graalunit-lib",
1024 configure_args: "--with-graalunit-lib=" + input.get("graalunit_lib", "install_path"),
1025 environment_name: "GRAALUNIT_LIB"
1026 },
1027 };
1028
1029 return dependencies;
|