Skip to content

Commit

Permalink
(#101) Force suibase-daemon rust rebuild for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Oct 14, 2024
1 parent 01ea71f commit e1ea396
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rust/suibase/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions scripts/common/__suibase-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ update_SUIBASE_DAEMON_PID_var() {
export -f update_SUIBASE_DAEMON_PID_var

export SUIBASE_DAEMON_STARTED=false
# shellcheck disable=SC2120
start_suibase_daemon_as_needed() {

# Return 0 on success or not needed.
Expand All @@ -334,6 +335,11 @@ start_suibase_daemon_as_needed() {
get_app_var "$app_obj" "is_installed"
local _IS_INSTALLED=$APP_VAR

# Can force rebuild (ignore precompiled binary) with first parameter:
if [ "$1" = "--force-build" ]; then
set_app_var "$app_obj" "precompiled_bin" "false"
fi

if [ "$_IS_INSTALLED" != "true" ]; then

local _PERFORM_INSTALL=false
Expand Down
8 changes: 7 additions & 1 deletion scripts/dev/update-daemon
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

# This script is only intended for developers and continous integration.
#
# It forces a Rust rebuild of suibase-daemon and (re)starts it.
# (precompiled binaries are not used).
#

SUIBASE_DIR="$HOME/suibase"
WORKDIR="none"

Expand All @@ -19,5 +25,5 @@ cli_mutex_lock "suibase_daemon"
rm "$SUIBASE_DIR/workdirs/common/bin/suibase-daemon" >/dev/null 2>&1
stop_suibase_daemon

start_suibase_daemon_as_needed
start_suibase_daemon_as_needed --force-build
wait_for_json_rpc_up "any"

0 comments on commit e1ea396

Please sign in to comment.