@@ -97,38 +97,41 @@ jobs:
9797 - name : Build upstream workspace (no test)
9898 if : ${{ inputs.upstream_workspace != '' }}
9999 shell : bash
100+ working-directory : ${{ env.upstream_ws }}
100101 run : |
101102 source /opt/ros/${{ inputs.ros_distro }}/setup.bash
102103 source /opt/ros2_ws/install/local_setup.bash
103- colcon build --base-paths ${{ env.upstream_ws }}/src --build-base ${{ env.upstream_ws }}/build --install-base ${{ env.upstream_ws }}/install --log-base ${{ env.upstream_ws }}/log -- packages-skip ${{ inputs.skip_packages }}
104+ colcon build --packages-skip ${{ inputs.skip_packages }}
104105 - name : Build target workspace
105106 shell : bash
107+ working-directory : ${{ env.target_ws }}
106108 # source also underlay workspace with generate_parameter_library on rhel9
107109 run : |
108110 source /opt/ros/${{ inputs.ros_distro }}/setup.bash
109111 source /opt/ros2_ws/install/local_setup.bash
110112 if [[ -n "${{ inputs.upstream_workspace }}" ]]; then
111- source ${{ env.upstream_ws }}/install/setup.bash
113+ source ${{ github.workspace }}/${{ env.upstream_ws }}/install/setup.bash
112114 fi
113- TARGET_PACKAGES=$(colcon list --names-only --base-paths ${{ env.target_ws }}/src | tr '\n' ' ')
115+ TARGET_PACKAGES=$(colcon list --names-only | tr '\n' ' ')
114116 if [[ -z "$TARGET_PACKAGES" ]]; then
115117 echo "No packages found in target workspace at ${{ env.target_ws }}/src"
116118 exit 1
117119 fi
118- colcon build --base-paths ${{ env.target_ws }}/src --build-base ${{ env.target_ws }}/build --install-base ${{ env.target_ws }}/install --log-base ${{ env.target_ws }}/log -- packages-up-to $TARGET_PACKAGES --packages-skip ${{ inputs.skip_packages }} --cmake-args ${{ inputs.target_cmake_args }}
120+ colcon build --packages-up-to $TARGET_PACKAGES --packages-skip ${{ inputs.skip_packages }} --cmake-args ${{ inputs.target_cmake_args }}
119121 - name : Test target workspace
120122 shell : bash
123+ working-directory : ${{ env.target_ws }}
121124 run : |
122125 source /opt/ros/${{ inputs.ros_distro }}/setup.bash
123126 source /opt/ros2_ws/install/local_setup.bash
124127 if [[ -n "${{ inputs.upstream_workspace }}" ]]; then
125- source ${{ env.upstream_ws }}/install/setup.bash
128+ source ${{ github.workspace }}/${{ env.upstream_ws }}/install/setup.bash
126129 fi
127- source ${{ env.target_ws }}/ install/setup.bash
128- TARGET_PACKAGES=$(colcon list --names-only --base-paths ${{ env.target_ws }}/src | tr '\n' ' ')
130+ source install/setup.bash
131+ TARGET_PACKAGES=$(colcon list --names-only | tr '\n' ' ')
129132 if [[ -z "$TARGET_PACKAGES" ]]; then
130133 echo "No packages found in target workspace at ${{ env.target_ws }}/src"
131134 exit 1
132135 fi
133- colcon test --base-paths ${{ env.target_ws }}/src --build-base ${{ env.target_ws }}/build --install-base ${{ env.target_ws }}/install --log-base ${{ env.target_ws }}/log -- executor sequential --packages-select $TARGET_PACKAGES --packages-skip ${{ inputs.skip_packages }} ${{ inputs.skip_packages_test }}
134- colcon test-result --verbose --test-result-base ${{ env.target_ws }}/build
136+ colcon test --executor sequential --packages-select $TARGET_PACKAGES --packages-skip ${{ inputs.skip_packages }} ${{ inputs.skip_packages_test }}
137+ colcon test-result --verbose
0 commit comments