mirror of
https://github.com/pykeio/ort
synced 2026-04-25 16:34:55 +02:00
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: 🔗 Static Linking
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
onnxruntime-branch:
|
|
type: string
|
|
description: "ONNX Runtime branch"
|
|
default: "v1.21.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.21.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 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.21.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 example-custom-ops
|