From 9b0fa6924fd80a00c908e811f3094c48b3ae1c1f Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 9 Dec 2024 08:00:31 +0100 Subject: [PATCH 1/4] Fix CI Signed-off-by: Pablo Garrido --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c79cc3db..f55a1a28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,9 +46,15 @@ jobs: run: | (test -f install/micro_ros_setup/lib/micro_ros_setup/build_firmware.sh) && true || false + - name: Sanitize Artifact Name + id: sanitize-name + run: | + sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g') + echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV + - uses: actions/upload-artifact@v4.4.0 with: - name: micro_ros_build_${{ inputs.ci_target_ref }} + name: micro_ros_build_${{ env.sanitized_name }} path: install micro_ros_agent: From b6a6fef8f67b267020f0280d43c592ec449dfc6b Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 9 Dec 2024 08:10:06 +0100 Subject: [PATCH 2/4] Fix naming --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f55a1a28..8c00e0e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,10 +51,11 @@ jobs: run: | sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g') echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV + echo "::set-output name=sanitized_name::$sanitized_name" - uses: actions/upload-artifact@v4.4.0 with: - name: micro_ros_build_${{ env.sanitized_name }} + name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }} path: install micro_ros_agent: @@ -87,7 +88,7 @@ jobs: - uses: actions/download-artifact@v4.1.7 with: - name: micro_ros_build_${{ inputs.ci_target_ref }} + name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }} path: install # Workaround https://github.com/actions/upload-artifact/issues/38 @@ -236,7 +237,7 @@ jobs: - uses: actions/download-artifact@v4.1.7 with: - name: micro_ros_build_${{ inputs.ci_target_ref }} + name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }} path: install # Workaround https://github.com/actions/upload-artifact/issues/38 From 75768d58b335fbd3ade4a9e53c62516f1c4db022 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 9 Dec 2024 08:19:05 +0100 Subject: [PATCH 3/4] Ensure naming --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c00e0e9..68a54f60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,13 @@ jobs: rosdep update --rosdistro ${{ env.ROS_DISTRO }} rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y + - name: Sanitize Artifact Name + id: sanitize-name + run: | + sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g') + echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV + echo "::set-output name=sanitized_name::$sanitized_name" + - uses: actions/download-artifact@v4.1.7 with: name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }} @@ -235,6 +242,13 @@ jobs: rosdep update --rosdistro ${{ env.ROS_DISTRO }} rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y + - name: Sanitize Artifact Name + id: sanitize-name + run: | + sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g') + echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV + echo "::set-output name=sanitized_name::$sanitized_name" + - uses: actions/download-artifact@v4.1.7 with: name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }} From 174df2015c9ce438f8c71a3251162efd49673c3a Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 9 Dec 2024 08:58:22 +0100 Subject: [PATCH 4/4] New line fix --- config/generate_lib/generic/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/generate_lib/generic/build.sh b/config/generate_lib/generic/build.sh index 9619536e..891676b6 100755 --- a/config/generate_lib/generic/build.sh +++ b/config/generate_lib/generic/build.sh @@ -22,7 +22,7 @@ BUILD_DIR=$FW_TARGETDIR/build pushd $FW_TARGETDIR/mcu_ws >/dev/null rm -rf build install log - + colcon build \ --merge-install \ --packages-ignore-regex=.*_cpp \ @@ -48,8 +48,8 @@ pushd $FW_TARGETDIR/mcu_ws >/dev/null done ; \ ar rc libmicroros.a $(ls *.o *.obj 2> /dev/null); mkdir -p $BUILD_DIR; cp libmicroros.a $BUILD_DIR; ranlib $BUILD_DIR/libmicroros.a; \ cp -R $FW_TARGETDIR/mcu_ws/install/include $BUILD_DIR/; \ - rm $(find $BUILD_DIR/include -type f -not -name "*.h" -not -name "*.hpp") \ - rm -rf $(find $BUILD_DIR/include -type d -empty) \ + rm $(find $BUILD_DIR/include -type f -not -name "*.h" -not -name "*.hpp"); \ + rm -rf $(find $BUILD_DIR/include -type d -empty); \ cd ..; rm -rf libmicroros; popd >/dev/null