aboutsummaryrefslogtreecommitdiff
path: root/armnn-ci-benchmarking.yaml
blob: 31847b255a35bc89f97ce03f5642a1464e2838dd (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
- job:
    name: armnn-ci-benchmarking
    project-type: freestyle
    defaults: global
    description: |
        Updates source and builds ArmNN 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

    parameters:
        - string:
            name: LAVA_SERVER
            default: 'https://validation.linaro.org/RPC2/'
    disabled: false
    node: docker-bionic-arm64
    display-name: 'Arm NN - CI Build: MLPerf Benchmark'

    wrappers:
        - timestamps
        - credentials-binding:
            - text:
                credential-id: QA_REPORTS_TOKEN
                variable: QA_REPORTS_TOKEN
    builders:
        - shell: |
            #!/bin/bash -e
            echo "DEVICE_TYPE=${DEVICE_TYPE}" > device_type_parameters
        - inject:
            properties-file: device_type_parameters
        - linaro-publish-token

        - shell: |
            #!/bin/bash -ex


            sudo apt-get -q update
            sudo apt-get install -y jq
            sudo apt-get install -y --no-install-recommends python-pip virtualenv python-dev python3-dev
            wget https://snapshots.linaro.org/components/armnn-master/latest/buildInfo.json

            LAVA_ID=( $(jq -r '.LAVA_ID' buildInfo.json))
            BUILD_NUM_ORIGIN=( $(jq -r '.BUILD_NUMBER' buildInfo.json))


            git clone https://github.com/Linaro/lava-test-plans.git


            curl \
                --header "Auth-Token: $QA_REPORTS_TOKEN" \
                https://qa-reports.linaro.org/api/createbuild/armnn/armnn-benchmarking/$LAVA_ID

            # submit tests to LAVA
            rm -rf venv | true
            virtualenv -p python3 venv
            source ./venv/bin/activate

            cd ./lava-test-plans
            pip install -r requirements.txt

            export DEVICE_TYPE=synquacer

            cat << EOF > ${WORKSPACE}/submit_for_testing_parameters
            LAVA_JOB_PRIORITY=50
            PROJECT_NAME=armnn-benchmarking
            PROJECT=projects/armnn/
            AUTO_LOGIN_PASSWORD_PROMPT='Password:'
            AUTO_LOGIN_PASSWORD='Linaro123'
            ARMNN_TARBALL_URL=https://snapshots.linaro.org/components/armnn-master/latest/armnn.tar.xz
            KERNEL_URL=http://images.validation.linaro.org/synquacer/hc/vmlinuz
            RAMDISK_URL=http://images.validation.linaro.org/synquacer/hc/initrd.img
            RAMDISK_URL_COMP=gz
            ROOTFS_URL=http://images.validation.linaro.org/synquacer/hc/rootfs.tar.xz
            ROOTFS_URL_COMP=xz
            DEPLOY_OS=debian
            OS_INFO=debian
            DEVICE_TYPE=${DEVICE_TYPE}
            BUILD_NUMBER=${BUILD_NUM_ORIGIN}
            EOF

            ./submit_for_testing.py --variables ${WORKSPACE}/submit_for_testing_parameters \
              --device-type ${DEVICE_TYPE} \
              --test-plan armnn-benchmarking \
              --qa-server-team armnn \
              --qa-server-project armnn \
              --lava-server ${LAVA_SERVER} \
              --build-id ${LAVA_ID}