From 1075aa685f2d679eeb904493763b02aef69e82b3 Mon Sep 17 00:00:00 2001 From: Ahmad El Youssef Date: Mon, 29 Jun 2026 15:12:55 -0700 Subject: [PATCH 1/2] Add self-contained Health check fbpkg build via buck_genrule (#697) Summary: Add self-contained HealthCheck fbpkg build via buck_genrule to enable pre-built HealthCheck binaries in the cea.chips.benchpress.oss_prebuild fbpkg. The HealthCheck benchmark will now be pre-built at fbpkg build time for both x86_64 and aarch64 architectures, eliminating the need to run benchpress install on target machines. Reviewed By: excelle08 Differential Revision: D108812377 --- benchpress/config/benchmarks.yml | 3 +++ packages/health_check/run.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/benchpress/config/benchmarks.yml b/benchpress/config/benchmarks.yml index 13c208c1b..ef1503291 100644 --- a/benchpress/config/benchmarks.yml +++ b/benchpress/config/benchmarks.yml @@ -171,6 +171,9 @@ health_check: parser: health_check install_script: ./packages/health_check/install_health_check.sh cleanup_script: ./packages/health_check/cleanup_health_check.sh + install_markers: + - ./benchmarks/health_check/run.sh + - ./benchmarks/health_check/sleepbench/sleepbench path: ./benchmarks/health_check/run.sh metrics: [] diff --git a/packages/health_check/run.sh b/packages/health_check/run.sh index c9a8df318..a6b31f1b9 100755 --- a/packages/health_check/run.sh +++ b/packages/health_check/run.sh @@ -9,6 +9,12 @@ set -Eeo pipefail HEALTH_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) + +# Add bundled binaries to PATH (for self-contained builds) +if [ -d "${HEALTH_ROOT}/bin" ]; then + export PATH="${HEALTH_ROOT}/bin:${PATH}" + export LD_LIBRARY_PATH="${HEALTH_ROOT}/lib:${LD_LIBRARY_PATH:-}" +fi show_help() { cat < Date: Mon, 29 Jun 2026 15:12:55 -0700 Subject: [PATCH 2/2] Add self-contained syscall and schbench fbpkg build via buck_genrule Summary: Pre-build syscall and schbench at fbpkg build time so the package runs without `benchpress install`. **Syscall**: custom genrule build (same two-stage pattern as feedsim/health_check). Downloads gflags from Manifold, compiles syscall.cpp with static gflags linkage. **Schbench**: uses existing `//third-party/schbench:schbench` cpp_binary target directly via fbpkg.copy(). No custom build scripts or Manifold deps needed since the source is already in fbsource. Key changes: - `fb_scripts/builder/syscall/`: build.sh, download_deps.sh, upload_deps_to_manifold.sh for syscall genrule build - BUCK: syscall genrules (deps_download, x86 build, arm64 build) + schbench via fbpkg.copy from //third-party/schbench:schbench - `benchmarks_system.yml`: added install_markers for prebuild detection Reviewed By: excelle08 Differential Revision: D108812394 --- benchpress/config/benchmarks_system.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchpress/config/benchmarks_system.yml b/benchpress/config/benchmarks_system.yml index 02ddbf7f8..b5de37876 100644 --- a/benchpress/config/benchmarks_system.yml +++ b/benchpress/config/benchmarks_system.yml @@ -7,6 +7,8 @@ syscall: parser: syscall install_script: ./packages/syscall/install_syscall.sh cleanup_script: ./packages/syscall/cleanup_syscall.sh + install_markers: + - ./packages/syscall/syscall path: ./packages/syscall/syscall tags: scope: @@ -19,6 +21,8 @@ schbench: parser: schbench install_script: ./packages/schbench/install_schbench.sh cleanup_script: ./packages/schbench/cleanup_schbench.sh + install_markers: + - ./packages/schbench/bin/schbench path: ./packages/schbench/bin/schbench tags: scope: