Skip to content

Commit

Permalink
ci(link): test minimal build
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Oct 19, 2024
1 parent bfa37d3 commit 6bb3e71
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/custom-static-link.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: 🔗 Static Linking
on:
workflow_dispatch:
inputs:
onnxruntime-branch:
type: string
description: "ONNX Runtime branch"
default: "v1.19.2"
push:
paths:
- 'ort-sys/build.rs'
Expand All @@ -19,15 +24,34 @@ jobs:
- uses: actions/checkout@v4
- name: Compile ONNX Runtime
run: |
git clone https://github.com/microsoft/onnxruntime --recursive --branch v1.19.2 --single-branch --depth 1
git clone https://github.com/microsoft/onnxruntime --recursive --branch ${{ inputs.onnxruntime-branch }} --single-branch --depth 1
cd onnxruntime
./build.sh --update --build --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF
./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 tests
- 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 }} --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

0 comments on commit 6bb3e71

Please sign in to comment.