From e9faa7e37c2c3cae2afbfad1d8f41fe3ede49da1 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:37:29 +0200 Subject: [PATCH] scanopy: use prebuilt server binary, relax release profile for generate-fixtures --- ct/scanopy.sh | 9 +++++---- install/scanopy-install.sh | 13 +++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ct/scanopy.sh b/ct/scanopy.sh index 1e22c4fce..bb93b719c 100644 --- a/ct/scanopy.sh +++ b/ct/scanopy.sh @@ -51,12 +51,13 @@ function update_script() { fi sed -i 's|_TARGET=.*$|_URL=http://127.0.0.1:60072|' /opt/scanopy/.env - msg_info "Building Scanopy Server (patience)" + fetch_and_deploy_gh_release "scanopy-server" "scanopy/scanopy" "singlefile" "latest" "/usr/bin" "scanopy-server-linux-$(arch_resolve)" + + msg_info "Generating UI Fixtures (patience)" cd /opt/scanopy/backend - CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin server --bin generate-fixtures + CARGO_PROFILE_RELEASE_LTO=false CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin generate-fixtures $STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data - mv ./target/release/server /usr/bin/scanopy-server - msg_ok "Built Scanopy Server" + msg_ok "Generated UI Fixtures" msg_info "Creating frontend UI" export PUBLIC_SERVER_HOSTNAME=default diff --git a/install/scanopy-install.sh b/install/scanopy-install.sh index b272a2297..862c0b6bf 100644 --- a/install/scanopy-install.sh +++ b/install/scanopy-install.sh @@ -27,12 +27,17 @@ fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')" RUST_TOOLCHAIN=$TOOLCHAIN setup_rust -msg_info "Building Scanopy Server (patience)" +fetch_and_deploy_gh_release "scanopy-server" "scanopy/scanopy" "singlefile" "latest" "/usr/bin" "scanopy-server-linux-$(arch_resolve)" + +msg_info "Generating UI Fixtures (patience)" cd /opt/scanopy/backend -CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin server --bin generate-fixtures +# Server binary is prebuilt above; generate-fixtures is a throwaway build-time +# tool with no prebuilt release, but shares the crate's release profile +# (lto + codegen-units=1) that caused the OOM, so relax it here - its own +# binary size/speed doesn't matter, only the fixture JSON it emits. +CARGO_PROFILE_RELEASE_LTO=false CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin generate-fixtures $STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data -mv ./target/release/server /usr/bin/scanopy-server -msg_ok "Built Scanopy Server" +msg_ok "Generated UI Fixtures" msg_info "Creating frontend UI" export PUBLIC_SERVER_HOSTNAME=default