|
1 | | -name: Robotics Hub Tests |
2 | | -agent: |
3 | | - type: Unity::VM |
4 | | - image: robotics/ci-ubuntu20:v0.1.0pnp-796097 |
5 | | - flavor: i1.large |
6 | | -variables: |
7 | | - PATH: /root/.local/bin:/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin |
8 | | -commands: |
9 | | - - git submodule update --init --recursive |
10 | | - # We must remove the Demo.cs script because the System.CodeDom assembly is not in the bokken .NET sdk |
11 | | - - rm ./tutorials/pick_and_place/PickAndPlaceProject/Assets/DemoScripts/Demo.* |
12 | | - # Ensure audio is disabled. Unity built-in audio fails to initialize in our Bokken image. |
13 | | - - "sed -i -e '/m_DisableAudio/ s/: .*/: 1/' ./tutorials/pick_and_place/PickAndPlaceProject/ProjectSettings/AudioManager.asset" |
14 | | - - python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade |
15 | | - - unity-downloader-cli -u 2020.3.11f1 -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published |
16 | | - - git clone git@github.cds.internal.unity3d.com:unity/utr.git utr |
17 | | - # Explicitly run MessageGeneration tests first to generate dependencies |
18 | | - - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
19 | | - --artifacts_path=test-results --suite=editor --platform=Editor --editorTestsCategories |
20 | | - MessageGeneration |
21 | | - # Run each category of tests in its own process, in order of increasing complexity |
22 | | - - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
23 | | - --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor --editorTestCategories UnitTests |
| 1 | +pick_and_place: |
| 2 | + name: Robotics Hub Pick and Place Tests |
| 3 | + agent: |
| 4 | + type: Unity::VM |
| 5 | + image: robotics/ci-ubuntu20:v0.1.0pnp-796097 |
| 6 | + flavor: i1.large |
| 7 | + variables: |
| 8 | + PATH: /root/.local/bin:/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin |
| 9 | + commands: |
| 10 | + - sudo ln -s $(which python3) /usr/bin/python |
| 11 | + - git submodule update --init --recursive |
| 12 | + |
| 13 | + # We must remove the Demo.cs script because the System.CodeDom assembly is not in the bokken .NET sdk |
| 14 | + - rm ./tutorials/pick_and_place/PickAndPlaceProject/Assets/DemoScripts/Demo.* |
| 15 | + |
| 16 | + # Ensure audio is disabled. Unity built-in audio fails to initialize in our Bokken image. |
| 17 | + - "sed -i -e '/m_DisableAudio/ s/: .*/: 1/' ./tutorials/pick_and_place/PickAndPlaceProject/ProjectSettings/AudioManager.asset" |
| 18 | + - python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade |
| 19 | + - unity-downloader-cli -u 2020.3.11f1 -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published |
| 20 | + - git clone git@github.cds.internal.unity3d.com:unity/utr.git utr |
| 21 | + |
| 22 | + # Explicitly run MessageGeneration tests first to generate dependencies |
| 23 | + - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
| 24 | + --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" |
| 25 | + --category=MessageGeneration |
| 26 | + |
| 27 | + # Run each category of tests in its own process, in order of increasing complexity |
| 28 | + - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
| 29 | + --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor --category=UnitTests |
| 30 | + |
24 | 31 | # - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
25 | 32 | #--artifacts_path=test-results --suite=editor --platform=Editor --testfilter BuildTests.PlayerBuilder.BuildPlayerLinux |
26 | | - - python3 .yamato/PickAndPlaceTests/set-up-integration-tests.py |
27 | | - #TODO: Determine how best to capture ROS logging as test artifacts |
28 | | - - sudo ln -s $(which python3) /usr/bin/python && /bin/bash .yamato/PickAndPlaceTests/start-ros.bash |
29 | | - # NOTE: Simply specifying the testCategory is not enough to get a test marked with [Explicit] to run |
30 | | - - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
31 | | - --artifacts_path=test-results --suite=editor --platform=Editor --testfilter IntegrationTests.RosIntegrationTests |
32 | | - #TODO: Determine when it would be prudent to run BuildTests and add them here or in a new config |
33 | | -triggers: |
34 | | - cancel_old_ci: true |
35 | | - expression: | |
36 | | - (pull_request.target in ["main", "dev"] AND |
37 | | - NOT pull_request.changes.all match ["**/*.md","**/*.jpg","**/*.jpeg","**/*.gif","**/*.pdf"]) |
38 | | -artifacts: |
39 | | - logs: |
40 | | - paths: |
41 | | - - "test-results/**/*" |
| 33 | + |
| 34 | + - python3 .yamato/PickAndPlaceTests/set-up-integration-tests.py |
| 35 | + |
| 36 | + # Run Pick and Place Test |
| 37 | + # NOTE: Simply specifying the testCategory is not enough to get a test marked with [Explicit] to run |
| 38 | + # TODO: Determine how best to capture ROS logging as test artifacts |
| 39 | + # TODO: Determine when it would be prudent to run BuildTests and add them here or in a new config |
| 40 | + - | |
| 41 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash build_pick_and_place |
| 42 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash start_pick_and_place & |
| 43 | + export PID=$! |
| 44 | + utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" --testfilter IntegrationTests.PickAndPlaceIntegrationTests |
| 45 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash stop ros1 $PID |
| 46 | +
|
| 47 | + triggers: |
| 48 | + cancel_old_ci: true |
| 49 | + expression: | |
| 50 | + (pull_request.target in ["main", "dev"] AND |
| 51 | + NOT pull_request.changes.all match ["**/*.md","**/*.jpg","**/*.jpeg","**/*.gif","**/*.pdf"]) |
| 52 | + artifacts: |
| 53 | + logs: |
| 54 | + paths: |
| 55 | + - "test-results/**/*" |
| 56 | + |
| 57 | +{% assign rosDistros = "noetic galactic" | split: " " %} |
| 58 | + |
| 59 | +{% for rosDistro in rosDistros %} |
| 60 | +ros_{{rosDistro}}_integration: |
| 61 | + name: Robotics Hub ROS {{rosDistro}} Integration Tests |
| 62 | + agent: |
| 63 | + type: Unity::VM |
| 64 | + {% if rosDistro == "noetic" %} |
| 65 | + image: robotics/ci-ubuntu20:v0.1.0-795910 |
| 66 | + {% elsif rosDistro == "galactic" %} |
| 67 | + image: robotics/ci-ros2-galactic-ubuntu20:v0.0.2-916903 |
| 68 | + {% endif %} |
| 69 | + flavor: i1.large |
| 70 | + variables: |
| 71 | + PATH: /root/.local/bin:/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin |
| 72 | + commands: |
| 73 | + # TODO: move to image builders |
| 74 | + - sudo ln -s $(which python3) /usr/bin/python |
| 75 | + # TODO: move to galactic image builder |
| 76 | + - sudo apt update && sudo apt install -y build-essential |
| 77 | + |
| 78 | + - git submodule update --init --recursive |
| 79 | + |
| 80 | + # We must remove the Demo.cs script because the System.CodeDom assembly is not in the bokken .NET sdk |
| 81 | + - rm ./tutorials/pick_and_place/PickAndPlaceProject/Assets/DemoScripts/Demo.* |
| 82 | + |
| 83 | + # Ensure audio is disabled. Unity built-in audio fails to initialize in our Bokken image. |
| 84 | + - "sed -i -e '/m_DisableAudio/ s/: .*/: 1/' ./tutorials/pick_and_place/PickAndPlaceProject/ProjectSettings/AudioManager.asset" |
| 85 | + - python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade |
| 86 | + - unity-downloader-cli -u 2020.3.11f1 -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published |
| 87 | + - git clone git@github.cds.internal.unity3d.com:unity/utr.git utr |
| 88 | + |
| 89 | + # Explicitly run MessageGeneration tests first to generate dependencies |
| 90 | + - utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 |
| 91 | + --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" |
| 92 | + --category=MessageGeneration |
| 93 | + |
| 94 | + - python3 .yamato/PickAndPlaceTests/set-up-integration-tests.py |
| 95 | + |
| 96 | + # Run ROS Integration Tests |
| 97 | + # This step requires to execute set-up-integration-tests.py |
| 98 | + # TODO: move ROS_DISTRO exporting to image builder |
| 99 | + - | |
| 100 | + export ROS_DISTRO=$(ls -1 /opt/ros | head -n1) |
| 101 | + if [ $ROS_DISTRO == "noetic" ]; then |
| 102 | + ROS=ros1 |
| 103 | + elif [ $ROS_DISTRO == "galactic" ]; then |
| 104 | + ROS=ros2 |
| 105 | + fi |
| 106 | +
|
| 107 | + python3 .yamato/PickAndPlaceTests/set-up-ros-define.py $ROS |
| 108 | +
|
| 109 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash build_ros $ROS |
| 110 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash start_ros $ROS & |
| 111 | + export PID=$! |
| 112 | + sleep 10 # Wait for ROS endpoint to stand up |
| 113 | +
|
| 114 | + utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" --testfilter IntegrationTests.RosIntegrationTests.RosIntegration_Publisher_Success |
| 115 | + |
| 116 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash run_ros_position_service $ROS & |
| 117 | + export POSITION_SERVICE_PID=$! |
| 118 | + utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" --testfilter IntegrationTests.RosIntegrationTests.RosIntegration_ServiceClient_Success |
| 119 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash stop $ROS $POSITION_SERVICE_PID |
| 120 | +
|
| 121 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash run_ros_color_publisher $ROS & |
| 122 | + export COLOR_PUBLISHER_PID=$! |
| 123 | + utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" --testfilter IntegrationTests.RosIntegrationTests.RosIntegration_Subscriber_Success |
| 124 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash stop $ROS $COLOR_PUBLISHER_PID |
| 125 | +
|
| 126 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash run_ros_pose_service_client $ROS & |
| 127 | + export POSE_SERVICE_PID=$! |
| 128 | + utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=editor --platform=Editor --extra-editor-arg="-nographics" --testfilter IntegrationTests.RosIntegrationTests.RosIntegration_ServiceServer_Success |
| 129 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash stop $ROS $POSE_SERVICE_PID |
| 130 | + |
| 131 | + /bin/bash .yamato/PickAndPlaceTests/ros.bash stop $ROS $PID |
| 132 | +
|
| 133 | + triggers: |
| 134 | + cancel_old_ci: true |
| 135 | + expression: | |
| 136 | + (pull_request.target in ["main", "dev"] AND |
| 137 | + NOT pull_request.changes.all match ["**/*.md","**/*.jpg","**/*.jpeg","**/*.gif","**/*.pdf"]) |
| 138 | + OR (push.branch in ["main", "dev"]) |
| 139 | + artifacts: |
| 140 | + logs: |
| 141 | + paths: |
| 142 | + - "test-results/**/*" |
| 143 | +{% endfor %} |
| 144 | + |
0 commit comments