Skip to content

test

test #24

Workflow file for this run

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 unzip
- name: Download ONNX Runtime
run: |
if [ "${{ matrix.arch }}" == "x86_64" ]; then
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-linux-x64-static_lib-1.18.1-glibc2_17.zip -O onnxruntime.zip
else
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-linux-aarch64-static_lib-1.18.1-glibc2_17.zip -O onnxruntime.zip
fi
mkdir -p onnxruntime
unzip onnxruntime.zip -d onnxruntime-temp
mv onnxruntime-temp/*/* onnxruntime
rm -rf onnxruntime-temp
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DONNXRUNTIME_DIR=${PWD}/onnxruntime
- name: Build
run: cmake --build build --config Release
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: linux-${{ matrix.arch }}
path: lib/