oxc/tasks/benchmark/benches
overlookmotel f0cbbbe28c
ci: build each benchmark only with deps it needs (#3221)
This PR builds on #3201 to further speed up the benchmarks and reduce CI
time.

* Build and run each benchmark as separate job (like before).
* But now each bench is only built with the dependencies it needs.
* For linter benchmarks, build benchmark in 1 job (like #3201 does).
* Run each linter fixture in a separate job as they're slow.

This reduces total time to complete benchmarks from between 6m-7m to
~4m40s.

All the individual jobs complete in under 1m30s, except for building
linter benchmark which takes 2m30s. So there won't be the problem of
blocking the CI queue that there was before.

NB: I did try this before, and didn't see a benefit. But I realized
today what I was doing wrong - it only works once the caches are
populated by a previous run on main branch.

So the CI times in this PR won't look good, but once it's merged to
main, it will take effect. Here it is running on main branch of my fork:

https://github.com/overlookmotel/oxc/actions/runs/9030511348

I also added a step to delete the temp artefacts which aren't needed
once the run has completed.
2024-05-10 22:01:24 +08:00
..
codegen_sourcemap.rs refactor(sourcemap): change sourcemap name to take a reference (#2779) 2024-03-23 21:40:05 +08:00
lexer.rs refactor(bench): reuse allocator in parser + lexer benchmarks (#3053) 2024-04-22 09:03:26 +08:00
linter.rs ci: build each benchmark only with deps it needs (#3221) 2024-05-10 22:01:24 +08:00
minifier.rs chore(benchmark): remove custom allocators because they are flaky (#2004) 2024-01-12 16:05:47 +08:00
parser.rs refactor(bench): reuse allocator in parser + lexer benchmarks (#3053) 2024-04-22 09:03:26 +08:00
parser_napi.rs feat(tasks): benchmark NodeJS parser (#2770) 2024-03-20 05:06:09 +00:00
prettier.rs refactor(ast): refactor Trivias API - have less noise around it (#2692) 2024-03-12 20:16:36 +08:00
semantic.rs chore(benchmark): remove custom allocators because they are flaky (#2004) 2024-01-12 16:05:47 +08:00
sourcemap.rs chore(benchmark): use a larger file for sourcemap benchmark 2024-04-11 15:11:26 +08:00
transformer.rs refactor(transformer): remove the requirement of Semantic (#3140) 2024-04-30 12:48:21 +08:00