-
-
Notifications
You must be signed in to change notification settings - Fork 103
57 lines (57 loc) · 1.9 KB
/
custom-static-link.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
name: 🔗 Static Linking
on:
workflow_dispatch:
inputs:
onnxruntime-branch:
type: string
description: "ONNX Runtime branch"
default: "v1.20.0"
push:
paths:
- 'ort-sys/build.rs'
pull_request:
paths:
- 'ort-sys/build.rs'
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
jobs:
static-link-linux:
name: Linux (x64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile ONNX Runtime
run: |
git clone https://github.com/microsoft/onnxruntime --recursive --branch ${{ inputs.onnxruntime-branch || 'v1.20.0' }} --single-branch --depth 1
cd onnxruntime
./build.sh --update --build --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync
cd ..
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Run test
run: |
ORT_LIB_LOCATION="$(pwd)/onnxruntime/build/Linux/Release" cargo run --example custom-ops
minimal-build:
name: Minimal build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile ONNX Runtime
run: |
git clone https://github.com/microsoft/onnxruntime --recursive --branch ${{ inputs.onnxruntime-branch || 'v1.20.0' }} --single-branch --depth 1
cd onnxruntime
./build.sh --update --build --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync --minimal_build
cd ..
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Test linking
run: |
ORT_LIB_LOCATION="$(pwd)/onnxruntime/build/Linux/Release" cargo build --example gpt2