forked from RapidAI/OnnxruntimeBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 2.09 KB
/
linux-aarch64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: linux
on:
workflow_dispatch:
jobs:
ubuntu1804:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [ 3.8.5 ]
env:
ONNX_VERSION: v1.11.1
SHARED_PKG_NAME: onnxruntime-1.11.1-ubuntu1804-shared
STATIC_PKG_NAME: onnxruntime-1.11.1-ubuntu1804-static
steps:
# 检出代码
- uses: actions/checkout@v2
# 配置Python环境 onnxruntime要求python minor version: expecting python 3.6+
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# 检出onnxruntime
- name: checkout onnxruntime
uses: actions/checkout@v2
with:
repository: microsoft/onnxruntime
path: onnxruntime-${{ env.ONNX_VERSION }}
ref: ${{ env.ONNX_VERSION }}
submodules: recursive
# 复制编译脚本
- name: copy build script
run: |
cp build-onnxruntime.sh onnxruntime-${{ env.ONNX_VERSION }}
cp onnxruntime_cmake_options.txt onnxruntime-${{ env.ONNX_VERSION }}
# 编译
- name: build
with:
arch: aarch64
distro: ubuntu18.04
run: |
cd onnxruntime-${{ env.ONNX_VERSION }}
chmod a+x build-onnxruntime.sh &&./build-onnxruntime.sh
# install文件夹改名linux,并使用7z压缩
- name: 7zip
run: |
mv onnxruntime-${{ env.ONNX_VERSION }}/build/Linux/Release/install linux
7z a ${{ env.SHARED_PKG_NAME }}.7z linux
rm -r -f linux
mv onnxruntime-${{ env.ONNX_VERSION }}/build/Linux/Release/install-static linux
7z a ${{ env.STATIC_PKG_NAME }}.7z linux
rm -r -f linux
# 上传artifact
- name: upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.SHARED_PKG_NAME }}
path: ${{ env.SHARED_PKG_NAME }}.7z
- name: upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.STATIC_PKG_NAME }}
path: ${{ env.STATIC_PKG_NAME }}.7z