Skip to content

Commit af8d7a3

Browse files
committed
Add bones
1 parent 5870aff commit af8d7a3

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

.github/workflows/dist.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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:

devtools/ci.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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()

devtools/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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
2123
class Parameters:

devtools/subproject.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

rdev.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
113113
ci_scan_headers = false
114+
ci_update_yaml = false
114115

115116
[subprojects."robotpy-apriltag"]
116117
py_version = "wrapper"

0 commit comments

Comments
 (0)