This is an automated email from the ASF dual-hosted git repository.

junchao pushed a commit to branch install
in repository https://gitbox.apache.org/repos/asf/incubator-resilientdb.git


The following commit(s) were added to refs/heads/install by this push:
     new 7669fd66 update install
7669fd66 is described below

commit 7669fd663c7f14c3da16d82998bcc7a4bfabcc26
Author: Ubuntu <[email protected]>
AuthorDate: Sun Jun 23 06:43:49 2024 +0000

    update install
---
 .bazelrc                       |  2 +-
 INSTALL.sh                     | 39 ++++++++++++++++++++++++++++++++-------
 INSTALL/bazel/install_bazel.sh |  2 ++
 3 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/.bazelrc b/.bazelrc
index 99c69f64..0566a7c9 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,4 +1,4 @@
 build --cxxopt='-std=c++17' --copt=-O3 --jobs=40 
-build --action_env=PYTHON_BIN_PATH="/usr/bin/python3.10"
+#build --action_env=PYTHON_BIN_PATH="/usr/bin/python3.10"
 #build --action_env=PYTHON_LIB_PATH="/usr/include/python3.10"
 
diff --git a/INSTALL.sh b/INSTALL.sh
index 0f6c13fc..c4fdcff3 100755
--- a/INSTALL.sh
+++ b/INSTALL.sh
@@ -17,20 +17,45 @@
 # under the License.
 #
 
-#apt update
-#apt install apt-transport-https curl gnupg -y
-apt-get install protobuf-compiler -y
-apt-get install rapidjson-dev -y
+sudo apt update
+sudo apt install apt-transport-https curl gnupg -y
+sudo apt-get install protobuf-compiler -y
+sudo apt-get install rapidjson-dev -y
+
+curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > 
bazel.gpg
+sudo mv bazel.gpg /etc/apt/trusted.gpg.d/ 
+echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" 
| sudo tee /etc/apt/sources.list.d/bazel.list
+curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
+sudo apt update && sudo apt install bazel=6.0.0 -y
+sudo apt install clang-format -y
+rm $PWD/.git/hooks/pre-push
+ln -s $PWD/hooks/pre-push $PWD/.git/hooks/pre-push
 
 bazel --version
 ret=$?
 
 if [[ $ret != "0" ]]; then
-echo "please ensure Bazel 6.0has been installed"
+
+sudo apt-get install build-essential openjdk-11-jdk zip unzip -y
+rm bazel-6.0.0-dist.zip
+rm -rf bazel_build
+wget wget https://releases.bazel.build/6.0.0/release/bazel-6.0.0-dist.zip
+mkdir -p bazel_build
+mv bazel-6.0.0-dist.zip bazel_build/
+cd bazel_build
+
+unzip bazel-6.0.0-dist.zip
+
+export JAVA_HOME='/usr/lib/jvm/java-1.11.0-openjdk-arm64/'
+env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
+sudo cp output/bazel /usr/local/bin/
+cd ..
+rm -rf bazel_build
+
 fi
 
 # install buildifier
 bazel build @com_github_bazelbuild_buildtools//buildifier:buildifier
 
-apt-get install python3.10-dev -y
-apt-get install python3-dev -y
+sudo apt-get install python3.10-dev -y
+sudo apt-get install python3-dev -y
diff --git a/INSTALL/bazel/install_bazel.sh b/INSTALL/bazel/install_bazel.sh
index f93ec5a6..f1c8352e 100755
--- a/INSTALL/bazel/install_bazel.sh
+++ b/INSTALL/bazel/install_bazel.sh
@@ -4,3 +4,5 @@ mkdir -p bin
 mv bazelisk-linux-amd64 bin/bazel
 
 bin/bazel --version
+echo "export PATH="$PATH:$PWD/bin"" >> ~/.bashrc
+. ~/.bashrc

Reply via email to