diff --git a/.buildkite/emscripten.yml b/.buildkite/emscripten.yml --- a/.buildkite/emscripten.yml +++ b/.buildkite/emscripten.yml @@ -1,18 +1,17 @@ steps: - label: 'Emscripten build' command: + - 'git config --global --add safe.directory "*"' - 'apt update && apt install -y autoconf libtool build-essential cmake git' - 'cd web' - - 'BEFORE_HASH=$(sha256sum ./database/_generated/comm_query_executor.wasm)' - './scripts/run_emscripten.sh' - - 'AFTER_HASH=$(sha256sum ./database/_generated/comm_query_executor.wasm)' - - '[[ "$BEFORE_HASH" == "$AFTER_HASH" ]] || exit 1' + - 'git diff --exit-code' retry: automatic: true plugins: - docker#v5.3.0: image: 'emscripten/emsdk:3.1.17' propagate-environment: true - shell: ['/bin/bash', '-e', '-c'] + shell: [ '/bin/bash', '-e', '-c' ] agents: - 'autoscaling=true' diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp --- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp +++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp @@ -916,6 +916,7 @@ db_path << "db path: " << SQLiteQueryExecutor::sqliteFilePath.c_str() << std::endl; Logger::log(db_path.str()); + Logger::log("TEST"); auto db_version = get_database_version(db); std::stringstream version_msg; diff --git a/web/scripts/run_emscripten.sh b/web/scripts/run_emscripten.sh --- a/web/scripts/run_emscripten.sh +++ b/web/scripts/run_emscripten.sh @@ -2,6 +2,8 @@ set -Eeuo pipefail +sha256sum ./database/_generated/comm_query_executor.wasm + if ! command -v emcc > /dev/null; then echo "Please install emscripten or run 'nix develop'" >&2 exit 1 @@ -88,7 +90,7 @@ if [ ! -d "$OPENSSL_DIR" ]; then echo "OpenSSL sources not found. Downloading." download_openssl -fi +fi if [ ! -f "$OPENSSL_LIBCRYPTO" ]; then echo "OpenSSL binary not found. Building." @@ -156,6 +158,7 @@ mkdir -p "$OUTPUT_DIR" + emcc -lembind \ "${EMCC_FLAGS[@]}" \ "${CFLAGS[@]}" \ @@ -169,3 +172,5 @@ mv -f "${OUTPUT_DIR}${OUTPUT_FILE_NAME}.wasm" "${OUTPUT_DIR}comm_query_executor.wasm" rm -f "${OUTPUT_FILE}.bak" + +sha256sum ./database/_generated/comm_query_executor.wasm