|
| 1 | +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. |
| 2 | +--- |
| 3 | + |
| 4 | +# DESCRIPTION-------------------------------------------------------------------------- |
| 5 | + # This job is responsible test validation against the CMB Service. |
| 6 | + # This job runs on the default test_platform which is Ubuntu. |
| 7 | + # This job runs the standalone desktop tests and ignores all tests that are not related to the CMB Service. |
| 8 | + # Those tests cover both PlayMode and EditMode tests from package test assemblies. |
| 9 | + # This is only needed in NGOv2.X since NGOv1.X does not use the CMB Service. |
| 10 | + |
| 11 | +# CONFIGURATION STRUCTURE-------------------------------------------------------------- |
| 12 | + # Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency: |
| 13 | + # 1. For all desktop platform (Windows, macOS, Ubuntu) |
| 14 | + # 2. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors) |
| 15 | + # 3. For the default project. |
| 16 | + # 4. For all scripting backends (mono, il2cpp) |
| 17 | + |
| 18 | +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- |
| 19 | + # For desktop devices a split is into two phases is not required but we use it for consistency with setup of others standalone platforms: |
| 20 | + # 1. Build Phase: Creates standalone players for desktop platforms |
| 21 | + # 2. Run Phase: Executes runtime tests on actual desktop devices |
| 22 | + # The Run phase uses build job as dependency |
| 23 | + |
| 24 | + # Note: The build phase for this test is imported from the desktop standalone tests as the CMB Service test is a subset of the desktop standalone tests. |
| 25 | + |
| 26 | +#----------------------------------------------------------------------------------- |
| 27 | + |
| 28 | + |
| 29 | +# CMB SERVICE RUN PHASE CONFIGURATION------------------------------------------------------------------------------------ |
| 30 | +{% for project in projects.default -%} |
| 31 | +{% for platform in test_platforms.default -%} |
| 32 | +{% for editor in validation_editors.all -%} |
| 33 | +{% for backend in scripting_backends -%} |
| 34 | +cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}: |
| 35 | + name : CMB Service Test - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}] |
| 36 | + agent: |
| 37 | + type: {{ platform.type }}::GPU |
| 38 | + image: {{ platform.image }} |
| 39 | + flavor: {{ platform.flavor }} |
| 40 | + |
| 41 | + variables: |
| 42 | + # The echo server is a "mock" server that is only used to test encoding/decoding of messages. |
| 43 | + # It is used by the DistributedAuthorityCodecTests. These are tests that are built and maintained by the CMB service team. |
| 44 | + ECHO_SERVER_PORT: "7788" |
| 45 | + # Set this to ensure the DistributedAuthorityCodecTests will fail if they cannot connect to the echo server. |
| 46 | + # The default is to ignore the codec tests if the echo server fails to connect |
| 47 | + ENSURE_CODEC_TESTS: "true" |
| 48 | + |
| 49 | + # When USE_CMB_SERVICE is set to true, any C# tests configured to use the DA host will instead use the CMB service. |
| 50 | + USE_CMB_SERVICE: "true" |
| 51 | + # This is the port on which to run the full standalone CMB service. |
| 52 | + # The port needs to be different from the echo server port as two processes cannot bind to same port. |
| 53 | + CMB_SERVICE_PORT: "7799" |
| 54 | + |
| 55 | + commands: |
| 56 | + # run_cmb_service.sh builds and starts a release version of the full CMB service (along with the limited echo server) |
| 57 | + - ./Tools/CI/run_cmb_service.sh -e $ECHO_SERVER_PORT -s $CMB_SERVICE_PORT |
| 58 | + |
| 59 | + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models |
| 60 | + - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 |
| 61 | + artifacts: |
| 62 | + logs: |
| 63 | + paths: |
| 64 | + - "test-results/**/*" |
| 65 | + dependencies: |
| 66 | + - .yamato/desktop-standalone-tests.yml#desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }} |
| 67 | +{% endfor -%} |
| 68 | +{% endfor -%} |
| 69 | +{% endfor -%} |
| 70 | +{% endfor -%} |
0 commit comments