-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (66 loc) · 2.11 KB
/
develop.yaml
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
name: Development CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
contents: read
checks: write
steps:
############ Setup ############
- name: Repo checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.77.0
components: clippy
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
token: ${{ secrets.GITHUB_TOKEN }}
############ Install executorch deps ############
- name: Cache Cpp ExecuTorch compiled libraries
id: cache-executorch-cpp-libs
uses: actions/cache@v4
with:
path: executorch-sys/third-party/executorch/cmake-out
key: cache-executorch-cpp-libs-${{ runner.OS }}-${{ hashFiles('scripts/setup_dev.py') }}
- name: Setup dev env, install executorch and its deps
run: python scripts/setup_dev.py $([[ "${{ steps.cache-executorch-cpp-libs.outputs.cache-hit }}" == "true" ]] && echo "--skip-executorch-cpp")
# TODO remove
- run: tree executorch-sys/third-party/executorch/cmake-out
############ Build executorch-rs ############
- name: Build
run: cargo build
############ Linters ############
- name: Rust Clippy linter
uses: auguwu/clippy-action@1.4.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
############ Tests ############
- name: Run Rust tests
run: cargo test --workspace --all-features
############ Examples ############
- name: Run 'hello world add no_std' example
run: |
python export_model.py
cargo run
working-directory: examples/hello_world_add_no_std
- name: Run 'hello world add' example
run: |
python export_model.py
cargo run
working-directory: examples/hello_world_add