diff options
Diffstat (limited to '96boards-hikey960-aosp-master.yaml')
-rw-r--r-- | 96boards-hikey960-aosp-master.yaml | 88 |
1 files changed, 28 insertions, 60 deletions
diff --git a/96boards-hikey960-aosp-master.yaml b/96boards-hikey960-aosp-master.yaml index bfc2e86827..fa980aae46 100644 --- a/96boards-hikey960-aosp-master.yaml +++ b/96boards-hikey960-aosp-master.yaml @@ -9,7 +9,7 @@ - authorization: anonymous: - job-read - linaro: + everyone-flat: - job-build - job-cancel parameters: @@ -17,7 +17,7 @@ name: BUILD_CONFIG_FILENAME default: 'hikey960-aosp-master' disabled: false - node: docker-bionic-aosp + node: docker-focal-aosp display-name: '96boards - AOSP Master - HiKey960' concurrent: true triggers: @@ -29,24 +29,28 @@ - ssh-agent-credentials: users: - '768c1ba1-6052-4b97-a531-7e4fabda6979' + # needed to publish to snapshots + - credentials-binding: + - text: + credential-id: snapshots-api-key + variable: PUBLISH_KEY builders: - shell: | #!/bin/bash export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 - java -version - #change to use python3 by default - if ! python --version|grep 3; then - sudo rm -fv /usr/bin/python && sudo ln -s /usr/bin/python3 /usr/bin/python - fi - sudo apt-get update - sudo apt-get install -y gcc-4.9-multilib bison git gperf libxml2-utils python-mako zip time python-requests genisoimage patch mtools pxz - wget -q http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb - sudo dpkg -i --force-all *.deb + # Here is for packages not listed by the source.android.com site below. + # But the following packages might not be really necessary, + # as the docker image for docker-focal-aosp labelled nodes is linaro/jenkins-amd64-ubuntu:focal + # which is defined here: https://git.linaro.org/infrastructure/ci-yadp-builder.git/tree/docker_templates_aosp_amd64.yml#n2 + # And the packages listed here might be already defined there. + sudo apt-get install -y --allow-change-held-packages wget sudo python3 python-is-python3 openjdk-11-jdk-headless git gperf python-mako time genisoimage patch mtools + java -version + + ## https://source.android.com/docs/setup/start/requirements#hardware-requirements + sudo apt-get install -y --allow-change-held-packages git-core gnupg flex bison build-essential zip curl zlib1g-dev libc6-dev-i386 libncurses5 x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig mkdir -p ${HOME}/bin ${WORKSPACE}/build/out curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo @@ -65,33 +69,24 @@ # Runs as ubuntu set -xe - rm -rf build-tools jenkins-tools build/out build/android-patchsets build-configs - git clone --depth 1 https://git.linaro.org/infrastructure/linaro-android-build-tools.git build-tools - git clone --depth 1 https://git.linaro.org/infrastructure/linaro-jenkins-tools.git jenkins-tools - git clone --depth 1 http://android-git.linaro.org/git/android-build-configs.git build-configs - export BUILD_CONFIG_FILENAME=${BUILD_CONFIG_FILENAME:-${JOB_NAME#android-*}} - cat << EOF > config.txt - BUILD_CONFIG_REPO=http://android-git.linaro.org/git/android-build-configs.git - BUILD_CONFIG_BRANCH=master - EOF - echo config.txt - export CONFIG=`base64 -w 0 config.txt` - # Download vendor binaries for hikey. mkdir -p build # Delete sources before build to save space cd build/ rm -rf art/ dalvik/ kernel/ bionic/ developers/ libcore/ sdk/ bootable/ development/ libnativehelper/ system/ build/ device/ test/ build-info/ docs/ packages/ toolchain/ .ccache/ external/ pdk/ tools/ compatibility/ frameworks/ platform_testing/ vendor/ cts/ hardware/ prebuilts/ linaro* clang-src hikey-linaro/configs - cd - - - build-tools/node/build us-east-1.ec2-git-mirror.linaro.org "${CONFIG}" - cp -a /home/buildslave/srv/aosp-master/build/out/*.xml /home/buildslave/srv/aosp-master/build/out/*.json ${WORKSPACE}/ + rm -fr android-build-configs android-patchsets + # to build with clean environment, and it helps make sure + # there will be only one pinned-manifest under out/pinned-manifest/ + rm -fr out + git clone --depth 1 http://android-git.linaro.org/git/android-build-configs.git android-build-configs + ./android-build-configs/linaro-build.sh -c ${BUILD_CONFIG_FILENAME} + cp -a out/pinned-manifest/*-pinned-manifest.xml "${WORKSPACE}/pinned-manifest.xml" + cp -a out/target/product/hikey960/*.json ${WORKSPACE}/ - cd /home/buildslave/srv/aosp-master/build/ source build/envsetup.sh - lunch hikey960-userdebug + lunch hikey960-trunk_staging-userdebug sed -i "s/eng.\`whoami\`/${BUILD_NUMBER}/g" device/linaro/hikey/factory-images/generate-factory-images-hikey960.sh sed -i "s/target\/product\/hikey960//g" device/linaro/hikey/factory-images/generate-factory-images-hikey960.sh cd - @@ -107,37 +102,10 @@ pushd /home/buildslave/srv/aosp-master/build/out/ for img in "boot.img dt.img vendor.img system.img userdata.img super.img"; do - pxz -9 $img + xz -9 $img done cp ramdisk.img *.img.xz dist/pub/ - popd - - pushd /home/buildslave/srv/aosp-master/build/ - rm -rf out/target/product/hikey960 - make TARGET_KERNEL_USE=4.14 bootimage vendorimage superimage out/target/product/hikey960/dt.img - cp out/target/product/hikey960/super.img out/super-4.14.img - cp out/target/product/hikey960/vendor.img out/vendor-4.14.img - cp out/target/product/hikey960/boot.img out/boot-4.14.img - cp out/target/product/hikey960/dt.img out/dt-4.14.img - cp out/target/product/hikey960/dt.img out/dt-4.14.img - xz out/super-4.14.img - xz out/vendor-4.14.img - xz out/boot-4.14.img - xz out/dt-4.14.img - cp out/boot-4.14.img.xz out/super-4.14.img.xz out/vendor-4.14.img.xz out/dt-4.14.img.xz out/dist/pub/ - - rm -rf out/target/product/hikey960 - make TARGET_KERNEL_USE=4.19 bootimage vendorimage superimage out/target/product/hikey960/dt.img - cp out/target/product/hikey960/super.img out/super-4.19.img - cp out/target/product/hikey960/vendor.img out/vendor-4.19.img - cp out/target/product/hikey960/boot.img out/boot-4.19.img - cp out/target/product/hikey960/dt.img out/dt-4.19.img - cp out/target/product/hikey960/dt.img out/dt-4.19.img - xz out/super-4.19.img - xz out/vendor-4.19.img - xz out/boot-4.19.img - xz out/dt-4.19.img - cp out/boot-4.19.img.xz out/super-4.19.img.xz out/vendor-4.19.img.xz out/dt-4.19.img.xz out/dist/pub/ + cp -a pinned-manifest/*-pinned-manifest.xml "dist/pub/pinned-manifest.xml" popd wget https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/android-lcr/hikey/build-info/aosp-master-template.txt -O build/out/dist/pub/BUILD-INFO.txt |