-
-
Notifications
You must be signed in to change notification settings - Fork 6
133 lines (128 loc) · 4.35 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Download large files
working-directory: ./models
run: ./download.sh CI
- name: Add llvm-tools-preview
run: rustup component add llvm-tools-preview
- name: Install grcov
run: cargo install grcov
- name: Install dependencies
run: sudo apt install libomp-dev
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Test
run: |
cargo test --release
ALTIUS_ENABLE_CLIF=1 cargo test --release
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
- name: Run examples
run: |
(cd crates/altius-py && poetry run python deit.py)
(cd crates/altius-py && poetry run python resnet50.py)
(cd crates/altius-py && poetry run python export_vit.py)
cargo run --release --example mnist
cargo run --release --example mobilenet
cargo run --release --example deit
cargo run --release --example mnist_cpu
cargo run --release --example mobilenet_cpu
cargo run --release --example deit_cpu
cargo run --release --example vit_cpu
cargo run --release --example vit
cargo run --release --example infer -- ./models/mnist-8.onnx
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
- name: Submit coverage
run: |
mkdir -p /tmp/cov/
cp -rf ./target/release/* /tmp/cov/
grcov . --binary-path /tmp/cov/ -s . -t cobertura --branch --ignore-not-existing --ignore "*cargo*" -o coverage.xml
bash <(curl -s https://codecov.io/bash)
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Download large files
working-directory: ./models
run: ./download.sh CI
- name: Add llvm-tools-preview
run: rustup component add llvm-tools-preview
- name: Install grcov
run: cargo install grcov
- name: Install dependencies
run: brew install libomp
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Test
run: |
cargo test --release
ALTIUS_ENABLE_CLIF=1 cargo test --release
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
- name: Run examples
run: |
(cd crates/altius-py && poetry run python deit.py)
(cd crates/altius-py && poetry run python resnet50.py)
(cd crates/altius-py && poetry run python export_vit.py)
cargo run --release --example mnist
cargo run --release --example mobilenet
cargo run --release --example deit
cargo run --release --example mnist_cpu
cargo run --release --example mobilenet_cpu
cargo run --release --example deit_cpu
cargo run --release --example vit_cpu
cargo run --release --example vit
cargo run --release --example infer -- ./models/mnist-8.onnx
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
# - name: Submit coverage
# run: |
# mkdir -p /tmp/cov/
# cp -rf ./target/release/* /tmp/cov/
# grcov . --binary-path /tmp/cov/ -s . -t cobertura --branch --ignore-not-existing --ignore "*cargo*" -o coverage.xml
# bash <(curl -s https://codecov.io/bash)
# env:
# RUSTFLAGS: -Cinstrument-coverage
# LLVM_PROFILE_FILE: coverage-%p-%m.profraw