-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.22 KB
/
build-linux.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
name: Build Linux
on:
push:
branches:
- main
paths:
- '.github/workflows/build-linux.yml'
- 'src/**'
- 'include/**'
- 'example/**'
- 'CMakeLists.txt'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install CMake
run: sudo apt-get update |
sudo apt-get install -y cmake
- name: Download ONNX Runtime
run: |
if [ "${{ matrix.arch }}" == "x86_64" ]; then
wget https://github.com/microsoft/onnxruntime/releases/download/v1.18.1/onnxruntime-linux-x64-1.18.1.tgz -O onnxruntime.tgz
else
wget https://github.com/microsoft/onnxruntime/releases/download/v1.18.1/onnxruntime-linux-arm64-1.18.1.tgz -O onnxruntime.tgz
fi
mkdir -p onnxruntime
tar -xzf onnxruntime.tgz -C onnxruntime --strip-components 1
mkdir -p lib
rsync -a onnxruntime/lib/ lib/
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DONNXRUNTIME_DIR=${PWD}/onnxruntime
- name: Build
run: cmake --build build --config Release