From 9bd736b9b4be1ea23baa3975bbe855cee74f43e8 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 4 Apr 2018 15:35:01 -0400 Subject: Add loongson3a Build jobs. Change-Id: I4a0259f82272099e08df0e7dea91489f6d641ca4 Reviewed-on: https://skia-review.googlesource.com/113670 Commit-Queue: Ben Wagner Reviewed-by: Mike Klein --- infra/bots/gen_tasks.go | 6 + infra/bots/jobs.json | 4 + .../Build-Debian9-GCC-loongson3a-Release.json | 72 +++++++++++ infra/bots/recipe_modules/flavor/examples/full.py | 1 + infra/bots/recipe_modules/flavor/gn_flavor.py | 31 ++++- infra/bots/tasks.json | 144 +++++++++++++++++++++ 6 files changed, 254 insertions(+), 4 deletions(-) create mode 100644 infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json (limited to 'infra') diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go index 76570ff15b..6706a46f01 100644 --- a/infra/bots/gen_tasks.go +++ b/infra/bots/gen_tasks.go @@ -546,6 +546,12 @@ func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) str if strings.Contains(name, "EMCC") { pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("emscripten_sdk")) } + if parts["target_arch"] == "mips64el" || parts["target_arch"] == "loongson3a" { + if parts["compiler"] != "GCC" { + glog.Fatalf("mips64el toolchain is GCC, but compiler is %q in %q", parts["compiler"], name) + } + pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("mips64el_toolchain_linux")) + } } else if strings.Contains(name, "Win") { deps = append(deps, isolateCIPDAsset(b, ISOLATE_WIN_TOOLCHAIN_NAME)) if strings.Contains(name, "Clang") { diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json index 5cf84d6fce..0cbc39c976 100644 --- a/infra/bots/jobs.json +++ b/infra/bots/jobs.json @@ -48,6 +48,10 @@ "Build-Debian9-EMCC-wasm-Release", "Build-Debian9-GCC-arm-Debug-Chromecast", "Build-Debian9-GCC-arm-Release-Chromecast", + "Build-Debian9-GCC-loongson3a-Debug", + "Build-Debian9-GCC-loongson3a-Release", + "Build-Debian9-GCC-mips64el-Debug", + "Build-Debian9-GCC-mips64el-Release", "Build-Debian9-GCC-x86-Debug", "Build-Debian9-GCC-x86-Release", "Build-Debian9-GCC-x86_64-Debug", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json new file mode 100644 index 0000000000..92099f6c9b --- /dev/null +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json @@ -0,0 +1,72 @@ +[ + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[CUSTOM_/_B_WORK]/skia/infra/bots/assets/mips64el_toolchain_linux/VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get mips64el_toolchain_linux VERSION" + }, + { + "cmd": [ + "python", + "-u", + "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release" + }, + "infra_step": true, + "name": "fetch-gn" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/skia/bin/gn", + "gen", + "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release/Release", + "--args=cc=\"[START_DIR]/mips64el_toolchain_linux/bin/mips64el-linux-gnuabi64-gcc-7\" cxx=\"[START_DIR]/mips64el_toolchain_linux/bin/mips64el-linux-gnuabi64-g++-7\" extra_cflags=[\"-Wno-format-truncation\", \"-Wno-uninitialized\", \"-DDUMMY_mips64el_toolchain_linux_version=42\", \"-Wno-strict-overflow\"] extra_ldflags=[\"-L[START_DIR]/mips64el_toolchain_linux/mips64el-linux-gnuabi64/lib\"] is_debug=false skia_enable_gpu=false skia_use_fontconfig=false skia_use_system_freetype2=false target_cpu=\"loongson3a\"" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "LD_LIBRARY_PATH": "[START_DIR]/mips64el_toolchain_linux/lib/x86_64-linux-gnu/", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-k", + "0", + "-C", + "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release/Release" + ], + "cwd": "[CUSTOM_/_B_WORK]/skia", + "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", + "LD_LIBRARY_PATH": "[START_DIR]/mips64el_toolchain_linux/lib/x86_64-linux-gnu/", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release" + }, + "name": "ninja" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +] \ No newline at end of file diff --git a/infra/bots/recipe_modules/flavor/examples/full.py b/infra/bots/recipe_modules/flavor/examples/full.py index 9030e2c43d..2bb86d912f 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.py +++ b/infra/bots/recipe_modules/flavor/examples/full.py @@ -70,6 +70,7 @@ TEST_BUILDERS = [ 'Build-Debian9-Clang-x86_64-Release-NoDEPS', 'Build-Debian9-Clang-x86_64-Release-Vulkan', 'Build-Debian9-EMCC-wasm-Release', + 'Build-Debian9-GCC-loongson3a-Release', 'Build-Debian9-GCC-x86_64-Debug-EmbededResouces', 'Build-Debian9-GCC-x86_64-Release-ANGLE', 'Build-Debian9-GCC-x86_64-Release-Flutter_Android', diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py index cc137ea8ad..f5efffa8b4 100644 --- a/infra/bots/recipe_modules/flavor/gn_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_flavor.py @@ -41,6 +41,8 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): cc, cxx = None, None extra_cflags = [] extra_ldflags = [] + args = {} + env = {} if compiler == 'Clang' and self.m.vars.is_linux: cc = clang_linux + '/bin/clang' @@ -56,7 +58,31 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): elif compiler == 'Clang': cc, cxx = 'clang', 'clang++' elif compiler == 'GCC': - cc, cxx = 'gcc', 'g++' + if target_arch in ['mips64el', 'loongson3a']: + mips64el_toolchain_linux = str(self.m.vars.slave_dir.join( + 'mips64el_toolchain_linux')) + cc = mips64el_toolchain_linux + '/bin/mips64el-linux-gnuabi64-gcc-7' + cxx = mips64el_toolchain_linux + '/bin/mips64el-linux-gnuabi64-g++-7' + env['LD_LIBRARY_PATH'] = ( + mips64el_toolchain_linux + '/lib/x86_64-linux-gnu/') + extra_ldflags.append('-L' + mips64el_toolchain_linux + + '/mips64el-linux-gnuabi64/lib') + extra_cflags.extend([ + '-Wno-format-truncation', + '-Wno-uninitialized', + ('-DDUMMY_mips64el_toolchain_linux_version=%s' % + self.m.run.asset_version('mips64el_toolchain_linux')) + ]) + if configuration == 'Release': + # This warning is only triggered when fuzz_canvas is inlined. + extra_cflags.append('-Wno-strict-overflow') + args.update({ + 'skia_use_system_freetype2': 'false', + 'skia_use_fontconfig': 'false', + 'skia_enable_gpu': 'false', + }) + else: + cc, cxx = 'gcc', 'g++' elif compiler == 'EMCC': cc = emscripten_sdk + '/emscripten/incoming/emcc' cxx = emscripten_sdk + '/emscripten/incoming/em++' @@ -91,9 +117,6 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): if 'MSAN' in extra_tokens: extra_ldflags.append('-L' + clang_linux + '/msan') - args = {} - env = {} - if configuration != 'Debug': args['is_debug'] = 'false' if 'ANGLE' in extra_tokens: diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index a47532d7dd..d6e93c11a1 100644 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -294,6 +294,30 @@ "Build-Debian9-GCC-arm-Release-Chromecast" ] }, + "Build-Debian9-GCC-loongson3a-Debug": { + "priority": 0.8, + "tasks": [ + "Build-Debian9-GCC-loongson3a-Debug" + ] + }, + "Build-Debian9-GCC-loongson3a-Release": { + "priority": 0.8, + "tasks": [ + "Build-Debian9-GCC-loongson3a-Release" + ] + }, + "Build-Debian9-GCC-mips64el-Debug": { + "priority": 0.8, + "tasks": [ + "Build-Debian9-GCC-mips64el-Debug" + ] + }, + "Build-Debian9-GCC-mips64el-Release": { + "priority": 0.8, + "tasks": [ + "Build-Debian9-GCC-mips64el-Release" + ] + }, "Build-Debian9-GCC-x86-Debug": { "priority": 0.8, "tasks": [ @@ -4772,6 +4796,126 @@ "isolate": "compile_skia.isolate", "priority": 0.8 }, + "Build-Debian9-GCC-loongson3a-Debug": { + "cipd_packages": [ + { + "name": "skia/bots/mips64el_toolchain_linux", + "path": "mips64el_toolchain_linux", + "version": "version:4" + } + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "os:Debian-9.2", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "compile", + "repository=<(REPO)", + "buildername=Build-Debian9-GCC-loongson3a-Debug", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "isolate": "compile_skia.isolate", + "priority": 0.8 + }, + "Build-Debian9-GCC-loongson3a-Release": { + "cipd_packages": [ + { + "name": "skia/bots/mips64el_toolchain_linux", + "path": "mips64el_toolchain_linux", + "version": "version:4" + } + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "os:Debian-9.2", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "compile", + "repository=<(REPO)", + "buildername=Build-Debian9-GCC-loongson3a-Release", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "isolate": "compile_skia.isolate", + "priority": 0.8 + }, + "Build-Debian9-GCC-mips64el-Debug": { + "cipd_packages": [ + { + "name": "skia/bots/mips64el_toolchain_linux", + "path": "mips64el_toolchain_linux", + "version": "version:4" + } + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "os:Debian-9.2", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "compile", + "repository=<(REPO)", + "buildername=Build-Debian9-GCC-mips64el-Debug", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "isolate": "compile_skia.isolate", + "priority": 0.8 + }, + "Build-Debian9-GCC-mips64el-Release": { + "cipd_packages": [ + { + "name": "skia/bots/mips64el_toolchain_linux", + "path": "mips64el_toolchain_linux", + "version": "version:4" + } + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "os:Debian-9.2", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "compile", + "repository=<(REPO)", + "buildername=Build-Debian9-GCC-mips64el-Release", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "isolate": "compile_skia.isolate", + "priority": 0.8 + }, "Build-Debian9-GCC-x86-Debug": { "dimensions": [ "cpu:x86-64-Haswell_GCE", -- cgit v1.2.3