-
Notifications
You must be signed in to change notification settings - Fork 611
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Use one script to pregenerate everything (#7121)
A pregen_all Python script was added that calls all the other pregen scripts. This prevents the generated file checks and pregen command from falling out of sync. This is meant to only run in CI, since the script is not portable across platforms.
- Loading branch information
Showing
3 changed files
with
44 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import subprocess | ||
import sys | ||
from pathlib import Path | ||
|
||
|
||
def main(argv): | ||
script_path = Path(__file__).resolve() | ||
REPO_ROOT = script_path.parent.parent.parent | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"--quickbuf_plugin", | ||
help="Path to the quickbuf protoc plugin", | ||
required=True, | ||
) | ||
args = parser.parse_args(argv) | ||
subprocess.run(["python", f"{REPO_ROOT}/hal/generate_usage_reporting.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/ntcore/generate_topics.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpimath/generate_numbers.py"]) | ||
subprocess.run( | ||
[ | ||
"python", | ||
f"{REPO_ROOT}/wpimath/generate_quickbuf.py", | ||
f"--quickbuf_plugin={args.quickbuf_plugin}", | ||
] | ||
) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpiunits/generate_units.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpilibc/generate_hids.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpilibj/generate_hids.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpilibNewCommands/generate_hids.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpilibc/generate_pwm_motor_controllers.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/wpilibj/generate_pwm_motor_controllers.py"]) | ||
subprocess.run(["python", f"{REPO_ROOT}/thirdparty/imgui_suite/generate_gl3w.py"]) | ||
subprocess.run(f"{REPO_ROOT}/thirdparty/imgui_suite/generate_fonts.sh") | ||
|
||
|
||
if __name__ == "__main__": | ||
main(sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters