@@ -37,6 +37,7 @@ def append_github_summary(results: dict[str, object], summary_path: Path) -> Non
3737 summary .write ("| --- | ---: | ---: |\n " )
3838 summary .write (f"| Clean | { clean ['duration_seconds' ]:.2f} s | { clean ['return_code' ]} |\n " )
3939 summary .write (f"| Incremental | { incremental ['duration_seconds' ]:.2f} s | { incremental ['return_code' ]} |\n \n " )
40+ summary .write (f"Pixi task: `{ results ['task' ]} `\n \n " )
4041 summary .write (f"Touched source: `{ results ['touched_source' ]} `\n " )
4142
4243
@@ -53,6 +54,11 @@ def parse_args() -> argparse.Namespace:
5354 default = Path ("build-benchmark.json" ),
5455 help = "JSON file that receives the benchmark results." ,
5556 )
57+ parser .add_argument (
58+ "--task" ,
59+ default = "build" ,
60+ help = "Pixi task used for both measured builds." ,
61+ )
5662 parser .add_argument (
5763 "--source" ,
5864 type = Path ,
@@ -71,16 +77,18 @@ def main() -> int:
7177 ["pixi" , "run" , "-e" , args .environment , "clean" ],
7278 check = True ,
7379 )
74- clean_build = run_timed (["pixi" , "run" , "-e" , args .environment , "build" ])
80+ build_command = ["pixi" , "run" , "-e" , args .environment , args .task ]
81+ clean_build = run_timed (build_command )
7582
7683 # Updating the timestamp makes the build system reconsider one translation unit.
7784 # The file content stays unchanged, allowing compiler caches to reuse their output.
7885 os .utime (args .source )
79- incremental_build = run_timed ([ "pixi" , "run" , "-e" , args . environment , "build" ] )
86+ incremental_build = run_timed (build_command )
8087
8188 results = {
8289 "created_at" : datetime .now (UTC ).isoformat (),
8390 "environment" : args .environment ,
91+ "task" : args .task ,
8492 "touched_source" : str (args .source ),
8593 "clean_build" : clean_build ,
8694 "incremental_build" : incremental_build ,
0 commit comments