Skip to content

Commit

Permalink
Fix CI (#755)
Browse files Browse the repository at this point in the history
* Fix CI

Signed-off-by: Pablo Garrido <[email protected]>

* Fix naming

* Ensure naming

* New line fix

---------

Signed-off-by: Pablo Garrido <[email protected]>
  • Loading branch information
pablogs9 authored Dec 9, 2024
1 parent 096ded0 commit 91a554f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ 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
echo "::set-output name=sanitized_name::$sanitized_name"
- uses: actions/[email protected]
with:
name: micro_ros_build_${{ inputs.ci_target_ref }}
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
path: install

micro_ros_agent:
Expand Down Expand Up @@ -79,9 +86,16 @@ 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/[email protected]
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
Expand Down Expand Up @@ -228,9 +242,16 @@ 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/[email protected]
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
Expand Down
6 changes: 3 additions & 3 deletions config/generate_lib/generic/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit 91a554f

Please sign in to comment.