Skip to content

Commit

Permalink
Add qemu build step to CI (apache#6644)
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch authored and trevor-m committed Oct 19, 2020
1 parent c28258b commit 6739553
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ ci_gpu = "tlcpack/ci-gpu:v0.64"
ci_cpu = "tlcpack/ci-cpu:v0.66"
ci_wasm = "tlcpack/ci-wasm:v0.60"
ci_i386 = "tlcpack/ci-i386:v0.52"
ci_qemu = "tlcpack/ci-qemu:v0.01"
// <--- End of regex-scanned config.

// tvm libraries
Expand Down Expand Up @@ -210,6 +211,18 @@ stage('Build') {
pack_lib('i386', tvm_multilib)
}
}
},
'BUILD: QEMU': {
node('CPU') {
ws(per_exec_ws("tvm/build-qemu")) {
init_git()
sh "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh"
make(ci_qemu, 'build', '-j2')
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh"
}
}
}
}
}

Expand Down
32 changes: 32 additions & 0 deletions tests/scripts/task_config_build_qemu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/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.

set -e
set -u

mkdir -p build
cd build
cp ../cmake/config.cmake .

echo set\(USE_SORT ON\) >> config.cmake
echo set\(USE_MICRO ON\) >> config.cmake
echo set\(USE_STANDALONE_CRT ON\) >> config.cmake
echo set\(USE_LLVM llvm-config-10\) >> config.cmake
echo set\(CMAKE_CXX_COMPILER g++\) >> config.cmake
echo set\(CMAKE_CXX_FLAGS -Werror\) >> config.cmake
echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake
20 changes: 20 additions & 0 deletions tests/scripts/task_python_microtvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/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.

set -e
set -u

0 comments on commit 6739553

Please sign in to comment.