Skip to content

Taskcluster: build for Android x86 and test in emulator - #22046

Merged
bors-servo merged 8 commits into
masterfrom
tc-android-x86
Nov 1, 2018
Merged

bors-servo merged 8 commits into
masterfrom
tc-android-x86

Conversation

@SimonSapin

@SimonSapin SimonSapin commented Oct 29, 2018 •

Copy link
Copy Markdown
Member

This adds to Taskcluster the equivalent of Buildbot’s android-x86 job. CC servo/saltfs#559

Like on Buildbot, the Android emulator runs on a Packet.net server. However we can compiler in a separate task, and run that task on fast AWS instances. The Packet server is provisionned and installed automatically with Terraform scripts forked from https://github.com/taskcluster/taskcluster-infrastructure/tree/master/modules/docker-worker.

Taskcluster’s “livelog” functionality seems to be broken on Packet tasks, so logs are only available after a task is completed.


This change is Reviewable

@SimonSapin

SimonSapin commented Oct 29, 2018 •

Copy link
Copy Markdown
Member Author

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 30, 2018
@SimonSapin

Copy link
Copy Markdown
Member Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit d1a18dc with merge e814dc4...

bors-servo pushed a commit that referenced this pull request Oct 30, 2018
WIP: Taskcluster: build for Android x86 and test in emulator

This adds to Taskcluster the equivalent of Buildbot’s `android-x86` job. CC servo/saltfs#559

Like on Buildbot, the Android emulator runs on a Packet.net server. However we can compiler in a separate task, and run that task on fast AWS instances. The Packet server is provisionned and installed automatically with Terraform scripts forked from https://github.com/taskcluster/taskcluster-infrastructure/tree/master/modules/docker-worker.

Taskcluster’s “livelog” functionality seems to be broken on Packet tasks, so logs are only available after a task is completed.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22046)
<!-- Reviewable:end -->
@SimonSapin SimonSapin changed the title WIP: Taskcluster: build for Android x86 and test in emulator Taskcluster: build for Android x86 and test in emulator Oct 30, 2018
@SimonSapin

Copy link
Copy Markdown
Member Author

This is ready for review. r? @Manishearth

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 30, 2018
@SimonSapin

SimonSapin commented Oct 30, 2018 •

Copy link
Copy Markdown
Member Author

The relevant task is green: https://tools.taskcluster.net/groups/Uy6sz-rURdaFnJDFPuo4oA/tasks/LYITcvGFTqiLlG5v3149cQ/details

Although it is running on a much weaker CPU (Intel Atom C2550 @ 2.4 GHz) than the equivalent Buildbot job (Intel Xeon E3-1240 @ 3.5 GHz), it is slightly worrying that this task that runs very few tests and does not compile Servo takes a full 8 minutes. The logs from the emulator contain:

warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]

Maybe it’s trying to use some CPU functionality that are not available on Atom?

@SimonSapin

Copy link
Copy Markdown
Member Author

https://en.wikipedia.org/wiki/CPUID links to https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets#ABM which says abm refers to population count and leading zeroes count instructions. It seems unlikely that their absence alone would cause such a slow-down.

@jdm

jdm commented Oct 30, 2018

Copy link
Copy Markdown
Member

Can you try running all of the webgl tests and see how long that takes?

@SimonSapin

Copy link
Copy Markdown
Member Author

Still with very few test (not all of webgl), with time added in front of most commands, selected output:

[taskcluster 2018-10-30 13:21:47.763Z] === Task Starting ===
+ git fetch --depth 1 https://github.com/servo/servo.git refs/heads/try-taskcluster
real	0m12.615s
user	0m7.512s
sys	0m1.844s
+ git reset --hard fe4188792da52e0afdeaa4b0f803775552f20290
real	0m8.492s
user	0m3.856s
sys	0m4.604s
+ curl --retry 5 --connect-timeout 10 -Lf https://queue.taskcluster.net/v1/task/HRVznverSRWJJVQOXn1qrg/artifacts/public/servoapp.apk -o target/i686-linux-android/release/servoapp.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 33.5M  100 33.5M    0     0  25.2M      0  0:00:01  0:00:01 --:--:-- 72.5M
+ ./mach bootstrap-android --accept-all-licences --emulator-x86
real	3m17.294s
user	3m4.800s
sys	0m35.644s
+ ./mach test-android-startup --release
real	1m20.665s
user	0m0.544s
sys	0m0.236s
+ ./mach test-wpt-android --release /_mozilla/mozilla/DOMParser.html /_mozilla/mozilla/webgl/context_creation_error.html
real	2m13.071s
user	5m34.992s
sys	0m29.480s
[taskcluster 2018-10-30 13:29:01.988Z] Successful task run with exit code: 0 completed in 435.795 seconds

Corresponding times on Buildbot (but on different hardware):

shell__4 './mach bootstrap-android ...' ( 1 mins, 11 secs )

test ran test-android-startup --release ( 26 secs )

test__1 ran test-wpt-android --release /_mozilla/mozilla/DOMParser.html /_mozilla/mozilla/webgl/context_creation_error.html ( 39 secs )

)
.find_or_create("build.android_x86_release." + CONFIG.git_sha)
)
return (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ignore if you disagree) can we split this into an android_x86_build and android_x86_test function?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect we’ll never want to build for Android x86 other than in order to run tests in the emulator (devices we care about are all ARM or ARM64), but if we ever do it’ll be easy to split then.

n = self.curl_scripts_count
return self \
.with_env(**{
"CURL_%s_URL" % n: url,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the n for making sure we don't end up caching distinct fetches? Can you leave a comment to that effect?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this method is called more than once for the same task definition, we want distinct environment variables variables since those variables end up in the same dictionary. This method itself doesn’t do caching, though.

Comment thread .taskcluster.yml
- "queue:route:index.project.servo.servo.*"
- "docker-worker:cache:servo-*"
- "docker-worker:capability:privileged"
- "assume:project:servo:decision-task/trusted"

@Manishearth Manishearth Oct 31, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where can one view and edit these?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Manishearth

Copy link
Copy Markdown
Member

I don't quite understand the packet stuff, but r=me

@asajeffrey asajeffrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not that I know much.

""")
android_build_task("Android ARMv7: release build")
.with_script("./mach build --android --release")
.with_artifacts(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is a change to the ARMv7 build in a PR that's about android x86?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously Android ARMv7 was the only Android build configured in this file. This is refactored in order to share code between the various (two) Android builds. See the android_build_task function.

.with_dependencies(build_task)
.with_repo()
.with_curl_artifact_script(build_task, "target.tar.gz")
.with_script("tar -xzf target.tar.gz")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to the linux build in an Android PR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, all of this code is new and still a bit in flux. The “move curl’ing artifacts into decisionlib” commit could have been a separate PR, but since it’s merely nicer (IMO) code for doing the same thing I didn’t bother. (It is a separate commit though.)


def android_build_task(name):
return (
linux_build_task(name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, is this why there were linux changes?

@SimonSapin

Copy link
Copy Markdown
Member Author

Thank you both!

@bors-servo r=Manishearth+asajeffrey

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit d1a18dc has been approved by Manishearth+asajeffrey

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-tests-failed The changes caused existing tests to fail. labels Oct 31, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d1a18dc with merge 5551c44...

bors-servo pushed a commit that referenced this pull request Oct 31, 2018
Taskcluster: build for Android x86 and test in emulator

This adds to Taskcluster the equivalent of Buildbot’s `android-x86` job. CC servo/saltfs#559

Like on Buildbot, the Android emulator runs on a Packet.net server. However we can compiler in a separate task, and run that task on fast AWS instances. The Packet server is provisionned and installed automatically with Terraform scripts forked from https://github.com/taskcluster/taskcluster-infrastructure/tree/master/modules/docker-worker.

Taskcluster’s “livelog” functionality seems to be broken on Packet tasks, so logs are only available after a task is completed.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22046)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 31, 2018
@SimonSapin

Copy link
Copy Markdown
Member Author
Err:7 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 openjdk-8-jre-headless amd64 8u181-b13-0ubuntu0.18.04.1
  404  Not Found [IP: 91.189.88.149 80]

Added a Use apt-get update before apt-get install commit.

@bors-servo r=Manishearth+asajeffrey

@bors-servo

Copy link
Copy Markdown
Contributor

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit d1a18dc has been approved by Manishearth+asajeffrey

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 31, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d1a18dc with merge f1bf232...

bors-servo pushed a commit that referenced this pull request Oct 31, 2018
Taskcluster: build for Android x86 and test in emulator

This adds to Taskcluster the equivalent of Buildbot’s `android-x86` job. CC servo/saltfs#559

Like on Buildbot, the Android emulator runs on a Packet.net server. However we can compiler in a separate task, and run that task on fast AWS instances. The Packet server is provisionned and installed automatically with Terraform scripts forked from https://github.com/taskcluster/taskcluster-infrastructure/tree/master/modules/docker-worker.

Taskcluster’s “livelog” functionality seems to be broken on Packet tasks, so logs are only available after a task is completed.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22046)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 31, 2018
@SimonSapin

Copy link
Copy Markdown
Member Author

Err, forgot to push…

@bors-servo r=Manishearth+asajeffrey

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit b1da53e has been approved by Manishearth+asajeffrey

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 31, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit b1da53e with merge eea3c5d...

bors-servo pushed a commit that referenced this pull request Oct 31, 2018
Taskcluster: build for Android x86 and test in emulator

This adds to Taskcluster the equivalent of Buildbot’s `android-x86` job. CC servo/saltfs#559

Like on Buildbot, the Android emulator runs on a Packet.net server. However we can compiler in a separate task, and run that task on fast AWS instances. The Packet server is provisionned and installed automatically with Terraform scripts forked from https://github.com/taskcluster/taskcluster-infrastructure/tree/master/modules/docker-worker.

Taskcluster’s “livelog” functionality seems to be broken on Packet tasks, so logs are only available after a task is completed.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22046)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

@bors-servo
bors-servo merged commit b1da53e into master Nov 1, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 1, 2018
@SimonSapin
SimonSapin deleted the tc-android-x86 branch November 1, 2018 14:43
@SimonSapin SimonSapin mentioned this pull request Nov 30, 2018
28 of 31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants