CI test for vx-delegate #248
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI test for vx-delegate | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
schedule: | |
- cron: '0 16 * * 4' | |
env: | |
# CodeQl and AddressSanitizer needs more memory | |
BUILD_TYPE: Release | |
LD_LIBRARY_PATH: ${{github.workspace}}/build/_deps/tim-vx-src/prebuilt-sdk/x86_64_linux/lib:${{github.workspace}}/build/_deps/tim-vx-install/build/lib | |
VIVANTE_SDK_DIR: ${{github.workspace}}/build/_deps/tim-vx-src/prebuilt-sdk/x86_64_linux/ | |
CODEQL_CHECK: Off | |
jobs: | |
vx-delegate-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Initialize CodeQL | |
if: ${{ env.CODEQL_CHECK != 'Off' }} | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: cpp, python | |
- name: Fetching tensorflow | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "xiang.zhang" | |
git clone https://github.com/tensorflow/tensorflow.git ${{github.workspace}}/3rd-party/tensorflow | |
cd ${{github.workspace}}/3rd-party/tensorflow && git checkout v2.11.0 | |
patch -p1 < ${{github.workspace}}/patches/tf_2_11_kernel_test.patch | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTFLITE_KERNEL_TEST=ON -DTFLITE_ENABLE_XNNPACK=OFF -DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${{github.workspace}}/3rd-party/tensorflow | |
- name: Perform CodeQL Analysis | |
if: ${{ env.CODEQL_CHECK != 'Off' }} | |
uses: github/codeql-action/analyze@v2 | |
- name: build | |
# Build your program with the given configuration | |
run: | | |
cd ${{github.workspace}}/build && make all -j12 | |
- name: do kernel test | |
id: kernel_test | |
run: | | |
cd ${{github.workspace}}/script | |
chmod u+x ${{github.workspace}}/script/KernelTest.sh | |
./KernelTest.sh |