aboutsummaryrefslogtreecommitdiff
path: root/armnn32-ci-build.yaml
blob: 33c459a47c978c3b1d1ad11e5144efdd01793b1f (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
- job:
    name: armnn32-ci-build
    display-name: 'Arm NN - 32 bit CI Build'
    project-type: freestyle
    concurrent: true
    defaults: global
    description: |
        Updates source and builds ArmNN 32 bit for armv7a frequently to ensure builds are successful.
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 90
            num-to-keep: 90
        - github:
            url: https://git.mlplatform.org/ml/armnn.git

    triggers:
        - gerrit:
            override-votes: true
            gerrit-build-failed-verified-value: -1
            trigger-on:
                - patchset-created-event:
                    exclude-drafts: true
                    exclude-trivial-rebase: true
                    exclude-no-code-change: true
                - comment-added-contains-event:
                    comment-contains-value: 'TRIGGER BUILD'
            projects:
                - project-compare-type: 'PLAIN'
                  project-pattern: 'ml/armnn'
                  branches:
                    - branch-compare-type: 'PLAIN'
                      branch-pattern: 'master'
            silent: true
                      #            skip-vote:
                      #                    successful: true
                      #                    failed: false
            server-name: review.mlplatform.org

    parameters:
        - string:
            name: LAVA_SERVER
            default: 'https://validation.linaro.org/RPC2/'
        - string:
            name: GIT_COM_ID
    disabled: false
    node: docker-bionic-amd64

    wrappers:
        - timestamps
        - credentials-binding:
            - text:
                credential-id: QA_REPORTS_TOKEN
                variable: QA_REPORTS_TOKEN
    builders:
        - shell:
            !include-raw: armnn-ci-build/builders-32bit.sh
        - shell: |
            #!/bin/bash -e
            echo "DEVICE_TYPE=${DEVICE_TYPE}" > device_type_parameters
        - inject:
            properties-file: device_type_parameters
        - linaro-publish-token
        - shell: |
            #!/bin/bash

            set -ex

            sudo apt-get install -y jq

            if [ -z "$GIT_COM_ID" ]
            then
                LAVA_ID=${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}
                ARMNN_TAR_LOCATION=https://snapshots.linaro.org/components/armnn-32bit/${BUILD_NUMBER}/armnn-32.tar.xz
            else
                LAVA_ID=$GIT_COM_ID
                ARMNN_TAR_LOCATION=https://snapshots.linaro.org/components/armnn-32bit-master/${BUILD_NUMBER}/armnn-32.tar.xz
            fi


            jq -n --arg 'LAVA_ID' $LAVA_ID \
            --arg 'ARMNN_TAR_LOCATION' $ARMNN_TAR_LOCATION \
            --arg 'BUILD_NUMBER' $BUILD_NUMBER \
            '{LAVA_ID:$LAVA_ID, ARMNN_TAR_LOCATION:$ARMNN_TAR_LOCATION, BUILD_NUMBER:$BUILD_NUMBER}' > out/buildInfo.json


            # Publish
            test -d ${HOME}/bin || mkdir ${HOME}/bin


            if [ -z "$GIT_COM_ID" ]
            then
                wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
                time python3 ${HOME}/bin/linaro-cp.py \
                --link-latest \
                out/ components/armnn-32bit/${BUILD_NUMBER}
            else
                wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
                time python3 ${HOME}/bin/linaro-cp.py \
                --link-latest \
                out/ components/armnn-32bit-master/${BUILD_NUMBER}
            fi