-
Notifications
You must be signed in to change notification settings - Fork 9
71 lines (57 loc) · 1.63 KB
/
ci.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: ci
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: 'true'
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: cargo clippy
run: cargo clippy --all-features --no-deps -- -D warnings
- name: cargo fmt
run: cargo fmt -- --check
- name: cargo doc
run: cargo doc --all-features --no-deps --document-private-items
env:
RUSTDOCFLAGS: -D warnings
test:
name: test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
ort_dylib_path: ./runtimes/libonnxruntime.linux-x64-1.18.0.so
- os: macos-latest
ort_dylib_path: ./runtimes/libonnxruntime.osx-arm64-1.18.0.dylib
- os: windows-latest
ort_dylib_path: ./runtimes/libonnxruntime.win-x64-1.18.0.dll
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: compile
run: cargo test --all-features --no-run
- name: test
run: cargo test --all-features
env:
ORT_DYLIB_PATH: ${{ matrix.ort_dylib_path }}