Repository navigation
feat: add Linux support and CI benchmark workflow - #4
Conversation
|
Thanks for the PR! The Linux support and CI benchmark workflow look good overall. Just one small security improvement before merging: In ".github/workflows/bench.yaml", the "arx_spec" workflow input is interpolated directly into shell commands using "${{ inputs.arx_spec }}". Since this is user-controlled input, it could allow unintended shell command execution. Could you pass the value through a step-level environment variable (e.g., "ARX_SPEC") and reference it as ""$ARX_SPEC"" instead? Please apply the same approach when recording "BENCH_ARX_INSTALL". Also, while touching the documentation, please update the "NUMBA_PYTHON" default in "README.md" to reflect the new "sys.executable" / "python3" fallback. That's all from my side. No additional refactoring or tests are necessary. |
|
Thanks for catching that @xmnlab! Pushed a follow up commit addressing both points:
All 23 unit tests and workflow YAML checks pass locally. Thanks for the review! |
|
Thanks for the updates, @Krishna27Singh ! Could you add a checked-in Conda environment for the benchmarks and use it for both local runs and GitHub Actions? Please include Python and pip as Conda dependencies, declare the required Python packages in the pip: section, and pin the benchmark versions, including Numba and the default Arx release. That gives us one place to define the baseline environment and lets contributors recreate it locally. A root-level conda.yaml is fine for a single environment. If multiple environments are needed, we usually put them under conda/. You can use Arx’s conda/dev.yaml as a reference. |
|
Thanks @xmnlab for the review!
Verified locally by creating a fresh environment from |
|
thanks @Krishna27Singh |
Summary
Adds Linux compatibility to
harness/bench.py, optional--cirun count overrides inbenchmark.toml, and a Linux GitHub Actions benchmark workflow (.github/workflows/bench.yaml).What Changed
harness/bench.py:/proc/cpuinfowithlscpuandplatformfallbacks).clangwarning so it only runs on macOS.NUMBA_PYTHONfallback to usesys.executable/python3instead of a macOS conda path.--ciflag reading[case.ci]runs/warmupoverrides (with--quicktaking precedence) and optionalBENCH_ARX_INSTALLrecording inenvironment.json.suites/fibonacci/benchmark.toml: Added[case.ci]run/warmup overrides for CI runtime budgeting without changing local defaults..github/workflows/bench.yaml: Manual (workflow_dispatchwithquickandarx_specinputs) and weekly (0 4 * * 0) Linux workflow runningarxandctogether inarx-c(for like-for-like ratios) and the remaining languages in separate matrix jobs, uploading one artifact per job.tests/&README.md: Added unit tests for Linux compatibility and CI overrides (tests/test_linux_ci.py,tests/test_manifests.py) and documented workflow usage and shared-runner variance inREADME.md.Verification
python3 -m unittest discover -s tests -v(23 passed)..github/workflows/bench.yamlon my fork in both--quickand--cimodes: all 8 matrix jobs passed and produced 8 artifacts.bench-arx-c.ziplocally and verifiedpython3 harness/bench.py reportrenders all Fibonacci tables and Linux environment metadata cleanly.