-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.62 KB
/
Copy pathci.yml
File metadata and controls
68 lines (56 loc) · 1.62 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 45
env:
CC: clang
CXX: clang++
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Clang
run: |
sudo apt-get update
sudo apt-get install -y clang
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: python/pyproject.toml
- name: Install Python dependencies
run: pip install -e "python[train]"
- name: Build
run: make
- name: Run C++, C API, and Python tests
env:
GITHUB_ACTIONS: true
run: make rebuild test
- name: CMake configure and build
run: |
cmake -B cmake-build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DNETKIT_CMSIS_NN=OFF -DNETKIT_XNNPACK=OFF
cmake --build cmake-build
./cmake-build/netkit test
- name: Build and run C++ example
run: |
make example-cpp
./examples/infer_cpp models/test_mlp.nk 1 2
- name: Build and run C example
run: |
make example-c
./examples/infer_c models/test_mlp.nk 1 2
- name: CLI smoke test
run: |
make netkit
./netkit run models/test_mlp.nk --input 1,2
./netkit inspect models/test_mlp.nk
./netkit inspect models/mnist_cnn.nk --full || true