From ec6645ded6d56719d1be5948345e3e1208b0ea75 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 13:08:26 -0700 Subject: [PATCH 01/10] rename files --- ...ckerfile.ci_qemu => Dockerfile.ci_cortexm} | 0 docker/install/ubuntu_install_qemu.sh | 82 ------------------- ...d_qemu.sh => task_config_build_cortexm.sh} | 0 3 files changed, 82 deletions(-) rename docker/{Dockerfile.ci_qemu => Dockerfile.ci_cortexm} (100%) delete mode 100755 docker/install/ubuntu_install_qemu.sh rename tests/scripts/{task_config_build_qemu.sh => task_config_build_cortexm.sh} (100%) diff --git a/docker/Dockerfile.ci_qemu b/docker/Dockerfile.ci_cortexm similarity index 100% rename from docker/Dockerfile.ci_qemu rename to docker/Dockerfile.ci_cortexm diff --git a/docker/install/ubuntu_install_qemu.sh b/docker/install/ubuntu_install_qemu.sh deleted file mode 100755 index b34ac018d94c..000000000000 --- a/docker/install/ubuntu_install_qemu.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# -# Install QEMU on Ubuntu. -# -# Usage: ubuntu_install_qemu.sh [--target-list target0,target1,...] -# --target-list is list of target for QEMU comma seperated. e.g. aarch64-softmmu,arm-softmmu,... -# - -set -e -set -o pipefail - -QEMU_NAME=qemu-5.1.0 -QEMU_SIG_FILE=${QEMU_NAME}.tar.xz.sig -QEMU_TAR_FILE=${QEMU_NAME}.tar.xz - -# Clean previous build -rm -rf ${QEMU_NAME} ${QEMU_SIG_FILE} ${QEMU_TAR_FILE} - -# Get number of cores for build -if [ -n "${TVM_CI_NUM_CORES}" ]; then - num_cores=${TVM_CI_NUM_CORES} -else - num_cores=2 -fi - -# Set target list for QEMU -if [ "$1" == "--target-list" ]; then - shift - target_list=$1 -else - # Build these by defualt for microtvm reference virtual machine and ci_qemu. - target_list="aarch64-softmmu,arm-softmmu,i386-softmmu,riscv32-softmmu,riscv64-softmmu,x86_64-softmmu" -fi - -sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list -apt update -apt-get -y build-dep qemu - -gpg --keyserver keyserver.ubuntu.com --recv-keys 0x3353C9CEF108B584 -cat <${QEMU_SIG_FILE} ------BEGIN PGP ARMORED FILE----- -Comment: Use "gpg --dearmor" for unpacking - -iQEzBAABCgAdFiEEzqzJ4VU066u4LT+gM1PJzvEItYQFAl8zEnAACgkQM1PJzvEI -tYSp2wf/X/8I+hz1OLHCnoJuA9AqXEz1vtQ/dsvL1FfkOerMglih8wh9HYastf2+ -CWsX8o9i5ryrxWafJKIRjj7uAgEuekvpkm3on7/iiZNXYkQOqeBBylUuGXI2BOXr -ObS4alzzgowp2laoe2n7Ew391HbvYX0NT5HqKxlCYsLcbCeYtI+7jVgQzxtnwFzO -Vb4zLJybhHQfAVlc5SkKfZkW+0yPnMeS376bYqJz+Wo3UZYVfZrHPygHX1NhRVYc -p5ez/+2k4VAIwIQoP5DoO06waLBffvLIAdPPKYsx71K67OoGG2svc7duC/+5qf1x -8FBFJX9b4ft0tr/cwpVdq8dr/VWqQg== -=hCS7 ------END PGP ARMORED FILE----- -EOF -curl -OLs https://download.qemu.org/${QEMU_TAR_FILE} -gpg --verify ${QEMU_SIG_FILE} - -tar -xf ${QEMU_TAR_FILE} - -cd ${QEMU_NAME} -./configure --target-list=${target_list} -make -j${num_cores} -sudo make install - -# For debugging with qemu -apt-install-and-clear -y install libpython3.8 diff --git a/tests/scripts/task_config_build_qemu.sh b/tests/scripts/task_config_build_cortexm.sh similarity index 100% rename from tests/scripts/task_config_build_qemu.sh rename to tests/scripts/task_config_build_cortexm.sh From 2045cfd8f2829f483f62f91323b9fa7024ef5d24 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 13:12:13 -0700 Subject: [PATCH 02/10] ci script --- tests/python/ci/test_ci.py | 2 +- tests/scripts/ci.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/python/ci/test_ci.py b/tests/python/ci/test_ci.py index 7864830269d7..5ab5e6950494 100644 --- a/tests/python/ci/test_ci.py +++ b/tests/python/ci/test_ci.py @@ -916,7 +916,7 @@ def test_open_docker_update_pr( "ci_cpu", "ci_wasm", "ci_i386", - "ci_qemu", + "ci_cortexm", "ci_arm", "ci_hexagon", ] diff --git a/tests/scripts/ci.py b/tests/scripts/ci.py index 022d19200232..f5c60c94502a 100755 --- a/tests/scripts/ci.py +++ b/tests/scripts/ci.py @@ -165,7 +165,7 @@ def docker(name: str, image: str, scripts: List[str], env: Dict[str, str], inter "ci_cpu", # "ci_wasm", # "ci_i386", - "ci_qemu", + "ci_cortexm", "ci_arm", "ci_hexagon", } @@ -618,8 +618,8 @@ def add_subparser( }, ), generate_command( - name="qemu", - help="Run QEMU build and test(s)", + name="cortexm", + help="Run Cortex-M build and test(s)", options={ "cpp": CPP_UNITTEST, "test": ( From 0a7a3b98d88c0bc83a3cd55fb8d9a8c31c610d52 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 13:13:53 -0700 Subject: [PATCH 03/10] demo --- apps/microtvm/zephyr_cmsisnn/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/microtvm/zephyr_cmsisnn/README.md b/apps/microtvm/zephyr_cmsisnn/README.md index cccf97947ef6..e3e8f1c27876 100644 --- a/apps/microtvm/zephyr_cmsisnn/README.md +++ b/apps/microtvm/zephyr_cmsisnn/README.md @@ -19,7 +19,7 @@ This project was used for the [TVMCon 2021 talk on Cortex-M improvements to TVM](https://www.youtube.com/watch?v=6a7o8U-8Op4). It runs a keyword spotting model with the Zephyr RTOS using CMSIS-NN with the Ahead-of-Time (AOT) executor and the stack allocation strategy. -The application starts from [the Zephyr base project](https://docs.zephyrproject.org/latest/application/index.html#application) and makes minimal changes to integrate TVM. To try it out, first refer to the [Zephyr Getting Started](https://docs.zephyrproject.org/latest/getting_started/index.html) page to setup your tooling such as `west` (you can also use the `tlcpack/ci_qemu` image). Then download the [Fixed Virtual Platform (FVP) based on Arm(R) Corstone(TM)-300 software](https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps) and set the path for Zephyr to find it: +The application starts from [the Zephyr base project](https://docs.zephyrproject.org/latest/application/index.html#application) and makes minimal changes to integrate TVM. To try it out, first refer to the [Zephyr Getting Started](https://docs.zephyrproject.org/latest/getting_started/index.html) page to setup your tooling such as `west` (you can also use the `tlcpack/ci_cortexm` image). Then download the [Fixed Virtual Platform (FVP) based on Arm(R) Corstone(TM)-300 software](https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps) and set the path for Zephyr to find it: ``` export ARMFVP_BIN_PATH=/opt/arm/FVP_Corstone_SSE-300/models/Linux64_GCC-6.4/ @@ -32,7 +32,7 @@ wget \ -O model/cnn_s_quantized.tflite ``` -Checkout [CMSIS_5](https://github.com/ARM-software/CMSIS_5.git) (default is `/opt/arm/ethosu/cmsis` to reflect `tlcpack/ci_qemu`): +Checkout [CMSIS_5](https://github.com/ARM-software/CMSIS_5.git) (default is `/opt/arm/ethosu/cmsis` to reflect `tlcpack/ci_cortexm`): ``` git clone "https://github.com/ARM-software/CMSIS_5.git" cmsis ``` From 12427945e5ff593d243b7274fd4dd069fca4dfb1 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 13:14:11 -0700 Subject: [PATCH 04/10] RVM files --- apps/microtvm/reference-vm/base-box/base_box_provision.sh | 2 +- apps/microtvm/reference-vm/rebuild_tvm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/microtvm/reference-vm/base-box/base_box_provision.sh b/apps/microtvm/reference-vm/base-box/base_box_provision.sh index 175e4787eb90..d96852b7f57a 100755 --- a/apps/microtvm/reference-vm/base-box/base_box_provision.sh +++ b/apps/microtvm/reference-vm/base-box/base_box_provision.sh @@ -17,7 +17,7 @@ # under the License. # # Using this script we can reuse docker/install scripts to configure the reference -# virtual machine similar to CI QEMU setup. +# virtual machine similar to CI Cortex-M setup. # set -x diff --git a/apps/microtvm/reference-vm/rebuild_tvm.sh b/apps/microtvm/reference-vm/rebuild_tvm.sh index 6fdf4fd917f4..1a690d3225cf 100755 --- a/apps/microtvm/reference-vm/rebuild_tvm.sh +++ b/apps/microtvm/reference-vm/rebuild_tvm.sh @@ -40,7 +40,7 @@ if [ ! -e "${BUILD_DIR}" ]; then mkdir "${BUILD_DIR}" fi -./tests/scripts/task_config_build_qemu.sh "${BUILD_DIR}" +./tests/scripts/task_config_build_cortexm.sh "${BUILD_DIR}" cd "${BUILD_DIR}" cmake .. rm -rf standalone_crt host_standalone_crt # remove stale generated files From 43839c1151ccb9c1a279278eb3302f8bb938edd1 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 13:21:47 -0700 Subject: [PATCH 05/10] jenkins --- Jenkinsfile | 84 +++++++++++++++++++-------------------- ci/jenkins/Jenkinsfile.j2 | 2 +- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 874d4be71aa6..db58ae84094c 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ ci_gpu = 'tlcpack/ci-gpu:20220801-060139-d332eb374' ci_cpu = 'tlcpack/ci-cpu:20220715-060127-37f9d3c49' ci_wasm = 'tlcpack/ci-wasm:20220715-060127-37f9d3c49' ci_i386 = 'tlcpack/ci-i386:20220715-060127-37f9d3c49' -ci_qemu = 'tlcpack/ci-qemu:20220630-060117-558ba99c7' +ci_cortexm = 'tlcpack/ci-qemu:20220630-060117-558ba99c7' ci_arm = 'tlcpack/ci-arm:20220715-060127-37f9d3c49' ci_hexagon = 'tlcpack/ci-hexagon:20220715-060127-37f9d3c49' // <--- End of regex-scanned config. @@ -70,7 +70,7 @@ properties([ string(name: 'ci_hexagon_param', defaultValue: ''), string(name: 'ci_i386_param', defaultValue: ''), string(name: 'ci_lint_param', defaultValue: ''), - string(name: 'ci_qemu_param', defaultValue: ''), + string(name: 'ci_cortexm_param', defaultValue: ''), string(name: 'ci_wasm_param', defaultValue: ''), ]) ]) @@ -83,7 +83,7 @@ properties([ built_ci_hexagon = null; built_ci_i386 = null; built_ci_lint = null; - built_ci_qemu = null; + built_ci_cortexm = null; built_ci_wasm = null; // Global variable assigned during Sanity Check that holds the sha1 which should be @@ -273,7 +273,7 @@ def prepare() { if (env.DETERMINE_DOCKER_IMAGES == 'yes') { sh( - script: "./tests/scripts/determine_docker_images.py ci_arm=${ci_arm} ci_cpu=${ci_cpu} ci_gpu=${ci_gpu} ci_hexagon=${ci_hexagon} ci_i386=${ci_i386} ci_lint=${ci_lint} ci_qemu=${ci_qemu} ci_wasm=${ci_wasm} ", + script: "./tests/scripts/determine_docker_images.py ci_arm=${ci_arm} ci_cpu=${ci_cpu} ci_gpu=${ci_gpu} ci_hexagon=${ci_hexagon} ci_i386=${ci_i386} ci_lint=${ci_lint} ci_cortexm=${ci_cortexm} ci_wasm=${ci_wasm} ", label: 'Decide whether to use tlcpack or tlcpackstaging for Docker images', ) // Pull image names from the results of should_rebuild_docker.py @@ -307,9 +307,9 @@ def prepare() { label: "Find docker image name for ci_lint", returnStdout: true, ).trim() - ci_qemu = sh( - script: "cat .docker-image-names/ci_qemu", - label: "Find docker image name for ci_qemu", + ci_cortexm = sh( + script: "cat .docker-image-names/ci_cortexm", + label: "Find docker image name for ci_cortexm", returnStdout: true, ).trim() ci_wasm = sh( @@ -325,7 +325,7 @@ def prepare() { ci_hexagon = params.ci_hexagon_param ?: ci_hexagon ci_i386 = params.ci_i386_param ?: ci_i386 ci_lint = params.ci_lint_param ?: ci_lint - ci_qemu = params.ci_qemu_param ?: ci_qemu + ci_cortexm = params.ci_cortexm_param ?: ci_cortexm ci_wasm = params.ci_wasm_param ?: ci_wasm sh (script: """ @@ -336,7 +336,7 @@ def prepare() { echo " ci_hexagon = ${ci_hexagon}" echo " ci_i386 = ${ci_i386}" echo " ci_lint = ${ci_lint}" - echo " ci_qemu = ${ci_qemu}" + echo " ci_cortexm = ${ci_cortexm}" echo " ci_wasm = ${ci_wasm}" """, label: 'Docker image names') @@ -527,14 +527,14 @@ def build_docker_images() { } } }, - 'ci_qemu': { + 'ci_cortexm': { node('CPU') { timeout(time: max_time, unit: 'MINUTES') { init_git() // We're purposefully not setting the built image here since they // are not yet being uploaded to tlcpack - // ci_qemu = build_image('ci_qemu') - built_ci_qemu = build_image('ci_qemu'); + // ci_cortexm = build_image('ci_cortexm') + built_ci_cortexm = build_image('ci_cortexm'); } } }, @@ -951,17 +951,17 @@ stage('Build') { Utils.markStageSkippedForConditional('BUILD: arm') } }, - 'BUILD: QEMU': { + 'BUILD: Cortex-M': { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { - ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-qemu") { - docker_init(ci_qemu) + ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-cortexm") { + docker_init(ci_cortexm) init_git() sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh build", - label: 'Create QEMU cmake config', + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_config_build_cortexm.sh build", + label: 'Create Cortex-M cmake config', ) - make(ci_qemu, 'build', '-j2') + make(ci_cortexm, 'build', '-j2') sh( script: """ set -eux @@ -999,7 +999,7 @@ stage('Build') { } } } else { - Utils.markStageSkippedForConditional('BUILD: QEMU') + Utils.markStageSkippedForConditional('BUILD: Cortex-M') } }, 'BUILD: Hexagon': { @@ -4269,13 +4269,13 @@ def shard_run_frontend_aarch64_2_of_2() { def shard_run_test_Qemu_1_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { - ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-qemu") { + ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { try { - docker_init(ci_qemu) + docker_init(ci_cortexm) init_git() timeout(time: max_time, unit: 'MINUTES') { withEnv([ - 'PLATFORM=qemu', + 'PLATFORM=cortexm', 'TVM_NUM_SHARDS=4', 'TVM_SHARD_INDEX=0'], { sh( @@ -4313,14 +4313,14 @@ def shard_run_test_Qemu_1_of_4() { ) add_microtvm_permissions() - ci_setup(ci_qemu) - cpp_unittest(ci_qemu) + ci_setup(ci_cortexm) + cpp_unittest(ci_cortexm) sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_demo_microtvm.sh", label: 'Run microTVM demos', ) sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_python_microtvm.sh", label: 'Run microTVM tests', ) }) @@ -4346,13 +4346,13 @@ def shard_run_test_Qemu_1_of_4() { def shard_run_test_Qemu_2_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { - ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-qemu") { + ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { try { - docker_init(ci_qemu) + docker_init(ci_cortexm) init_git() timeout(time: max_time, unit: 'MINUTES') { withEnv([ - 'PLATFORM=qemu', + 'PLATFORM=cortexm', 'TVM_NUM_SHARDS=4', 'TVM_SHARD_INDEX=1'], { sh( @@ -4390,9 +4390,9 @@ def shard_run_test_Qemu_2_of_4() { ) add_microtvm_permissions() - ci_setup(ci_qemu) + ci_setup(ci_cortexm) sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_python_microtvm.sh", label: 'Run microTVM tests', ) }) @@ -4418,13 +4418,13 @@ def shard_run_test_Qemu_2_of_4() { def shard_run_test_Qemu_3_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { - ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-qemu") { + ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { try { - docker_init(ci_qemu) + docker_init(ci_cortexm) init_git() timeout(time: max_time, unit: 'MINUTES') { withEnv([ - 'PLATFORM=qemu', + 'PLATFORM=cortexm', 'TVM_NUM_SHARDS=4', 'TVM_SHARD_INDEX=2'], { sh( @@ -4462,9 +4462,9 @@ def shard_run_test_Qemu_3_of_4() { ) add_microtvm_permissions() - ci_setup(ci_qemu) + ci_setup(ci_cortexm) sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_python_microtvm.sh", label: 'Run microTVM tests', ) }) @@ -4490,13 +4490,13 @@ def shard_run_test_Qemu_3_of_4() { def shard_run_test_Qemu_4_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { - ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-qemu") { + ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { try { - docker_init(ci_qemu) + docker_init(ci_cortexm) init_git() timeout(time: max_time, unit: 'MINUTES') { withEnv([ - 'PLATFORM=qemu', + 'PLATFORM=cortexm', 'TVM_NUM_SHARDS=4', 'TVM_SHARD_INDEX=3'], { sh( @@ -4534,9 +4534,9 @@ def shard_run_test_Qemu_4_of_4() { ) add_microtvm_permissions() - ci_setup(ci_qemu) + ci_setup(ci_cortexm) sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_python_microtvm.sh", label: 'Run microTVM tests', ) }) @@ -5083,7 +5083,7 @@ def deploy() { update_docker(built_ci_hexagon, "tlcpackstaging/ci_hexagon:${tag}") update_docker(built_ci_i386, "tlcpackstaging/ci_i386:${tag}") update_docker(built_ci_lint, "tlcpackstaging/ci_lint:${tag}") - update_docker(built_ci_qemu, "tlcpackstaging/ci_qemu:${tag}") + update_docker(built_ci_cortexm, "tlcpackstaging/ci_qemu:${tag}") update_docker(built_ci_wasm, "tlcpackstaging/ci_wasm:${tag}") } finally { sh( diff --git a/ci/jenkins/Jenkinsfile.j2 b/ci/jenkins/Jenkinsfile.j2 index 3f4970bb2192..c5941ab53b20 100644 --- a/ci/jenkins/Jenkinsfile.j2 +++ b/ci/jenkins/Jenkinsfile.j2 @@ -56,7 +56,7 @@ ci_gpu = 'tlcpack/ci-gpu:20220801-060139-d332eb374' ci_cpu = 'tlcpack/ci-cpu:20220715-060127-37f9d3c49' ci_wasm = 'tlcpack/ci-wasm:20220715-060127-37f9d3c49' ci_i386 = 'tlcpack/ci-i386:20220715-060127-37f9d3c49' -ci_qemu = 'tlcpack/ci-qemu:20220630-060117-558ba99c7' +ci_cortexm = 'tlcpack/ci-qemu:20220630-060117-558ba99c7' ci_arm = 'tlcpack/ci-arm:20220715-060127-37f9d3c49' ci_hexagon = 'tlcpack/ci-hexagon:20220715-060127-37f9d3c49' // <--- End of regex-scanned config. From dd08f92338ad082804f796b4a2dc562421c6498d Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 16:21:04 -0700 Subject: [PATCH 06/10] more ci --- ci/jenkins/Build.groovy.j2 | 16 ++++++++-------- ci/jenkins/Test.groovy.j2 | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ci/jenkins/Build.groovy.j2 b/ci/jenkins/Build.groovy.j2 index fcde53f55939..a4316a268e9a 100644 --- a/ci/jenkins/Build.groovy.j2 +++ b/ci/jenkins/Build.groovy.j2 @@ -184,22 +184,22 @@ stage('Build') { Utils.markStageSkippedForConditional('BUILD: arm') } }, - 'BUILD: QEMU': { + 'BUILD: Cortex-M': { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { - ws({{ m.per_exec_ws('tvm/build-qemu') }}) { - docker_init(ci_qemu) + ws({{ m.per_exec_ws('tvm/build-cortexm') }}) { + docker_init(ci_cortexm) init_git() sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh build", - label: 'Create QEMU cmake config', + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_config_build_cortexm.sh build", + label: 'Create Cortex-M cmake config', ) - make(ci_qemu, 'build', '-j2') - {{ m.upload_artifacts(tag='qemu', filenames=tvm_lib, folders=microtvm_template_projects) }} + make(ci_cortexm, 'build', '-j2') + {{ m.upload_artifacts(tag='cortexm', filenames=tvm_lib, folders=microtvm_template_projects) }} } } } else { - Utils.markStageSkippedForConditional('BUILD: QEMU') + Utils.markStageSkippedForConditional('BUILD: Cortex-M') } }, 'BUILD: Hexagon': { diff --git a/ci/jenkins/Test.groovy.j2 b/ci/jenkins/Test.groovy.j2 index ebb19e36e7c6..01623b7de75f 100644 --- a/ci/jenkins/Test.groovy.j2 +++ b/ci/jenkins/Test.groovy.j2 @@ -187,26 +187,26 @@ ) {% endcall %} {% call(shard_index, num_shards) m.sharded_test_step( - name="test: Qemu", + name="test: Cortex-M", node="CPU-SMALL", - ws="tvm/test-qemu", - platform="qemu", - docker_image="ci_qemu", + ws="tvm/test-cortexm", + platform="cortexm", + docker_image="ci_cortexm", num_shards=4, test_method_names=test_method_names, ) %} - {{ m.download_artifacts(tag='qemu', filenames=tvm_lib, folders=microtvm_template_projects) }} + {{ m.download_artifacts(tag='cortexm', filenames=tvm_lib, folders=microtvm_template_projects) }} add_microtvm_permissions() - ci_setup(ci_qemu) + ci_setup(ci_cortexm) {% if shard_index == 1%} - cpp_unittest(ci_qemu) + cpp_unittest(ci_cortexm) sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_demo_microtvm.sh", label: 'Run microTVM demos', ) {% endif %} sh ( - script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh", + script: "${docker_run} ${ci_cortexm} ./tests/scripts/task_python_microtvm.sh", label: 'Run microTVM tests', ) {% endcall %} From 33d0ea809d79aacc415044e465a498a5405ff432 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 16:23:56 -0700 Subject: [PATCH 07/10] Jenkins --- Jenkinsfile | 32 ++++++++++++++++---------------- ci/jenkins/generate.py | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index db58ae84094c..6e20c05add01 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4266,7 +4266,7 @@ def shard_run_frontend_aarch64_2_of_2() { } -def shard_run_test_Qemu_1_of_4() { +def shard_run_test_Cortex_M_1_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { @@ -4339,11 +4339,11 @@ def shard_run_test_Qemu_1_of_4() { } } } else { - Utils.markStageSkippedForConditional('test: Qemu 1 of 4') + Utils.markStageSkippedForConditional('test: Cortex-M 1 of 4') } } -def shard_run_test_Qemu_2_of_4() { +def shard_run_test_Cortex_M_2_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { @@ -4411,11 +4411,11 @@ def shard_run_test_Qemu_2_of_4() { } } } else { - Utils.markStageSkippedForConditional('test: Qemu 2 of 4') + Utils.markStageSkippedForConditional('test: Cortex-M 2 of 4') } } -def shard_run_test_Qemu_3_of_4() { +def shard_run_test_Cortex_M_3_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { @@ -4483,11 +4483,11 @@ def shard_run_test_Qemu_3_of_4() { } } } else { - Utils.markStageSkippedForConditional('test: Qemu 3 of 4') + Utils.markStageSkippedForConditional('test: Cortex-M 3 of 4') } } -def shard_run_test_Qemu_4_of_4() { +def shard_run_test_Cortex_M_4_of_4() { if (!skip_ci && is_docs_only_build != 1) { node('CPU-SMALL') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/test-cortexm") { @@ -4555,7 +4555,7 @@ def shard_run_test_Qemu_4_of_4() { } } } else { - Utils.markStageSkippedForConditional('test: Qemu 4 of 4') + Utils.markStageSkippedForConditional('test: Cortex-M 4 of 4') } } @@ -4696,17 +4696,17 @@ stage('Test') { 'frontend: aarch64 2 of 2': { shard_run_frontend_aarch64_2_of_2() }, - 'test: Qemu 1 of 4': { - shard_run_test_Qemu_1_of_4() + 'test: Cortex-M 1 of 4': { + shard_run_test_Cortex_M_1_of_4() }, - 'test: Qemu 2 of 4': { - shard_run_test_Qemu_2_of_4() + 'test: Cortex-M 2 of 4': { + shard_run_test_Cortex_M_2_of_4() }, - 'test: Qemu 3 of 4': { - shard_run_test_Qemu_3_of_4() + 'test: Cortex-M 3 of 4': { + shard_run_test_Cortex_M_3_of_4() }, - 'test: Qemu 4 of 4': { - shard_run_test_Qemu_4_of_4() + 'test: Cortex-M 4 of 4': { + shard_run_test_Cortex_M_4_of_4() }, 'unittest: CPU': { if (!skip_ci && is_docs_only_build != 1) { diff --git a/ci/jenkins/generate.py b/ci/jenkins/generate.py index 686e44e14dd5..82bf4e5aaa1f 100644 --- a/ci/jenkins/generate.py +++ b/ci/jenkins/generate.py @@ -57,7 +57,7 @@ "platform": "CPU", }, { - "name": "ci_qemu", + "name": "ci_cortexm", "platform": "CPU", }, { From da8682489ce863d13167ebc20ca583de38a5dcf6 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 2 Aug 2022 16:58:28 -0700 Subject: [PATCH 08/10] fake name for ci_cortexm --- Jenkinsfile | 44 +++---- ci/jenkins/Jenkinsfile.j2 | 2 +- docker/Dockerfile.ci_qemu | 120 ++++++++++++++++++ ...d_cortexm.sh => task_config_build_qemu.sh} | 0 4 files changed, 143 insertions(+), 23 deletions(-) create mode 100644 docker/Dockerfile.ci_qemu rename tests/scripts/{task_config_build_cortexm.sh => task_config_build_qemu.sh} (100%) diff --git a/Jenkinsfile b/Jenkinsfile index 6e20c05add01..aadaec2e5e14 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ ci_gpu = 'tlcpack/ci-gpu:20220801-060139-d332eb374' ci_cpu = 'tlcpack/ci-cpu:20220715-060127-37f9d3c49' ci_wasm = 'tlcpack/ci-wasm:20220715-060127-37f9d3c49' ci_i386 = 'tlcpack/ci-i386:20220715-060127-37f9d3c49' -ci_cortexm = 'tlcpack/ci-qemu:20220630-060117-558ba99c7' +ci_cortexm = 'tlcpack/ci-cortexm:v0.01' ci_arm = 'tlcpack/ci-arm:20220715-060127-37f9d3c49' ci_hexagon = 'tlcpack/ci-hexagon:20220715-060127-37f9d3c49' // <--- End of regex-scanned config. @@ -986,12 +986,12 @@ stage('Build') { } md5sum build/libtvm.so - retry 3 aws s3 cp --no-progress build/libtvm.so s3://${s3_prefix}/qemu/build/libtvm.so + retry 3 aws s3 cp --no-progress build/libtvm.so s3://${s3_prefix}/cortexm/build/libtvm.so md5sum build/libtvm_runtime.so - retry 3 aws s3 cp --no-progress build/libtvm_runtime.so s3://${s3_prefix}/qemu/build/libtvm_runtime.so + retry 3 aws s3 cp --no-progress build/libtvm_runtime.so s3://${s3_prefix}/cortexm/build/libtvm_runtime.so md5sum build/config.cmake - retry 3 aws s3 cp --no-progress build/config.cmake s3://${s3_prefix}/qemu/build/config.cmake - retry 3 aws s3 cp --no-progress build/microtvm_template_projects s3://${s3_prefix}/qemu/build/microtvm_template_projects --recursive + retry 3 aws s3 cp --no-progress build/config.cmake s3://${s3_prefix}/cortexm/build/config.cmake + retry 3 aws s3 cp --no-progress build/microtvm_template_projects s3://${s3_prefix}/cortexm/build/microtvm_template_projects --recursive """, label: 'Upload artifacts to S3', ) @@ -4301,13 +4301,13 @@ def shard_run_test_Cortex_M_1_of_4() { return 0 } - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm.so build/libtvm.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm.so build/libtvm.so md5sum build/libtvm.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm_runtime.so build/libtvm_runtime.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm_runtime.so build/libtvm_runtime.so md5sum build/libtvm_runtime.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/config.cmake build/config.cmake + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/config.cmake build/config.cmake md5sum build/config.cmake - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/microtvm_template_projects build/microtvm_template_projects --recursive + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/microtvm_template_projects build/microtvm_template_projects --recursive """, label: 'Download artifacts from S3', ) @@ -4378,13 +4378,13 @@ def shard_run_test_Cortex_M_2_of_4() { return 0 } - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm.so build/libtvm.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm.so build/libtvm.so md5sum build/libtvm.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm_runtime.so build/libtvm_runtime.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm_runtime.so build/libtvm_runtime.so md5sum build/libtvm_runtime.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/config.cmake build/config.cmake + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/config.cmake build/config.cmake md5sum build/config.cmake - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/microtvm_template_projects build/microtvm_template_projects --recursive + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/microtvm_template_projects build/microtvm_template_projects --recursive """, label: 'Download artifacts from S3', ) @@ -4450,13 +4450,13 @@ def shard_run_test_Cortex_M_3_of_4() { return 0 } - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm.so build/libtvm.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm.so build/libtvm.so md5sum build/libtvm.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm_runtime.so build/libtvm_runtime.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm_runtime.so build/libtvm_runtime.so md5sum build/libtvm_runtime.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/config.cmake build/config.cmake + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/config.cmake build/config.cmake md5sum build/config.cmake - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/microtvm_template_projects build/microtvm_template_projects --recursive + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/microtvm_template_projects build/microtvm_template_projects --recursive """, label: 'Download artifacts from S3', ) @@ -4522,13 +4522,13 @@ def shard_run_test_Cortex_M_4_of_4() { return 0 } - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm.so build/libtvm.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm.so build/libtvm.so md5sum build/libtvm.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/libtvm_runtime.so build/libtvm_runtime.so + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/libtvm_runtime.so build/libtvm_runtime.so md5sum build/libtvm_runtime.so - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/config.cmake build/config.cmake + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/config.cmake build/config.cmake md5sum build/config.cmake - retry 3 aws s3 cp --no-progress s3://${s3_prefix}/qemu/build/microtvm_template_projects build/microtvm_template_projects --recursive + retry 3 aws s3 cp --no-progress s3://${s3_prefix}/cortexm/build/microtvm_template_projects build/microtvm_template_projects --recursive """, label: 'Download artifacts from S3', ) @@ -5083,7 +5083,7 @@ def deploy() { update_docker(built_ci_hexagon, "tlcpackstaging/ci_hexagon:${tag}") update_docker(built_ci_i386, "tlcpackstaging/ci_i386:${tag}") update_docker(built_ci_lint, "tlcpackstaging/ci_lint:${tag}") - update_docker(built_ci_cortexm, "tlcpackstaging/ci_qemu:${tag}") + update_docker(built_ci_cortexm, "tlcpackstaging/ci_cortexm:${tag}") update_docker(built_ci_wasm, "tlcpackstaging/ci_wasm:${tag}") } finally { sh( diff --git a/ci/jenkins/Jenkinsfile.j2 b/ci/jenkins/Jenkinsfile.j2 index c5941ab53b20..63131ff7ffc2 100644 --- a/ci/jenkins/Jenkinsfile.j2 +++ b/ci/jenkins/Jenkinsfile.j2 @@ -56,7 +56,7 @@ ci_gpu = 'tlcpack/ci-gpu:20220801-060139-d332eb374' ci_cpu = 'tlcpack/ci-cpu:20220715-060127-37f9d3c49' ci_wasm = 'tlcpack/ci-wasm:20220715-060127-37f9d3c49' ci_i386 = 'tlcpack/ci-i386:20220715-060127-37f9d3c49' -ci_cortexm = 'tlcpack/ci-qemu:20220630-060117-558ba99c7' +ci_cortexm = 'tlcpack/ci-cortexm:v0.01' ci_arm = 'tlcpack/ci-arm:20220715-060127-37f9d3c49' ci_hexagon = 'tlcpack/ci-hexagon:20220715-060127-37f9d3c49' // <--- End of regex-scanned config. diff --git a/docker/Dockerfile.ci_qemu b/docker/Dockerfile.ci_qemu new file mode 100644 index 000000000000..63089f3d65f2 --- /dev/null +++ b/docker/Dockerfile.ci_qemu @@ -0,0 +1,120 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# CI docker CPU env +# tag: v0.62 +FROM ubuntu:18.04 + +COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear + +RUN apt-get update --fix-missing + +COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh +RUN bash /install/ubuntu_install_core.sh + +COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh +RUN bash /install/ubuntu_install_googletest.sh + +COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh +RUN bash /install/ubuntu1804_install_python.sh + +COPY install/ubuntu1804_install_python_venv.sh /install/ubuntu1804_install_python_venv.sh +RUN bash /install/ubuntu1804_install_python_venv.sh +ENV PATH=/opt/tvm-venv/bin:/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin:$PATH + +# Globally disable pip cache +RUN pip config set global.no-cache-dir false + +COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh +RUN bash /install/ubuntu_install_python_package.sh + +COPY install/ubuntu1804_install_llvm.sh /install/ubuntu1804_install_llvm.sh +RUN bash /install/ubuntu1804_install_llvm.sh + +# Rust env (build early; takes a while) +COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh +RUN bash /install/ubuntu_install_rust.sh +ENV RUSTUP_HOME /opt/rust +ENV CARGO_HOME /opt/rust +ENV PATH $PATH:$CARGO_HOME/bin + +# AutoTVM deps +COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh +RUN bash /install/ubuntu_install_redis.sh + +# ANTLR deps +COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh +RUN bash /install/ubuntu_install_java.sh + +# TensorFlow deps +COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh +RUN bash /install/ubuntu_install_tensorflow.sh + +# TFLite deps +COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh +RUN bash /install/ubuntu_install_tflite.sh + +# sccache +COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh +RUN bash /install/ubuntu_install_sccache.sh +ENV PATH /opt/sccache:$PATH + +# Zephyr SDK deps +COPY install/ubuntu_install_zephyr.sh /install/ubuntu_install_zephyr.sh +COPY install/ubuntu_init_zephyr_project.sh /install/ubuntu_init_zephyr_project.sh +COPY install/ubuntu_install_zephyr_sdk.sh /install/ubuntu_install_zephyr_sdk.sh +RUN bash /install/ubuntu_install_zephyr.sh +ENV ZEPHYR_BASE=/opt/zephyrproject/zephyr + +# FreeRTOS deps +COPY install/ubuntu_install_freertos.sh /install/ubuntu_install_freertos.sh +RUN bash /install/ubuntu_install_freertos.sh + +# Arduino deps +# NOTE: override Arduino directories so packages are installed in a +# CI-accessible location. +ENV ARDUINO_DIRECTORIES_DATA=/arduino15-data +ENV ARDUINO_DIRECTORIES_DOWNLOADS=/arduino15-downloads +ENV ARDUINO_DIRECTORIES_USER=/arduino15-user +COPY install/ubuntu_install_arduino.sh /install/ubuntu_install_arduino.sh +RUN bash /install/ubuntu_install_arduino.sh + +# Install ONNX +COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh +RUN bash /install/ubuntu_install_onnx.sh + +# Install CMSIS_NN +COPY install/ubuntu_install_cmsis.sh /install/ubuntu_install_cmsis.sh +RUN bash /install/ubuntu_install_cmsis.sh /opt/arm/ethosu/cmsis +ENV CMSIS_PATH=/opt/arm/ethosu/cmsis/ + +# Arm(R) Ethos(TM)-U NPU driver +COPY install/ubuntu_install_ethosu_driver_stack.sh /install/ubuntu_install_ethosu_driver_stack.sh +RUN bash /install/ubuntu_install_ethosu_driver_stack.sh + +# Install Vela compiler +COPY install/ubuntu_install_vela.sh /install/ubuntu_install_vela.sh +RUN bash /install/ubuntu_install_vela.sh + +#Install CSI-NN2 +COPY install/ubuntu_download_csinn2_compute_lib.sh /install/ubuntu_download_csinn2_compute_lib.sh +RUN bash /install/ubuntu_download_csinn2_compute_lib.sh + +# Update PATH +ENV PATH /opt/arm/gcc-arm-none-eabi/bin:/opt/arm/FVP_Corstone_SSE-300/models/Linux64_GCC-6.4:$PATH +ENV PATH /opt/csi-nn2/tools/gcc-toolchain/bin:$PATH +ENV PATH /opt/csi-nn2/tools/qemu/bin:$PATH diff --git a/tests/scripts/task_config_build_cortexm.sh b/tests/scripts/task_config_build_qemu.sh similarity index 100% rename from tests/scripts/task_config_build_cortexm.sh rename to tests/scripts/task_config_build_qemu.sh From 5fc0ec080c9698353de3ec5a022f459e31ff2273 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Fri, 5 Aug 2022 09:00:37 -0700 Subject: [PATCH 09/10] merge with main --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index aadaec2e5e14..29271201c8df 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,7 @@ // 'python3 jenkins/generate.py' // Note: This timestamp is here to ensure that updates to the Jenkinsfile are // always rebased on main before merging: -// Generated at 2022-08-05T03:11:14.413104 +// Generated at 2022-08-05T16:00:20.038888 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. --> From 8a937fbd186c8efe939db1d57c77689d3c66a2c5 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Fri, 5 Aug 2022 10:25:14 -0700 Subject: [PATCH 10/10] add cortexm config file --- Jenkinsfile | 2 +- tests/scripts/task_config_build_cortexm.sh | 35 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 tests/scripts/task_config_build_cortexm.sh diff --git a/Jenkinsfile b/Jenkinsfile index 29271201c8df..7da3b9f8df09 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,7 @@ // 'python3 jenkins/generate.py' // Note: This timestamp is here to ensure that updates to the Jenkinsfile are // always rebased on main before merging: -// Generated at 2022-08-05T16:00:20.038888 +// Generated at 2022-08-05T17:23:43.942908 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. --> diff --git a/tests/scripts/task_config_build_cortexm.sh b/tests/scripts/task_config_build_cortexm.sh new file mode 100755 index 000000000000..29869983b86d --- /dev/null +++ b/tests/scripts/task_config_build_cortexm.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -euxo pipefail + +BUILD_DIR=$1 +mkdir -p "$BUILD_DIR" +cd "$BUILD_DIR" +cp ../cmake/config.cmake . + +echo set\(USE_SORT ON\) >> config.cmake +echo set\(USE_MICRO ON\) >> config.cmake +echo set\(USE_CMSISNN ON\) >> config.cmake +echo set\(USE_ETHOSU ON\) >> config.cmake +echo set\(USE_PROFILER ON\) >> config.cmake +echo set\(USE_LLVM llvm-config-10\) >> config.cmake +echo set\(CMAKE_CXX_FLAGS -Werror\) >> config.cmake +echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake +echo set\(USE_CCACHE OFF\) >> config.cmake +echo set\(SUMMARIZE ON\) >> config.cmake