Skip to content

Commit b8a8ddb

Browse files
authored
chore: Point CMB resources at new monorepo (#4106)
* chore: Point CMB resources at new monorepo
1 parent b998fc0 commit b8a8ddb

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

Tools/CI/service.cmb/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Testing against the CMB Service
22

3-
The CMB Service is a tool that is external to our repository. The tool is inside the `runtime` folder in the [mps-common-multiplayer-backend](https://github.com/Unity-Technologies/mps-common-multiplayer-backend) repository.
3+
The CMB Service is a tool that is external to our repository. The tool is inside the `runtime` folder of the [CMB service](https://github.com/Unity-Technologies/unity-player-services/tree/main/services/common-multiplayer-backend) in the Unity Player Services monorepo.
44

55
Due to this, there is some more setup needed when running tests against the CMB Service.
66

@@ -56,3 +56,7 @@ The following environment variables allow for further configuration of the setup
5656
`CMB_SERVICE_PORT` defines the port where the tests will try to connect to the service (defaults to `7789`).
5757

5858
`NGO_HOST` defines the http address where the tests will try to connect to the service (defaults to `127.0.0.1`).
59+
60+
## Running on CI (Yamato)
61+
62+
The CMB tests can also be run from Yamato. The jobs are defined in [`.yamato/cmb-service-standalone-tests.yml`](../../../.yamato/cmb-service-standalone-tests.yml) and appear in Yamato as `CMB Service Test - NGO <project> - [<platform>, <editor>, <backend>]`. The job can be triggered manually from any branch meaning it can be easier to run the CMB tests from Yamato rather than set them up locally. The test uses [`run_cmb_service.sh`](./run_cmb_service.sh) to setup and run the CMB service.

Tools/CI/service.cmb/run_cmb_service.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Example usage:
1818
# ./<path-to-script>/run_cmb_service.sh -e 7788 -s 7799
1919

20-
# This script is currently used in the desktop-standalone-tests yamato job.
20+
# This script is currently used in the cmb-service-standalone-tests yamato job (found at ../../../.yamato/cmb-service-standalone-tests.yml).
2121

2222
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
2323
# This is a bash script and so needs to be run on a Unix based system.
@@ -136,11 +136,14 @@ else
136136
logMessage "Protocol Buffer Compiler Installed & ENV variables verified!\n PROTOC path is: $PROTOC"
137137
fi
138138

139-
# clone the cmb service repo
140-
git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git
139+
# Sparse-checkout only the CMB service directory from the unity-player-services monorepo.
140+
# --filter=blob:none + --depth 1 avoids downloading file contents and history for the rest of the monorepo.
141+
git clone --depth 1 --filter=blob:none --sparse https://github.com/Unity-Technologies/unity-player-services.git
142+
cd ./unity-player-services
143+
git sparse-checkout set services/common-multiplayer-backend/runtime
141144

142145
# navigate to the cmb service directory
143-
cd ./mps-common-multiplayer-backend/runtime
146+
cd ./services/common-multiplayer-backend/runtime
144147

145148
# Install rust
146149
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

0 commit comments

Comments
 (0)