Skip to content

Commit 91a554f

Browse files
authored
Fix CI (#755)
* Fix CI Signed-off-by: Pablo Garrido <pablogs9@gmail.com> * Fix naming * Ensure naming * New line fix --------- Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
1 parent 096ded0 commit 91a554f

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ jobs:
4646
run: |
4747
(test -f install/micro_ros_setup/lib/micro_ros_setup/build_firmware.sh) && true || false
4848
49+
- name: Sanitize Artifact Name
50+
id: sanitize-name
51+
run: |
52+
sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g')
53+
echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV
54+
echo "::set-output name=sanitized_name::$sanitized_name"
55+
4956
- uses: actions/upload-artifact@v4.4.0
5057
with:
51-
name: micro_ros_build_${{ inputs.ci_target_ref }}
58+
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
5259
path: install
5360

5461
micro_ros_agent:
@@ -79,9 +86,16 @@ jobs:
7986
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
8087
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y
8188
89+
- name: Sanitize Artifact Name
90+
id: sanitize-name
91+
run: |
92+
sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g')
93+
echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV
94+
echo "::set-output name=sanitized_name::$sanitized_name"
95+
8296
- uses: actions/download-artifact@v4.1.7
8397
with:
84-
name: micro_ros_build_${{ inputs.ci_target_ref }}
98+
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
8599
path: install
86100

87101
# Workaround https://github.com/actions/upload-artifact/issues/38
@@ -228,9 +242,16 @@ jobs:
228242
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
229243
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y
230244
245+
- name: Sanitize Artifact Name
246+
id: sanitize-name
247+
run: |
248+
sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g')
249+
echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV
250+
echo "::set-output name=sanitized_name::$sanitized_name"
251+
231252
- uses: actions/download-artifact@v4.1.7
232253
with:
233-
name: micro_ros_build_${{ inputs.ci_target_ref }}
254+
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
234255
path: install
235256

236257
# Workaround https://github.com/actions/upload-artifact/issues/38

config/generate_lib/generic/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ BUILD_DIR=$FW_TARGETDIR/build
2222
pushd $FW_TARGETDIR/mcu_ws >/dev/null
2323

2424
rm -rf build install log
25-
25+
2626
colcon build \
2727
--merge-install \
2828
--packages-ignore-regex=.*_cpp \
@@ -48,8 +48,8 @@ pushd $FW_TARGETDIR/mcu_ws >/dev/null
4848
done ; \
4949
ar rc libmicroros.a $(ls *.o *.obj 2> /dev/null); mkdir -p $BUILD_DIR; cp libmicroros.a $BUILD_DIR; ranlib $BUILD_DIR/libmicroros.a; \
5050
cp -R $FW_TARGETDIR/mcu_ws/install/include $BUILD_DIR/; \
51-
rm $(find $BUILD_DIR/include -type f -not -name "*.h" -not -name "*.hpp") \
52-
rm -rf $(find $BUILD_DIR/include -type d -empty) \
51+
rm $(find $BUILD_DIR/include -type f -not -name "*.h" -not -name "*.hpp"); \
52+
rm -rf $(find $BUILD_DIR/include -type d -empty); \
5353
cd ..; rm -rf libmicroros;
5454

5555
popd >/dev/null

0 commit comments

Comments
 (0)