Skip to content

Added rustdoc check step to CI #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 26, 2022
Merged

Conversation

mohitsaxenaknoldus
Copy link
Contributor

Closes #113

@nnmm
Copy link
Contributor

nnmm commented Apr 21, 2022

I think this won't work yet – you need to execute this in each package's directory, not the top-level directory.

@mohitsaxenaknoldus
Copy link
Contributor Author

I think this won't work yet – you need to execute this in each package's directory, not the top-level directory.

Oh! My bad...check now?

@nnmm
Copy link
Contributor

nnmm commented Apr 21, 2022

Could you do it the same way as the clippy step? That should work.

@mohitsaxenaknoldus
Copy link
Contributor Author

Could you do it the same way as the clippy step? That should work.

Done.

@nnmm
Copy link
Contributor

nnmm commented Apr 22, 2022

You removed the filter for ament_cargo packages, so now it tries to run rustdoc on Python and CMake packages too.

@mohitsaxenaknoldus
Copy link
Contributor Author

You removed the filter for ament_cargo packages, so now it tries to run rustdoc on Python and CMake packages too.

Oh! I thought we wanted this for every package, my bad! Fixed.

@nnmm
Copy link
Contributor

nnmm commented Apr 22, 2022

Now we're getting somewhere – though now it can't find the dependencies, because the .cargo folder is somewhere else.

If you add back the cd ${{ steps.build.outputs.ros-workspace-directory-name }} from the clippy step, it should probably work. That's where the colcon build command ran, so it contains the .cargo folder.

@mohitsaxenaknoldus
Copy link
Contributor Author

Now we're getting somewhere – though now it can't find the dependencies, because the .cargo folder is somewhere else.

If you add back the cd ${{ steps.build.outputs.ros-workspace-directory-name }} from the clippy step, it should probably work. That's where the colcon build command ran, so it contains the .cargo folder.

Added

@nnmm
Copy link
Contributor

nnmm commented Apr 26, 2022

Looks like we also need the last command from clippy, sourcing the ROS 2 installation. I wasn't sure about that.

@mohitsaxenaknoldus
Copy link
Contributor Author

Looks like we also need the last command from clippy, sourcing the ROS 2 installation. I wasn't sure about that.

This one?
. /opt/ros/${{ matrix.ros_distro }}/setup.sh

@nnmm
Copy link
Contributor

nnmm commented Apr 26, 2022

Yep

@mohitsaxenaknoldus
Copy link
Contributor Author

Yep

Added

@nnmm
Copy link
Contributor

nnmm commented Apr 26, 2022

Looks like rclrs_examples is failing the rustdoc step, because it contains multiple binaries.

I'd suggest to just filter out rclrs_examples for now.

@mohitsaxenaknoldus
Copy link
Contributor Author

Looks like rclrs_examples is failing the rustdoc step, because it contains multiple binaries.

I'd suggest to just filter out rclrs_examples for now.

Done.

@nnmm
Copy link
Contributor

nnmm commented Apr 26, 2022

I can't see where you filtered it out?

@mohitsaxenaknoldus
Copy link
Contributor Author

I can't see where you filtered it out?

for path in $(colcon list | awk '$3 == "(ament_cargo)" { print $2 }' | sed -n 'p;n'); do

@nnmm
Copy link
Contributor

nnmm commented Apr 26, 2022

Ah, thanks. That works, but it's not obvious what it's intended to do. Could you do this instead?
awk '$3 == "(ament_cargo)" && $1 != "rclrs_examples" { print $2 }'

@mohitsaxenaknoldus
Copy link
Contributor Author

Ah, thanks. That works, but it's not obvious what it's intended to do. Could you do this instead? awk '$3 == "(ament_cargo)" && $1 != "rclrs_examples" { print $2 }'

Done

@nnmm nnmm merged commit 29d4177 into ros2-rust:master Apr 26, 2022
@nnmm
Copy link
Contributor

nnmm commented Apr 26, 2022

Thanks!

@mohitsaxenaknoldus mohitsaxenaknoldus deleted the issue113 branch April 26, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rustdoc check step to CI
2 participants