-
Notifications
You must be signed in to change notification settings - Fork 1k
35 lines (29 loc) · 1.04 KB
/
validate_flatbuffer_gen.yml
File metadata and controls
35 lines (29 loc) · 1.04 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
name: Validate Flatbuffer Generation
on:
workflow_dispatch:
pull_request:
paths:
- "schema/**"
- "exir/_serialize/generated/executorch_flatbuffer/**"
jobs:
exir-flatbuffer:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install executorch (with flatc)
run: ./install_executorch.sh -e
- name: Generate flatbuffer Python
run: python exir/_serialize/generate_program.py
- name: Validate executorch_flatbuffer is unchanged
run: |
git add -A exir/_serialize/generated/executorch_flatbuffer
if ! git diff --cached --quiet -- exir/_serialize/generated/executorch_flatbuffer; then
echo "Error: executorch_flatbuffer has uncommitted changes."
echo "Please run 'python exir/_serialize/generate_program.py' to regenerate the files and commit the changes."
exit 1
fi