aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android-cts.yaml40
-rwxr-xr-xandroid-cts/builders.sh28
-rw-r--r--android-cts/builders.yaml.inc10
3 files changed, 78 insertions, 0 deletions
diff --git a/android-cts.yaml b/android-cts.yaml
new file mode 100644
index 0000000000..c71188c675
--- /dev/null
+++ b/android-cts.yaml
@@ -0,0 +1,40 @@
+- job:
+ name: android-cts
+ project-type: freestyle
+ defaults: global
+ properties:
+ - authorization:
+ anonymous:
+ - job-read
+ - job-extended-read
+ linaro:
+ - job-build
+ - job-cancel
+ - build-discarder:
+ days-to-keep: 60
+ num-to-keep: 60
+ parameters:
+ - string:
+ name: ANDROID_MANIFEST_URL
+ default: https://android.googlesource.com/platform/manifest
+ - string:
+ name: MANIFEST_BRANCH
+ default: master
+ - string:
+ name: LUNCH_TARGET
+ default: hikey-userdebug
+ - string:
+ name: PATCHSETS
+ default: ''
+ disabled: false
+ node: docker-utopic-aosp
+ display-name: 'Android CTS Build'
+ concurrent: true
+ wrappers:
+ - timestamps
+ - timeout:
+ timeout: 500
+ builders:
+ !include: android-cts/builders.yaml.inc
+ publishers:
+ !include: android-lcr/common/publishers.yaml.inc
diff --git a/android-cts/builders.sh b/android-cts/builders.sh
new file mode 100755
index 0000000000..27e4b9c2f2
--- /dev/null
+++ b/android-cts/builders.sh
@@ -0,0 +1,28 @@
+# Build Android
+repo init -u ${ANDROID_MANIFEST_URL} -b ${MANIFEST_BRANCH}
+repo sync -j"$(nproc)" -c
+
+if [ -n "$PATCHSETS" ]; then
+ rm -rf android-patchsets
+ git clone --depth=1 https://android-git.linaro.org/git/android-patchsets.git
+ for i in $PATCHSETS; do
+ sh ./android-patchsets/$i
+ done
+fi
+
+
+source build/envsetup.sh
+lunch ${LUNCH_TARGET}
+make -j"$(nproc)" cts
+
+mkdir -p pub
+wget -q https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/android-lcr/generic/build-info/public-template.txt -O pub/BUILD-INFO.txt
+
+cp out/host/linux-x86/cts/android-cts.zip pub/
+
+# Publish parameters
+cat << EOF > ${WORKSPACE}/publish_parameters
+PUB_SRC=${PWD}/pub
+PUB_DEST=/android/${JOB_NAME}/${LUNCH_TARGET}/${BUILD_NUMBER}
+PUB_EXTRA_INC=^[^/]+zip
+EOF
diff --git a/android-cts/builders.yaml.inc b/android-cts/builders.yaml.inc
new file mode 100644
index 0000000000..7402400f7e
--- /dev/null
+++ b/android-cts/builders.yaml.inc
@@ -0,0 +1,10 @@
+ - shell:
+ !include-raw:
+ - android-lcr/common/builders.sh
+ - android-cts/builders.sh
+ - inject:
+ properties-file: publish_parameters
+ - linaro-publish-token
+ - shell:
+ !include-raw:
+ - android/linaro-publisher.sh