forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 929 Bytes
/
inventory.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
name: Warning of Inventorying Rust
on:
push:
branches:
- master
paths:
- 'bindings/rust/wasmedge-sys/**'
pull_request:
branches:
- master
paths:
- 'bindings/rust/wasmedge-sys/**'
jobs:
rust:
runs-on: ubuntu-latest
container:
image: wasmedge/wasmedge:ubuntu-build-clang
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependency
run: |
apt update
apt install -y ctags
- name: Inventory for rust-sys
run: |
for fn in `ctags -x --c-types=f+p include/api/wasmedge/wasmedge.h | awk '/^WasmEdge_/{print $1}'`; do
grep -q ${fn} -R bindings/rust/wasmedge-sys || echo "${fn} is not used in rust-sys crate" >> /tmp/missing_api_in_rust.txt
done;
cat /tmp/missing_api_in_rust.txt || exit 0
exit `wc -l /tmp/missing_api_in_rust.txt | awk '{print $1}'`