Skip to content

Conversation

m1ntySkye
Copy link
Contributor

graphviz is very nice with doxygen. try it out with these doxy config options:

HAVE_DOT               = YES
CALL_GRAPH             = YES
CALLER_GRAPH           = YES
DOT_GRAPH_MAX_NODES    = 1000 # set this to be some high value that doesn't take too long
UML_LOOK               = YES

really like dot to help deal with big spaghetti
@DenverCoder1
Copy link
Owner

I haven't used graphviz with Doxygen, but do you think it's necessary that it be installed by default?

Another option could be to just add a step that installs it before running the Doxygen action (see #14).

@DenverCoder1
Copy link
Owner

If it's common enough to use it and it doesn't slow down the action noticably, I suppose it would be fine. Let me know what you think about this vs the other proposed solution.

@m1ntySkye
Copy link
Contributor Author

I've found graphviz very useful, especially for someone who wants to just experiment with doxygen & wants to just see what it can do for a project with minimal setup (ie hasn't fully converted their comments to work with doxygen)

I had a look just now at two actions runs I had on my personal repo, one before and after making the action install graphviz by default. The timestamps seem to show apt-get taking 24s without graphviz & 16s with it. This makes me think that the added delay is minimal enough that it's not going to be differentiable from random processing delays in github action containers (unless I'm reading it wrong somehow)

an alternative but more complicated option would be to optionally install it based on if the user-provided doxyfile contains HAVE_DOT=YES
ie grep -i "HAVE_DOT\s*=\s*YES" ${{ inputs.config_file }} (new to github actions, don't know the best way to do the rest of it)

@m1ntySkye
Copy link
Contributor Author

just realised that grep wouldn't even work for my own repo, were I'm setting HAVE_DOT in an @includeed doxygen config file.

tldr; penalty of always installing seems pretty tiny

@DenverCoder1 DenverCoder1 linked an issue Oct 25, 2022 that may be closed by this pull request
@DenverCoder1 DenverCoder1 added the enhancement New feature or request label Oct 25, 2022
@DenverCoder1
Copy link
Owner

Other options we have could be to either:

  • Have a boolean input option as to whether or not to install it (eg. graphviz: true)
  • Have an input option with a list of additional dependencies to install (eg: additional_deps: "graphviz")
  • Document how to install graphviz using a run step before the Doxygen GitHub action (eg. idea: graphviz support #14 (comment))
  • Search Doxyfile and included files for HAVE_DOT? (probably not so simple and may be slow)
  • Always install graphviz which seems to not slow it down significantly (current option)

Of these options which do you think is best?

I think the current option is fine, so if you think it's the best option, let me know, and I'll merge it as it is.

@DenverCoder1 DenverCoder1 changed the title add graphviz feat: Add step to install graphviz by default Oct 30, 2022
@DenverCoder1 DenverCoder1 merged commit 1adeea5 into DenverCoder1:main Oct 30, 2022
@DenverCoder1
Copy link
Owner

Thanks for the contribution! 🎉

@m1ntySkye m1ntySkye deleted the add-graphviz branch October 31, 2022 01:42
@m1ntySkye
Copy link
Contributor Author

Thanks for the approval! (sorry for not replying to previous message, got kinda busy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

idea: graphviz support
2 participants