mmdeploy/.github/workflows/rust_api.yml
RunningLeon 4bb9bc738c
bump version to v1.0.0 (#1960)
* change docs from 1.x to main

* bump version

* update readme status info and highlights

* revert version change

* fix dead links

* fix script

* fix docs

* fix building status

* fix md lint error

* upgrade to ubuntu20.04 for github ci

* Revert "upgrade to ubuntu20.04 for github ci"

This reverts commit 9c598f4857633dfb96b116ca9fb9a5d15b5fa6b4.

* update codebase md files

* upgrade to ubuntu20.04 for github ci

* fix

* fix requirements

* fix

* fix ci

* bump version

* fix

* fix pplnn torchscript

* fix building status

* fix ncnn

* fix

* remove circileci hold

* fix pytorch image
2023-04-06 12:07:42 +08:00

65 lines
2.1 KiB
YAML

name: rust_api
on:
push:
paths-ignore:
- "tools/**"
pull_request:
paths-ignore:
- "tools/**"
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_rust_api:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install latest nightly Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: update
run: sudo apt update
- name: Install dependencies
run: sudo apt install llvm-dev libclang-dev clang git-lfs
- name: Install onnxruntime
run: |
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
tar -zxvf onnxruntime-linux-x64-1.8.1.tgz
pushd onnxruntime-linux-x64-1.8.1
popd
- name: Install opencv
run: sudo apt-get install libopencv-dev
- name: Install mmdeploy with onnxruntime backend
run: |
wget https://github.com/open-mmlab/mmdeploy/releases/download/v0.9.0/mmdeploy-0.9.0-linux-x86_64-onnxruntime1.8.1.tar.gz
tar -zxvf mmdeploy-0.9.0-linux-x86_64-onnxruntime1.8.1.tar.gz
- name: Download rust-mmdeploy
run: git clone https://github.com/liu-mengyang/rust-mmdeploy
- name: Download converted models
run: git clone https://github.com/liu-mengyang/mmdeploy-converted-models --depth=1
- name: Test rustdemo
run: |
pushd rust-mmdeploy
export MMDEPLOY_DIR=/home/runner/work/mmdeploy/mmdeploy/mmdeploy-0.9.0-linux-x86_64-onnxruntime1.8.1/sdk
export LD_LIBRARY_PATH=$MMDEPLOY_DIR/lib:$LD_LIBRARY_PATH
export ONNXRUNTIME_DIR=/home/runner/work/mmdeploy/mmdeploy/onnxruntime-linux-x64-1.8.1
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
cargo build
sh ci_test.sh