Skip to content
Snippets Groups Projects
Commit 88ba0e06 authored by Lars Bilke's avatar Lars Bilke
Browse files

[web] Finished development workflows section in devguide.

parent 791a5c4c
No related branches found
No related tags found
No related merge requests found
Showing with 237 additions and 0 deletions
web/content/docs/devguide/development-workflows/GH_CI_screenshot.png

130 B

web/content/docs/devguide/development-workflows/clion.png

131 B

+++
date = "2018-02-26T11:00:13+01:00"
title = "Code Reviews"
author = "Lars Bilke"
weight = 1012
[menu]
[menu.devguide]
parent = "development-workflows"
+++
TODO!
web/content/docs/devguide/development-workflows/codeblocks.png

131 B

+++
date = "2018-02-26T11:00:13+01:00"
title = "Continuous Integration"
author = "Lars Bilke"
weight = 1013
[menu]
[menu.devguide]
parent = "development-workflows"
+++
## Introduction
> [Continuous Integration](https://en.wikipedia.org/wiki/Continuous_integration) (short **CI**) is the practice of merging all developer working copies to a shared mainline several times a day.
So for every proposed change to the source code the following is done automatically:
- Compilation of the changed code merged with the official source code is tested on a variety of platforms (Windows, Linux, Mac OS, different compilers)
- A comprehensive [test suite](TODO: link unit testing) checks validity of the proposed changes
- Additional checks regarding code formatting and documentation help in maintaining a good software quality and structure
After the system is done with all these tasks the developer can view build reports highlighting occurred errors and problems. We are using [Jenkins](TODO: link) as our CI system.
## CI on OGS
All of this automatically kicks in when you open a [Pull Request](../code-reviews) on GitHub. You will notice a checks block at the end of the pull request page:
![](../GH_CI_screenshot.png)
Click on the *Details* link to find out the reason for a failed check. If you add more commits to this pull request all checks are run again.
# Enable CI on your fork
You can have the CI system testing all your branches in your fork of OGS even before creating a pull request. Just contact us and provide your GitHub user name.
+++
date = "2018-02-26T11:00:13+01:00"
title = "Development IDEs"
author = "Marc Walther"
weight = 1014
[menu]
[menu.devguide]
parent = "development-workflows"
+++
## Overview
Here is a small compilation about **debugging tools** and how to **set them up** to start **developing** OGS. There are several development IDE's available, both open-source or commercial. Some are multi-platform, others are platform-specific.
Here is a **link list** without specific order:
- [Eclipse](http://www.eclipse.org/)
- [Code::Blocks](http://www.codeblocks.org/)
- [Netbeans](https://netbeans.org/)
- [GDB](https://www.sourceware.org/gdb/)
- [CLion](https://www.jetbrains.com/clion/)
The steps to get things started with an IDE basically include **generating** the project files, **importing** them in the IDE and know where to **provide arguments** to the debugging binary.
I will assume, that you have the sources (eg. checked out from github) and that they lie in the **source directory**
```bash
/home/user/ogs6/sources
```
Please, create a seperate **build directory** for your favorite IDE like
```bash
/home/user/ogs6/build_gdb
```
__________
## GDB
<https://www.sourceware.org/gdb/download>
### Screenshot
![](../gdb.png)
### Create project files
1. CD to the build directory
2. Generate project files with CMake:
```bash
cmake ../sources/
```
3. Start gdb in graphical mode, without license info (quiet) and with arguments:
```bash
gdb -tui -q --args ./bin/ogs ./path/to/BenchmarkName.prj
```
4. Have fun...
Documentation: <https://sourceware.org/gdb/onlinedocs/gdb/index.html>
__________
## Eclipse
<http://www.eclipse.org/downloads>
Choose "Eclipse IDE for C/C++ Developers"
### Screenshot
![](../eclipse.png)
### Import Code
1. CD to the build directory
2. Generate project files with CMake:
```bash
cmake -G "Eclipse CDT4 - Unix Makefiles" ../sources/
```
3. Open Eclipse and choose *File - Import - Existing Project into Workspace*
4. Select the **build directory** and click Finish (***Attention:*** Make sure to **not** check the option *Copy projects into workspace*!)
5. To provide arguments, you will have to run the project once: *Run - Debug* (running will start building first, if not already done).
6. Then, give arguments via *Run - Debug Configuration - C/C++ Application - ogs*. Choose *Arguments* tab on right side and add your arguments to the line *C/C++ Application*, e.g.
```bash
./path/to/BenchmarkName.prj
```
7. Start debugging...
Documentation: <http://wiki.eclipse.org/Main_Page>
__________
## Code::Blocks
<http://www.codeblocks.org/downloads>
or
<https://code.google.com/p/fortranproject>
The latter includes already plugins for Fortran, in case you want to cross-compile.
### Screenshot
![](../codeblocks.png)
### Import Code
1. CD to the build directory
2. Generate project files with CMake:
```bash
cmake -G "CodeBlocks - Unix Makefiles" ../sources/
```
3. *Open an existing project* and choose before created .cbp file
4. Choose your compilation target
5. Give arguments: *Project - Set Programs' Arguments*, select correct target and add *Program arguments* in the bottom
```bash
./path/to/BenchmarkName.prj
```
6. Rock the show...
### Documentation:
- <http://www.codeblocks.org/user-manual>
- <http://wiki.codeblocks.org/index.php?title=Main_Page>
__________
## NetBeans
<https://netbeans.org/downloads>
### Screenshot
![](../netbeans.png)
### Import project files
1. Open NetBeans
2. Choose *File - New Project - C/C++ Project with Existing Sources* (Click *Next >*)
3. Specify sources directory, select configuration mode *Custom*
4. Check *Run Configure Script in Subfolder*
5. Click *Next >* until *Finish*
6. Give arguments via *Run - Set Project Configuration - Customize*
7. Under *Run*, give *Run Command* on right side:
```bash
"${OUTPUT_PATH}" ./path/to/BenchmarkName.prj
```
7. When starting debugging, choose correct target
8. Have a great time...
Documentation: <https://netbeans.org/kb/index.html>
__________
## CLion
Download: <https://www.jetbrains.com/clion/>
### Screenshot
![](../clion.png)
### Import project
You don't need a build-directory for CLion. It will create it by itself.
1. *File / Import Project*
2. Choose source-directory
3. When prompted do not overwrite CMake file, instead choose *Open Project*
4. Under *Run / Edit Configurations* choose the ogs-target and set the program working directory and arguments
5. On the top right choose the ogs-target and click the green Debug-button
Documentation: <https://www.jetbrains.com/clion/help/introduction.html>
web/content/docs/devguide/development-workflows/eclipse.png

131 B

web/content/docs/devguide/development-workflows/gdb.png

131 B

web/content/docs/devguide/development-workflows/netbeans.png

131 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment