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

docs: add auto testing of examples #854

Merged
merged 13 commits into from
Sep 14, 2023
Merged

Conversation

braindigitalis
Copy link
Contributor

@braindigitalis braindigitalis commented Sep 14, 2023

This PR splits out the examples into docpages/example_code. These are individual .cpp files which should be able to be compiled as standalone programs into an executable.

There is also a CMakeLists.txt that builds them, and an action that runs this test build on push. This way we can identify bad examples that dont even compile. It also allows us to properly use syntax highlighting and linting on them and ensure they meet our code style guide.

  • My pull request is made against the dev branch.
  • I have ensured that the changed library can be built on your target system. I did not introduce any platform-specific code.
  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • I tested my commits, by adding a test case to the unit tests if needed
  • I have ensured that I did not break any existing API calls.
  • My code follows the coding style guide (if you are not sure, match the code style of existing files including indent style etc).
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight. Where I have generated this pull request using a tool, I have justified why this is needed.

@netlify
Copy link

netlify bot commented Sep 14, 2023

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit f7aefe7
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/65026f1e95aa2f000834af18
😎 Deploy Preview https://deploy-preview-854--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@braindigitalis
Copy link
Contributor Author

An example of a successful run of the action:
https://github.com/brainboxdotcc/DPP/actions/runs/6179898895/job/16775550064?pr=854

@braindigitalis braindigitalis self-assigned this Sep 14, 2023
@braindigitalis braindigitalis added documentation Improvements or additions to documentation enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Sep 14, 2023
@Jaskowicz1
Copy link
Contributor

Not reviewed it yet, but this is an extremely good feature to go through with for the docs.

My biggest question is, will the GitHub actions test this on different compilers (for example, Clang, G++, and MSVC)? If not, we should look into this as we've had an issue in the past with this.

@braindigitalis
Copy link
Contributor Author

Not reviewed it yet, but this is an extremely good feature to go through with for the docs.

My biggest question is, will the GitHub actions test this on different compilers (for example, Clang, G++, and MSVC)? If not, we should look into this as we've had an issue in the past with this.

no I think that is overkill. we would have to build 3 copies of dpp with coro, and compile about 40 example programs on each. these are impossible to test without spamming pushes to GitHub and waiting for hours each time, as there is no way to locally simulate a windows GitHub action. smells like arm6 cross compile all over again

@Jaskowicz1
Copy link
Contributor

Not reviewed it yet, but this is an extremely good feature to go through with for the docs.
My biggest question is, will the GitHub actions test this on different compilers (for example, Clang, G++, and MSVC)? If not, we should look into this as we've had an issue in the past with this.

no I think that is overkill. we would have to build 3 copies of dpp with coro, and compile about 40 example programs on each. these are impossible to test without spamming pushes to GitHub and waiting for hours each time, as there is no way to locally simulate a windows GitHub action. smells like arm6 cross compile all over again

That's understandable. Still great either way!

@braindigitalis braindigitalis merged commit fd3f875 into dev Sep 14, 2023
6 checks passed
@braindigitalis braindigitalis deleted the doxygen_split_out_cpp branch September 16, 2023 20:59
Mishura4 pushed a commit to Mishura4/DPP-PRs that referenced this pull request Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants