-
-
Notifications
You must be signed in to change notification settings - Fork 62
59 lines (52 loc) · 1.5 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
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUSTUP_MAX_RETRIES: 10
ORT_DYLIB_PATH: /tmp/onnxruntime/lib/libonnxruntime.so
RUST_LOG: event_worker=trace
jobs:
cargo-fmt:
name: "cargo fmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup show
- run: ./scripts/fmt.sh
cargo-clippy:
name: "cargo clippy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup show
- uses: Swatinem/rust-cache@v2
- run: ./scripts/clippy.sh
cargo-test:
name: "cargo test"
runs-on: ubuntu-latest
steps:
- name: Remove unwanted software
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo apt-get remove --purge -y man-db
sudo apt-get remove 'clang-13*' 'clang-14*' 'clang-15*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'lld-13*' 'lld-14*' 'lld-15*'
- uses: actions/checkout@v4
- run: rustup show
- uses: Swatinem/rust-cache@v2
- uses: cardinalby/export-env-action@v2
with:
envFile: ".env"
- name: Install ONNX Runtime Library
run: ./scripts/install_onnx.sh ${{ env.ONNXRUNTIME_VERSION }} linux x64 /tmp/onnxruntime
- run: ./scripts/test.sh