Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
add tnn model convertor build to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ysh329 committed Jun 27, 2020
1 parent 6858db5 commit 966cfdd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@ jobs:
- name: Run a one-line script
run: echo Hello, world!


# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- name: pre-commit check
run:
cd .github/workflows && ./pre-commit-job.sh


- name: python unit test
run:
.github/workflows/unit-test-job.sh



tnn:
Expand All @@ -49,6 +51,15 @@ jobs:
- name: Run tnn build
run: cd tnn && ./build.sh


tnn-model-convertor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tnn model convertor build
run: cd tnn && ./build_tnn_model_convertor.sh


models:
runs-on: ubuntu-latest
steps:
Expand Down
25 changes: 25 additions & 0 deletions tnn/build_tnn_model_convertor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -ex

function prepare_env() {
# default
pip3 install onnx==1.6.0 onnxruntime numpy onnx-simplifier

# optional: tensorflow
pip3 install tensorflow==1.15.0
pip3 install tf2onnx
pip3 install onnxruntime

# optional: caffe
sudo apt-get install libprotobuf-dev protobuf-compiler
}

function main() {
prepare_env

# build
cd tnn/tools/convert2tnn
./build.sh
}

main

0 comments on commit 966cfdd

Please sign in to comment.