Skip to content

Commit 58c92a9

Browse files
update
Seeing if I can download the binary to a known location and then set environment variables to point to that. Adding some additional log information.
1 parent 63569bc commit 58c92a9

1 file changed

Lines changed: 30 additions & 11 deletions

File tree

Tools/CI/run_cmb_service.sh

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,36 @@ echo "Starting with echo server on port: $echo_port and the cmb service on port:
6060

6161
# Setup -------------------------------------------------------------------------
6262

63+
# Protocol Buffer Compiler ------------------------------------------------------
64+
65+
# Install Protocol Buffer Compiler (1st attempt)
66+
# apt-get install -y protobuf-compiler
67+
68+
# Download the protocol buffer release for linux
69+
echo "Downloading protocol bufffer compiler..."
70+
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
71+
curl -LO $PB_REL/download/v31.1/protoc-31.1-linux-x86_64.zip
72+
73+
# Create target folder to unzip protoc binaries.
74+
echo "Creating protocol bufffer folder..."
75+
mkdir -p protoc
76+
protoc_path="./protoc"
77+
folder_path=$(realpath "$protoc_path")
78+
79+
echo "Folder path of protoc: $folder_path"
80+
echo "Unzipping to $folder_path"
81+
82+
# extract binaries to protoc folder
83+
unzip protoc-31.1-linux-x86_64.zip -d ./protoc
84+
85+
# Add the Protocol Buffer Compiler install PROTOC
86+
export PROTOC="$folder_path"
87+
echo "Set PROTOC = $folder_path"
88+
89+
# Add the Protocol Buffer Compiler install location to the path
90+
export PATH="$folder_path:$PATH"
91+
echo "Set PATH = $PATH"
92+
6393
# clone the cmb service repo
6494
git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git
6595
# navigate to the cmb service directory
@@ -68,27 +98,16 @@ cd ./mps-common-multiplayer-backend/runtime
6898
# Install rust
6999
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
70100

71-
# Install Protocol Buffer Compiler
72-
apt-get install -y protobuf-compiler
73-
74-
# Add the Protocol Buffer Compiler install PROTOC
75-
export PROTOC="$HOME/.local/bin/protoc"
76-
77-
# Add the Protocol Buffer Compiler install location to the path
78-
export PATH="$HOME/.local/bin:$PATH"
79-
80101
# Add the cargo bin directory to the PATH
81102
export PATH="$HOME/.cargo/bin:$PATH"
82103

83-
84104
# Echo server -------------------------------------------------------------------
85105

86106
# Build the echo server
87107
cargo build --example ngo_echo_server
88108
# Run the echo server in the background
89109
cargo run --example ngo_echo_server -- --port $echo_port &
90110

91-
92111
# CMB Service -------------------------------------------------------------------
93112

94113
# Build a release version of the standalone cmb service

0 commit comments

Comments
 (0)