File tree Expand file tree Collapse file tree 5 files changed +31
-0
lines changed
Expand file tree Collapse file tree 5 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,11 @@ jobs:
215215 - name : Ensure all headers are accounted for
216216 run : |
217217 python -m devtools ci scan-headers
218+
219+ # TODO blocked on semiwrap release
220+ # - name: Ensure YAML files are up to date
221+ # run: |
222+ # python -m devtools ci update-yaml
218223
219224 - uses : actions/upload-artifact@v4
220225 with :
Original file line number Diff line number Diff line change @@ -152,3 +152,16 @@ def scan_headers(ctx: Context):
152152
153153 if not ok :
154154 sys .exit (1 )
155+
156+
157+ @ci .command ()
158+ @click .pass_obj
159+ def update_yaml (ctx : Context ):
160+ """Run update-yaml on all projects"""
161+ for project in ctx .subprojects .values ():
162+ if project .is_semiwrap_project ():
163+ if not project .cfg .ci_update_yaml :
164+ print ("- Skipping" , project .name , file = sys .stderr )
165+ continue
166+
167+ project .update_yaml ()
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ class SubprojectConfig:
1616 #: Whether `ci scan-headers` should include this project
1717 ci_scan_headers : bool = True
1818
19+ ci_update_yaml : bool = True
20+
1921
2022@dataclasses .dataclass
2123class Parameters :
Original file line number Diff line number Diff line change @@ -61,6 +61,16 @@ def scan_headers(self):
6161 )
6262 return result .returncode == 0
6363
64+ def update_yaml (self ):
65+ """Resyncs the yaml files with their header files"""
66+ run_cmd (
67+ sys .executable ,
68+ "-m" ,
69+ "semiwrap" ,
70+ "update-yaml" ,
71+ cwd = self .path ,
72+ )
73+
6474 def update_init (self ):
6575 run_cmd (
6676 sys .executable ,
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ robot = true
111111# practicality over purity - this is because we use a static
112112# library that only exists at build time
113113ci_scan_headers = false
114+ ci_update_yaml = false
114115
115116[subprojects ."robotpy-apriltag" ]
116117py_version = " wrapper"
You can’t perform that action at this time.
0 commit comments