Skip to content

Commit

Permalink
Publish logins AAR to nalexander's personal bintray. (Fixes #189) (#199
Browse files Browse the repository at this point in the history
…) r=vladikoff,tcsc

* Pre: Bump version to 0.3.2.

This just needs to be greater than 0.3.1, the last version I pushed in
testing.

* Publish logins AAR to nalexander's personal bintray.

* Post: Bump task timeout for build and publishing.

Building everything for three architectures just takes a long time --
15 minutes per architecture or more.

I investigated speeding this up, and I conclude that compiling the
architectures in parallel is both work (you need to work around cargo
a little bit, and you need to use a Make jobserver to limit the total
thread pool) and doesn't pay off (I witnessed only about a 5-10%
speed-up locally).  My guess is that it pays off even less in AWS,
where IO throughput is relatively low and context switching relatively
more expensive.
  • Loading branch information
ncalexan authored Sep 12, 2018
1 parent 2b92b9a commit a3bcf30
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
20 changes: 14 additions & 6 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ tasks:
github:
events:
- release
scopes:
- "secrets:get:project/application-services/publish"
payload:
maxRunTime: 3600
deadline: "{{ '2 hours' | $fromNow }}"
maxRunTime: 7200
deadline: "{{ '4 hours' | $fromNow }}"
image: 'mozillamobile/rust-component:buildtools-27.0.3-ndk-r15c-ndk-version-21-rust-stable-rust-beta'
command:
- /bin/bash
Expand All @@ -66,7 +68,11 @@ tasks:
&& cd application-services
&& git config advice.detachedHead false
&& git checkout '{{ event.version }}'
&& python automation/taskcluster/release/fetch-bintray-api-key.py
&& ./scripts/taskcluster-android.sh
&& cd logins-api/android
&& ./gradlew --no-daemon clean library:assembleRelease
&& ./gradlew bintrayUpload --debug -PvcsTag="{{ event.head.sha }}"
artifacts:
'public/bin/mozilla/fxa_client_android_{{ event.version }}.zip':
type: 'file'
Expand All @@ -88,9 +94,11 @@ tasks:
github:
events:
- tag
scopes:
- "secrets:get:project/application-services/publish"
payload:
maxRunTime: 3600
deadline: "{{ '2 hours' | $fromNow }}"
maxRunTime: 7200
deadline: "{{ '4 hours' | $fromNow }}"
image: 'mozillamobile/rust-component:buildtools-27.0.3-ndk-r15c-ndk-version-21-rust-stable-rust-beta'
command:
- /bin/bash
Expand All @@ -101,11 +109,11 @@ tasks:
&& cd application-services
&& git config advice.detachedHead false
&& git checkout '{{ event.head.tag }}'
&& python automation/taskcluster/release/fetch-bintray-api-key.py
&& ./scripts/taskcluster-android.sh
# && python automation/taskcluster/release/fetch-bintray-api-key.py
&& cd logins-api/android
&& ./gradlew --no-daemon clean library:assembleRelease
# && VCS_TAG=`git show-ref {{ event.head.tag }}` ./gradlew bintrayUpload --debug -PvcsTag="$VCS_TAG"
&& ./gradlew bintrayUpload --debug -PvcsTag="{{ event.head.sha }}"
artifacts:
'public/bin/mozilla/fxa_client_android_{{ event.head.tag }}.zip':
type: 'file'
Expand Down
4 changes: 3 additions & 1 deletion automation/taskcluster/release/fetch-bintray-api-key.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import taskcluster

SECRET_NAME = 'project/mentat/publish'
SECRET_NAME = 'project/application-services/publish'
TASKCLUSTER_BASE_URL = 'http://taskcluster/secrets/v1'


Expand All @@ -19,7 +19,9 @@ def main():
"""Fetch the bintray user and api key from taskcluster's secret service
and save it to local.properties in the project root directory.
"""
print('fetching {} ...'.format(SECRET_NAME))
data = fetch_publish_secrets(SECRET_NAME)
print('fetching {} ... DONE ({} bytes)'.format(SECRET_NAME, len(str(data))))

properties_file_path = os.path.join(os.path.dirname(__file__), '../../../logins-api/android/local.properties')
with open(properties_file_path, 'w') as properties_file:
Expand Down
2 changes: 1 addition & 1 deletion logins-api/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
ext.kotlin_version = '1.2.50'

ext.library = [
version: '0.2.0'
version: '0.3.2'
]

ext.build = [
Expand Down
10 changes: 10 additions & 0 deletions logins-api/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

libGroupId=org.mozilla.sync15
libRepositoryName=application-services
libProjectName=application-services
libProjectDescription=Firefox Application Services
libUrl=https://github.com/mozilla/application-services
libVcsUrl=https://github.com/mozilla/application-services.git

libLicense=MPL-2.0
libLicenseUrl=https://www.mozilla.org/en-US/MPL/2.0/

0 comments on commit a3bcf30

Please sign in to comment.