|
Software TSN Switch
A software switch to connect VMs and Containers to a TSN network
|
Important: First, make sure you've set up all the required dependencies. All commands on this page assume you're in the repo's root, not in a build folder or similar!
To build the project, run CMake. For a debug build:
For a release build:
To install the executables after building:
To run all tests, only after you've built the project:
We use clang-format as our formatter. Make sure you have it installed: sudo apt install clang-format.
Before you commit, please run our formatting script to keep the code tidy:
If you forget to do this, the pipeline will complain. If you would like an automated reminder, install our Git hook, which checks the code before each commit:
We use clang-tidy as our linter. Make sure you have it installed: sudo apt install clang-tidy. You can only lint after you've built the project! To lint a specific file:
To lint everything:
Since linting takes a while to process and can sometimes be a pain to comply with, there is no git hook for linting and the pipline will allow linting failures.
You could either follow the instructions below to build the documentation locally on your PC, or you could ask the CI pipeline to create a manual build for you. The pipeline will always automatically create primary documentation builds on main, but not on other branches.
To create a manual documentation build, visit the overview of your pipeline and manually run the manual-dev-docs and/or manual-user-docs jobs. When ready, your manual builds will be named based on your branch name, visit the GitLab pages overview to see the links for all currently active documentation builds. Oddities to watch out for:
README.md file.This command will place the generated developer documentation into a build-dev-docs folder in the project's root. Inside, open the html/index.html file with your browser to view it.
You need Python installed to build the user documentation. Create a virtual environment and install the necessary dependencies:
After you've done that, you're already in the virtual environment and could run the next command right away. However, when you log off and come back at a later time, you need to run source .venv/bin/activate again to enter the environment before you can build! To exit the virtual environment again, simply type deactivate.
This command will place the generated user documentation into a build-user-docs folder in the project's root. Inside, open the html/index.html file with your browser to view it.