aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/flavor
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2017-07-20 10:21:38 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-20 18:25:12 +0000
commitfe40abc14b0f63e10069478eb93b2ecc1ab0c616 (patch)
treeb3f483c288751ce8da86b5eda1a9e75dd2d00e03 /infra/bots/recipe_modules/flavor
parentf93552ba44328e86829bfe9d2735f7cd7cd16063 (diff)
Add new Android builder which uses API_LEVEL 26
Bug: skia:6870 Change-Id: Idd9a27518c1123c0a729b4d07461047f5530aae3 Reviewed-on: https://skia-review.googlesource.com/24960 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'infra/bots/recipe_modules/flavor')
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-Clang-arm-Release-Android_API26.json54
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.py1
-rw-r--r--infra/bots/recipe_modules/flavor/gn_android_flavor.py7
3 files changed, 62 insertions, 0 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-Clang-arm-Release-Android_API26.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-Clang-arm-Release-Android_API26.json
new file mode 100644
index 0000000000..8ac3e3fd14
--- /dev/null
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-Clang-arm-Release-Android_API26.json
@@ -0,0 +1,54 @@
+[
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-Clang-arm-Release-Android_API26"
+ },
+ "infra_step": true,
+ "name": "fetch-gn"
+ },
+ {
+ "cmd": [
+ "[CUSTOM_/_B_WORK]/skia/bin/gn",
+ "gen",
+ "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-Clang-arm-Release-Android_API26/Release",
+ "--args=is_debug=false ndk=\"[START_DIR]/android_ndk_linux\" ndk_api=26 target_cpu=\"arm\""
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-Clang-arm-Release-Android_API26"
+ },
+ "name": "gn gen"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-Clang-arm-Release-Android_API26/Release"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-Clang-arm-Release-Android_API26"
+ },
+ "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 14eca7fa1a..f7d0ae5587 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.py
+++ b/infra/bots/recipe_modules/flavor/examples/full.py
@@ -54,6 +54,7 @@ def RunSteps(api):
TEST_BUILDERS = [
+ 'Build-Debian9-Clang-arm-Release-Android_API26',
'Build-Mac-Clang-arm64-Debug-Android_Vulkan',
'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
'Build-Ubuntu-Clang-x86_64-Release-Mini',
diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
index 4dd1093450..c0cf748e43 100644
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
@@ -5,6 +5,7 @@
from recipe_engine import recipe_api
import default_flavor
+import re
import subprocess
@@ -69,6 +70,12 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
if 'Vulkan' in extra_config:
args['ndk_api'] = 24
args['skia_enable_vulkan_debug_layers'] = 'false'
+
+ # If an Android API level is specified, use that.
+ m = re.search(r'API(\d+)', extra_config)
+ if m and len(m.groups()) == 1:
+ args['ndk_api'] = m.groups()[0]
+
if extra_cflags:
args['extra_cflags'] = repr(extra_cflags).replace("'", '"')