Skip to content
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

Reusing build logic in MOTIS, including for docs #702

Open
Lucas-C opened this issue Jan 17, 2025 · 2 comments
Open

Reusing build logic in MOTIS, including for docs #702

Lucas-C opened this issue Jan 17, 2025 · 2 comments

Comments

@Lucas-C
Copy link

Lucas-C commented Jan 17, 2025

Original suggestion by @felixguendling:

In case this docs building is always the same and should be used in all MOTIS repositories (osr, motis, etc.), I would propose to create a separate repository (maybe called docs-gen or simply docs) and include it via .pkg. As long as it has a central CMakeLists.txt (then in the root directory) it will work. I think this is maybe a better solution than to force each repo to include utl if it wants only docs. Maybe at the moment all repos include utl but I would say it's maybe better to split it?

I see 3 options regarding how we deal with document generation in MOTIS:

  1. we get it out of CMake managed tasks: it's maybe the simplest solution (we just have to remove docs/CMakeLists.txt from the utl module)
  2. we keep it inside CMake managed tasks, but make it optional, so that it's not invoked by default when calling cmake
  3. we keep it inside CMake managed tasks, and make it mandatory. This will require all MOTIS builds to have Doxygen & Python setup, so that's maybe a solution to exclude.

AMHA option 1) is maybe the best one for now, and would avoid adding some complexity to the CMakeLists.txt files.
What do you think?

We could still rely on pkg to have motis-project/docs installed in deps/,
and then call deps/docs/build_docs.sh directly from a GitHub Actions doc job, without using CMake.

Also, I was wondering if you would be open to adopt reusable workflows in MOTIS, to avoid duplication of the YAML workflows (like the doc job)?


(this was initially a comment in PR motis-project/nigiri#165 (comment), but I think it's maybe better to have a dedicated issue)

@felixguendling
Copy link
Member

Reuseable workflows look good.

We could still rely on pkg to have motis-project/docs installed in deps/,

Currently, pkg requires repos to have a CMakeLists.txt (which can be almost empty).

To me, option (1) looks the best. Just have a reusable workflow to generate the docs in repos that have docs. This would be quite clean an minimal.

@Lucas-C
Copy link
Author

Lucas-C commented Jan 20, 2025

I initiated https://github.com/motis-project/docs

It's now used to generate the utl package documentation: motis-project/utl#33

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

No branches or pull requests

2 participants