diff options
author | Josh Matthews <josh@joshmatthews.net> | 2019-05-01 23:17:56 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2019-05-02 10:21:49 -0400 |
commit | 6ded5c97072cd8dac7246ca84d2932f7bee35821 (patch) | |
tree | e73ee5463dcb388b2d6d06ce2edcb126c8e5236d | |
parent | 0a5aab6cc2d23b6b9bf5de142e7a8a5b84e32380 (diff) | |
download | servo-6ded5c97072cd8dac7246ca84d2932f7bee35821.tar.gz servo-6ded5c97072cd8dac7246ca84d2932f7bee35821.zip |
Move android nightly build to taskcluster.
-rw-r--r-- | etc/ci/buildbot_steps.yml | 18 | ||||
-rw-r--r-- | etc/taskcluster/decision_task.py | 49 | ||||
-rw-r--r-- | etc/taskcluster/decisionlib.py | 16 |
3 files changed, 57 insertions, 26 deletions
diff --git a/etc/ci/buildbot_steps.yml b/etc/ci/buildbot_steps.yml index e422bd17aed..0f1b5245b1c 100644 --- a/etc/ci/buildbot_steps.yml +++ b/etc/ci/buildbot_steps.yml @@ -144,23 +144,6 @@ android-mac: - bash ./etc/ci/lockfile_changed.sh - ./etc/ci/clean_build_artifacts.sh -android-nightly: - env: - HOST_CC: gcc-5 - HOST_CXX: g++-5 - commands: - - ./mach clean-nightlies --keep 3 --force - - ./mach clean-cargo-cache --keep 3 --force - - ./etc/ci/clean_build_artifacts.sh - - ./mach bootstrap-android --accept-all-licences --build - - env --unset ANDROID_NDK --unset ANDROID_SDK ./mach build --android --release - - env --unset ANDROID_NDK --unset ANDROID_SDK ./mach package --android --release --maven - - env --unset ANDROID_NDK --unset ANDROID_SDK ./mach build --target=i686-linux-android --release - - env --unset ANDROID_NDK --unset ANDROID_SDK ./mach package --target=i686-linux-android --release --maven - - ./mach upload-nightly android - - ./mach upload-nightly maven - - ./etc/ci/clean_build_artifacts.sh - magicleap: env: MAGICLEAP_SDK: /Users/servo/magicleap/v0.17.0 @@ -265,3 +248,4 @@ windows-msvc-dev: [] android: [] android-x86: [] mac-rel-wpt1: [] +android-nightly: [] diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index c6b3ee228b3..8e45e4fd509 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -90,6 +90,8 @@ def main(task_for): daily_tasks_setup() with_rust_nightly() linux_nightly() + android_nightly("arm") + android_nightly("x86") # These are disabled in a "real" decision task, @@ -260,6 +262,41 @@ def android_arm32_dev(): ) +def android_nightly(job): + details = { + "arm": { + "mach_flag": "--android", + "name": "ARMv7", + "target": "armv7-linux-androideabi", + }, + "x86": { + "mach_flag": "--target i686-linux-android", + "name": "x86", + "target": "i686-linux-android", + } + } + + return ( + android_build_task("Release build") + .with_treeherder("Android " + details[job]["name"], "Nightly") + .with_features("taskclusterProxy") + .with_script(""" + ./mach build {flag} --release + ./mach package {flag} --release --maven + """.format(flag=details[job]["mach_flag"]) + .with_s3_upload_secret() + .with_script(""" + ./mach upload-nightly android + ./mach upload-nightly maven + """) + .with_artifacts( + "/repo/target/android/%s/release/servoapp.apk" % details[job]["target"], + "/repo/target/android/%s/release/servoview.aar" % details[job]["target"], + ) + .find_or_create(("build.android_%s_nightly." + CONFIG.git_sha) % details[job]["name"].lower()) + ) + + def android_arm32_release(): return ( android_build_task("Release build") @@ -359,19 +396,13 @@ def linux_nightly(): linux_build_task("Nightly build and upload") .with_treeherder("Linux x64", "Nightly") .with_features("taskclusterProxy") - .with_scopes("secrets:get:project/servo/s3-upload") - .with_env(PY=r"""if 1: - import urllib, json - url = "http://taskcluster/secrets/v1/secret/project/servo/s3-upload" - secret = json.load(urllib.urlopen(url))["secret"] - open("/root/.aws/credentials", "w").write(secret["credentials_file"]) - """) # Not reusing the build made for WPT because it has debug assertions .with_script(""" ./mach build --release ./mach package --release - mkdir /root/.aws - python -c "$PY" + """) + .with_s3_upload_secret() + .with_script(""" ./mach upload-nightly linux """) .with_artifacts("/repo/target/release/servo-tech-demo.tar.gz") diff --git a/etc/taskcluster/decisionlib.py b/etc/taskcluster/decisionlib.py index 6ba349e8d0d..b729c9c369c 100644 --- a/etc/taskcluster/decisionlib.py +++ b/etc/taskcluster/decisionlib.py @@ -173,6 +173,22 @@ class Task: self.treeherder_required = False # Taken care of return self + def with_s3_upload_secret(self): + return ( + self + .with_scopes("secrets:get:project/servo/s3-upload") + .with_env(PY=r"""if 1: + import urllib, json + url = "http://taskcluster/secrets/v1/secret/project/servo/s3-upload" + secret = json.load(urllib.urlopen(url))["secret"] + open("/root/.aws/credentials", "w").write(secret["credentials_file"]) + """) + .with_script(""" + mkdir /root/.aws + python -c "$PY" + """) + ) + def build_worker_payload(self): # pragma: no cover """ Overridden by sub-classes to return a dictionary in a worker-specific format, |