Skip to content

Commit 013a3aa

Browse files
Merge branch 'develop-2.0.0' into fix/localhost-resolution
2 parents 71dd484 + 8292b0f commit 013a3aa

File tree

2 files changed

+68
-3
lines changed

2 files changed

+68
-3
lines changed

Tools/CI/run_cmb_service.sh

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,98 @@ echo "Starting with echo server on port: $echo_port and the cmb service on port:
6060

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

63+
64+
ThrewError=false
65+
66+
# Mimics "Try-Catch" where you have to check if an error occurred after invoking
67+
try() {
68+
ThrewError=false
69+
"$@" || throw "$@"
70+
}
71+
72+
# Invoked by try
73+
throw() {
74+
logError "An error occurred executing this command:$@"
75+
ThrewError=true
76+
}
77+
78+
# A way to log messages that are easy to distinguish from the rest of the logs
79+
logMessage(){
80+
printf "\n############################################\n"
81+
printf "$@\n"
82+
printf "############################################\n"
83+
}
84+
85+
# A way to log error messages that are easy to distinguish from the rest of the logs
86+
logError(){
87+
printf "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
88+
printf "$@\n"
89+
printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
90+
}
91+
92+
# Protocol Buffer Compiler ------------------------------------------------------
93+
94+
# Apply any updates
95+
logMessage "Updating modules..."
96+
sudo apt-get update
97+
98+
# Install Protocol Buffer Compiler (using apt-get)
99+
logMessage "Installing protocol bufffer compiler as SUDO..."
100+
try sudo apt-get install -y protobuf-compiler
101+
102+
# If the previous command failed, try without sudo
103+
if $ThrewError; then
104+
logMessage "Installing protocol bufffer compiler as shell assigned account..."
105+
apt-get install -y protobuf-compiler
106+
else
107+
logMessage "Protocol bufffer compiler was installed as sudo!"
108+
fi
109+
110+
# Add the PROTOC environment variable that points to the Protocol Buffer Compiler binary
111+
export PROTOC="/usr/bin/protoc"
112+
113+
# Validate the PROTOC env var by getting the protoc version
114+
try $PROTOC --version
115+
116+
if $ThrewError; then
117+
logError "Failed to properly run protoc!"
118+
exit -1
119+
else
120+
logMessage "Protocol Buffer Compiler Installed & ENV variables verified!\n PROTOC path is: $PROTOC"
121+
fi
122+
63123
# clone the cmb service repo
64124
git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git
125+
65126
# navigate to the cmb service directory
66127
cd ./mps-common-multiplayer-backend/runtime
67128

68129
# Install rust
69130
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
131+
70132
# Add the cargo bin directory to the PATH
71133
export PATH="$HOME/.cargo/bin:$PATH"
72134

73-
74135
# Echo server -------------------------------------------------------------------
75136

76137
# Build the echo server
138+
logMessage "Beginning echo server build..."
77139
cargo build --example ngo_echo_server
140+
78141
# Run the echo server in the background
142+
logMessage "Running echo server tests..."
79143
cargo run --example ngo_echo_server -- --port $echo_port &
80144

81-
82145
# CMB Service -------------------------------------------------------------------
83146

84147
# Build a release version of the standalone cmb service
148+
logMessage "Beginning service release build..."
85149
cargo build --release --locked
86150

87151
# Run the standalone service on an infinite loop in the background.
88152
# The infinite loop is required as the service will exit each time all connected clients disconnect.
89153
# This means the service will exit after each test. The infinite loop will immediately restart the service each time it exits.
154+
logMessage "Running service integration tests..."
90155
while :; do
91156
./target/release/comb-server -l error --metrics-port 5000 standalone --port $service_port -t 60m;
92157
done & # <- use & to run the entire loop in the background

com.unity.netcode.gameobjects/Runtime/Components/NetworkRigidBodyBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public Vector3 GetAngularVelocity()
416416
}
417417
#endif
418418
#if COM_UNITY_MODULES_PHYSICS && !COM_UNITY_MODULES_PHYSICS2D
419-
return m_InternalRigidbody.angularVelocity;
419+
return m_InternalRigidbody.angularVelocity;
420420
#endif
421421
#if !COM_UNITY_MODULES_PHYSICS && COM_UNITY_MODULES_PHYSICS2D
422422
return Vector3.forward * m_InternalRigidbody2D.angularVelocity;

0 commit comments

Comments
 (0)