aboutsummaryrefslogtreecommitdiff
path: root/linaro-art-tip-build-MicroBenchmarks-Baseline.yaml
blob: 96c13a0c354306cc4b2f8b31a884944eb6920691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
- scm:
    name: art
    scm:
        - git:
            url: ssh://git@dev-private-git.linaro.org/linaro-art/platform/art.git
            branches:
                - origin/master
            credentials-id: '768c1ba1-6052-4b97-a531-7e4fabda6979'
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
- scm:
    name: bionic
    scm:
        - git:
            url: ssh://git@dev-private-git.linaro.org/linaro-art/platform/bionic.git
            branches:
                - origin/master
            credentials-id: '768c1ba1-6052-4b97-a531-7e4fabda6979'
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
- scm:
    name: build
    scm:
        - git:
            url: ssh://git@dev-private-git.linaro.org/linaro-art/platform/build.git
            branches:
                - origin/master
            credentials-id: '768c1ba1-6052-4b97-a531-7e4fabda6979'
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
- scm:
    name: vixl
    scm:
        - git:
            url: ssh://git@dev-private-git.linaro.org/linaro-art/platform/external/vixl.git
            branches:
                - origin/master
            credentials-id: '768c1ba1-6052-4b97-a531-7e4fabda6979'
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
- job:
    name: linaro-art-tip-build-MicroBenchmarks-Baseline
    project-type: freestyle
    defaults: global
    description: >
      Runs  the
      <a href="https://android-git.linaro.org/gitweb/linaro-art/art-build-scripts.git/blob/HEAD:benchmarks/benchmarks_run_target.sh">Microbenchmarks Test script</a>
      on the tip.
      This job is for baseline builds only.
    properties:
        - authorization:
            anonymous:
                - job-discover
            linaro-android-builders:
                - job-read
                - job-extended-read
                - job-workspace
            linaro-art:
                - job-build
                - job-read
                - job-extended-read
                - job-workspace
        - build-discarder:
            days-to-keep: 60
            num-to-keep: 60
        - copyartifact:
            projects: post-build-reports
    parameters:
        - string:
            name: ADB_VERSION
            default: 'adb-tip'
        - string:
            name: BUILD_CONFIG_REPO
            default: 'git://android.git.linaro.org/android-build-configs.git'
        - string:
            name: BUILD_CONFIG_BRANCH
            default: 'master'
        - string:
            name: BUILD_CONFIG_FILENAME
            default: 'linaro-art-tip'
    disabled: false
    node: docker-utopic-art
    display-name: 'Tip: Benchmarks Baseline (Nexus 5X and 9)'
    concurrent: true
    scm:
        - art
        - bionic
        - build
        - vixl
    triggers:
        - pollscm: 'H/5 * * * *'
    wrappers:
        - timestamps
        - timeout:
            timeout: 500
        - credentials-binding:
            - text:
                credential-id: PRIVATE_KEY
                variable: PRIVATE_KEY
    builders:
        - shell: |
            #!/bin/bash -xe

            # Build scripts
            ANDROID_BUILD_DIR="${HOME}/srv/${JOB_NAME}/android"
            ART_BUILD_SCRIPTS_DIR="${WORKSPACE}/art-build-scripts"
            git clone https://android-git.linaro.org/git/linaro-art/art-build-scripts.git ${ART_BUILD_SCRIPTS_DIR}

            # Private key
            wget https://git.linaro.org/people/daniel.diaz/ci/misc-utils.git/blob_plain/HEAD:/add-private-key.sh
            source add-private-key.sh

            cd ${ART_BUILD_SCRIPTS_DIR}/jenkins
            # Port forwarding magic to have access to Nexus devices
            source /home/buildslave/srv/nexus-config
            export ANDROID_SERIAL=${BULLHEAD}
            ./setup_adb.sh
            ./setup_host.sh
            ./setup_android.sh

            cd ${ANDROID_BUILD_DIR}
            alias python=python3
            perl scripts/jenkins/test_launcher.pl \
              scripts/benchmarks/benchmarks_run_target.sh --default

            # Now run the microbenchmarks on Nexus9
            export ANDROID_SERIAL=${FLOUNDER}
            perl scripts/jenkins/test_launcher.pl \
              scripts/benchmarks/benchmarks_run_target.sh --default

            # create parameters for post-build-reports
            cat << EOF > ${WORKSPACE}/post_build_reports_parameters
            SOURCE_PROJECT_NAME=${JOB_NAME}
            SOURCE_BUILD_NUMBER=${BUILD_NUMBER}
            SOURCE_BUILD_ID=${BUILD_NUMBER}
            SOURCE_BUILD_URL=${BUILD_URL}
            ART_URL=https://art-reports.linaro.org/api/
            SOURCE_BRANCH_NAME=master
            EOF

    publishers:
        - archive:
            artifacts: '*.txt, *.xml, *.json'
        - logparser:
            parse-rules: '/var/lib/jenkins/userContent/android-art.parse'
            unstable-on-warning: false
            fail-on-error: false
        - groovy-postbuild:
            script: |
              import hudson.model.*
              def currentBuild = Thread.currentThread().executable
              def description = ""
              def matcher = manager.getLogMatcher(".*repo sync failed.*")
              if ( matcher?.matches()) {
                  manager.addShortText("repo sync failed")
              }
              matcher = manager.getLogMatcher(".*patch merge failed.*")
              if ( matcher?.matches()) {
                  manager.addShortText("merge failed")
              }
              matcher = manager.getLogMatcher(".*error: no devices/emulators found.*")
              if ( matcher?.matches()) {
                  manager.addShortText("No Device Found")
              }
              matcher = manager.getLogMatcher(".*buildbot-build setup failed.*")
              if ( matcher?.matches()) {
                  manager.addShortText("buildbot-build setup failed.")
              }
              matcher = manager.getLogMatcher(".* tests have failed")
              if (matcher?.matches()) {
                  def test = matcher.group(0).split(" ")
                  manager.listener.logger.println test.length
                  i=0
                  while( i<test.length-3) {
                       description+="${test[i]} failed<br>"
                       i++;
                  }
                  currentBuild.setDescription(description)
                  manager.addShortText("Tests failed")
              }
        - trigger-parameterized-builds:
            - project: 'post-build-reports'
              property-file: post_build_reports_parameters