Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ pipeline {
sh 'curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64'
sh 'chmod +x bazelisk-linux-amd64'
sh """
rm -rf /var/tmp/_bazel_jenkins/install/*
./bazelisk-linux-amd64 build //:xcore-opt \\
--verbose_failures \\
--linkopt=-lrt \\
Expand All @@ -196,6 +197,7 @@ pipeline {
--define SETUPTOOLS_SCM_VERSION=\$(python -m setuptools_scm -c ../python/pyproject.toml)
"""
sh '''
rm -rf /var/tmp/_bazel_jenkins/install/*
./bazelisk-linux-amd64 test //Test:all \\
--verbose_failures \\
--test_output=errors \\
Expand Down Expand Up @@ -289,7 +291,8 @@ pipeline {
def cpuFlag = arch == 'arm64' ? 'darwin_arm64' : 'darwin_x86_64'
def outputName = "xcore-opt-${arch}"
sh """
./bazelisk-darwin-arm64 build //:xcore-opt \\
rm -rf /var/tmp/_bazel_jenkins/install/*
./bazelisk-darwin-arm64 build //:xcore-opt \\
--cpu=${cpuFlag} \\
--remote_cache=${env.BAZEL_CACHE_URL} \\
--copt=-fvisibility=hidden \\
Expand Down
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ create_zip() {
mkdir -p build
cd build
if [ "$1" = "xcore" ]; then
cmake .. --toolchain=../lib_tflite_micro/submodules/xmos_cmake_toolchain/xs3a.cmake
if xcc --version | grep -q 'XTC version: 99.99.99'; then
cmake .. --toolchain=$(which xcc)/../../build/xcommon_cmake/xcore_xs.cmake
else
cmake .. --toolchain=../lib_tflite_micro/submodules/xmos_cmake_toolchain/xs3a.cmake
fi
else
cmake .. -DLIB_NAME=x86tflitemicro
fi
Expand Down