-
Notifications
You must be signed in to change notification settings - Fork 247
Continuous Integration
Continuous integration means that changes in a software are frequently committed to a shared repository. This has many advantages such as detecting errors sooner, less possibilities for conflicts and others. For a more detailed explanation it is recommended to take a look at the corresponding GitHub page.
In order to avoid the introduction of errors from the commits, the code is continuously checked. This can include compiling, testing, but also other things like linting or code coverage checks.
In Kratos every pull request has to pass a set of tests in order to be merged. Those checks are the compilation and testing of the Core and several Applications on different systems (e.g. Linux, Windows) with different compilers (e.g. MSVC, GCC, CLANG, Intel).
If a required check fails, the pull request cannot be merged, even if it was approved!
Most of these checks are done with Github Actions. It is a (for open source projects) free service provided by GitHub to automate tasks related to software development.
Different configurations are compiled and tested, e.g. with GCC and CLANG under Linux and MSVC under Windows For details please check the actions configuration files in the workflows folder
Opening a pull request automatically triggers the checks. Their status can be seen either at the end of the page or in the Checks
tab. There all the configurations are listed. Each check has several steps (e.g. building, testing). The current status of each check can be observed by clicking the corresponding step.
If a step fails, the following steps also abort and the check didn't pass. If the check is marked as required
then it must pass before merging is possible. By checking the log of the failed step the error can be seen.
Note that the "small" suite of the tests is run in the CI (max runtime: 1 min per Application, if it takes longer the test will be passed and marked as failed)
In addition to the CI builds, the nightly build runs every night with a different test suite, namely the "nightly" suite. Those tests can take up to 15 min per Application.
Note that the status of the nightly build is also shown with a badge on the main page of Kratos. Hence failing nightly builds will have a negative effect on the reputation of Kratos and must be fixed as soon as possible.
For adding a new application to the CI, the Technical Committee decided that the following is required (see here):
- The Application must have tests
- Having at least two maintainers providing continuous support in case of CI failure. In case of no support the application would be removed from the CI.
- There are timers which limit the testing time for each applications (1 minute per Application for small tests, 15 minutes per Application for nightly tests). So the total CI time cannot be abused by one application. Please note that the CI machine is considerably slower than a normal desktop.
So applications which want to be part of the CI can create a PR adding the application to it. These PRs should be approved by the Technical Committee.
-
How to restart a build? https://docs.github.com/en/actions/managing-workflow-runs/re-running-a-workflow
-
How to check a branch without opening a pull request https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow => currently supports CI and Nightly Build
-
Cancelling (redundant) builds is done automatically (i.e. if a newer commit is pushed before the checks of the previous commit finished)
-
For canceling workflow manually check here: https://docs.github.com/en/actions/managing-workflow-runs/canceling-a-workflow
-
Viewing logs: https://docs.github.com/en/actions/managing-workflow-runs/using-workflow-run-logs
- Add MacOS build
- Add build with Intel compiler
- Runs tests with Valgrind
- Use Sanitizers
- ...
- Where to find the files? here
- Reference Documentation
- Supported runners and hardware resources
- Supported software
- Getting Kratos (Last compiled Release)
- Compiling Kratos
- Running an example from GiD
- Kratos input files and I/O
- Data management
- Solving strategies
- Manipulating solution values
- Multiphysics
- Video tutorials
- Style Guide
- Authorship of Kratos files
- Configure .gitignore
- How to configure clang-format
- How to use smart pointer in Kratos
- How to define adjoint elements and response functions
- Visibility and Exposure
- Namespaces and Static Classes
Kratos structure
Conventions
Solvers
Debugging, profiling and testing
- Compiling Kratos in debug mode
- Debugging Kratos using GDB
- Cross-debugging Kratos under Windows
- Debugging Kratos C++ under Windows
- Checking memory usage with Valgind
- Profiling Kratos with MAQAO
- Creating unitary tests
- Using ThreadSanitizer to detect OMP data race bugs
- Debugging Memory with ASAN
HOW TOs
- How to create applications
- Python Tutorials
- Kratos For Dummies (I)
- List of classes and variables accessible via python
- How to use Logger
- How to Create a New Application using cmake
- How to write a JSON configuration file
- How to Access DataBase
- How to use quaternions in Kratos
- How to do Mapping between nonmatching meshes
- How to use Clang-Tidy to automatically correct code
- How to use the Constitutive Law class
- How to use Serialization
- How to use GlobalPointerCommunicator
- How to use PointerMapCommunicator
- How to use the Geometry
- How to use processes for BCs
- How to use Parallel Utilities in futureproofing the code
- Porting to Pybind11 (LEGACY CODE)
- Porting to AMatrix
- How to use Cotire
- Applications: Python-modules
- How to run multiple cases using PyCOMPSs
- How to apply a function to a list of variables
- How to use Kratos Native sparse linear algebra
Utilities
Kratos API
Kratos Structural Mechanics API