Aufgrund eines Versionsupdates wird GitLab am 17.12. zwischen 9:00 und 9:30 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to a version upgrade, GitLab won't be accessible at 17.12. between 9 and 9:30 a.m.

...
 
Commits (343)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
general:
branches:
ignore:
- gh-pages
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk
cmd: ["/bin/bash"]
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
- MAVEN_OPTS: -Xmx3200m
- ES_JAVA_OPTS=-Xms3200m -Xmx3200m
steps:
- checkout
# run tests!
- run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings "settings.xml"
workflows:
version: 2
commit-workflow:
jobs:
- build
scheduled-workflow:
triggers:
- schedule:
cron: "30 1 * * *"
filters:
branches:
only: master
jobs:
- build
# (c) https://github.com/MontiCore/monticore
stages:
#- windows
- linux
- windows
- linuxCompile
- integration
- linuxDeploy
masterJobLinux:
stage: linux
masterJobWindows:
stage: windows
allow_failure: true
script:
- call mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml -U
tags:
- Windows10
CompileJobLinux:
stage: linuxCompile
image: maven:3-jdk-8
artifacts:
paths:
- target/
expire_in: 1 day
script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml -U
- cat target/site/jacoco/index.html
DeployJobLinux:
stage: linuxDeploy
image: maven:3-jdk-8
dependencies:
- CompileJobLinux
script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean deploy --settings settings.xml
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B deploy --settings settings.xml -U
only:
- master
#masterJobWindows:
# stage: windows
# script:
# - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
# tags:
# - Windows10
MqttIntegrationJob:
stage: integration
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2mqtt:v1
dependencies:
- CompileJobLinux
script:
- ./src/test/bash/integrationTestMqtt.sh
BranchJobLinux:
stage: linux
image: maven:3-jdk-8
RosIntegrationJob:
stage: integration
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-kinetic
dependencies:
- CompileJobLinux
script:
- ./src/test/bash/integrationTestRos.sh
SomeIPIntegrationJob:
stage: integration
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2someip:v2
dependencies:
- CompileJobLinux
script:
- ./src/test/bash/integrationTestSomeIP.sh
Ros2IntegrationJob:
stage: integration
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-crystal
dependencies:
- CompileJobLinux
script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
except:
- master
\ No newline at end of file
- ./src/test/bash/integrationTestRos2.sh
script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report --settings "settings.xml"
after_success:
- if [ "${TRAVIS_BRANCH}" == "master" ]; then mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B deploy --debug --settings "./settings.xml"; fi
<!-- (c) https://github.com/MontiCore/monticore -->
# Dependencies needed to compile the generated projects
## Note
The generator creates compile scripts for all supported compilers. A project with ROS or ROS2 contains `compile.sh` and `compileMsbuild.bat` as Linux and Windows(with Msbuild) are supported.
If you are having problems compiling on Windows because of the path length limit, use `substCompileMsbuild.bat` or `substCompileMingw.bat`.
## All generated projects
CMake, Make, a C++ compiler, and Armadillo are required to compile the generated projects.
## Linux
Gcc is recommended as the C++ compiler.
Example install of all needed packages for ubuntu:
```bash
sudo apt install gcc cmake make
```
Then download Armadillo from here: [Linux](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fubuntu%2F18.10.24-armadillo-linux&files=armadillo-8.500.1-linux.zip) and set the environment variable `Armadillo_HOME` to the base dir of your installation.
To check everything is installed correctly use whereis/ls:
```bash
$ whereis g++
g++: /usr/bin/g++
$ whereis cmake
cmake: /usr/bin/cmake
$ whereis make
make: /usr/bin/make
$ ls "$Armadillo_HOME/include"
armadillo_bits armadillo.h
```
## Windows
Mingw64 gcc is recommended as the C++ compiler. Download a version with all needed tools from [here](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fwin64&files=mingw64.zip).
CMake for Windows: https://cmake.org/download/
Make for Windows: http://gnuwin32.sourceforge.net/packages/make.htm
Add the bin directories of all 3 to your PATH variable.
Then download Armadillo from here: [Windows](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fwin64&files=armadillo-8.200.2.zip) and set the environment variable `Armadillo_HOME` to the base dir of your installation.
To check everything is installed correctly use where/dir:
```batch
> where g++
C:\mingw64\bin\g++.exe
> where cmake
C:\Program Files\CMake\bin\cmake.exe
> where make
C:\Program Files\make-3.81-bin\bin\make.exe
> dir /b "%Armadillo_HOME%\include"
armadillo
armadillo.h
...
```
Alternatively Msbuild can be used as a compiler. Download and install Build Tools für Visual Studio 2017 by visiting [this](https://visualstudio.microsoft.com/de/downloads/) site, and navigating to `Tools for Visual Studio 2017`.
Set the environment variable `msbuild_HOME` to the Folder containing `vcvars64.bat`(Standard destination: "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build")
To check everything is installed correctly use where/dir:
```batch
> where cmake
C:\Program Files\CMake\bin\cmake.exe
> dir /b "%Armadillo_HOME%\include"
armadillo
armadillo.h
...
> dir /b "%msbuild_HOME%"
vcvars32.bat
vcvars64.bat
...
> call "%msbuild_HOME%\vcvars64.bat"
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
> where msbuild
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
```
Please note: It is highly recommended, you stick to the exact versions as stated above. Otherwise you might run into trouble regarding the interplay between cmake/make and the Armadillo library. In particular problems have been reported using Cygwin.
## Projects with roscpp generator
Only for generated projects that contain a ROS adapter(e.g. "generators":["cpp","roscpp"]).
ROS Kinetic currently only supports Linux and the installation is described [here](http://wiki.ros.org/kinetic/Installation/Ubuntu).
ROS Melodic is also supported on Windows and the installation is described [here](http://wiki.ros.org/Installation/Windows). You might need to patch the file `${ROS_HOME}\ros\console.h` like this:
```C++
extern ROSCONSOLE_DECL bool g_initialized;
=>
//extern ROSCONSOLE_DECL bool g_initialized;
...
if (ROS_UNLIKELY(!::ros::console::g_initialized)) \
=>
/*if (ROS_UNLIKELY(!::ros::console::g_initialized))*/ \
```
Set the environment varialble `ROS_HOME` to the base of your ROS installation.
## Projects with ros2cpp/rclcpp generator
Only for generated projects that contain a ROS2 adapter(e.g. "generators":["cpp","rclcpp"]).
Tested under ROS2 Bouncy and Crystal with Windows 10 and Ubuntu 18.04 respectively and the installation is described [here](https://index.ros.org/doc/ros2/Installation/).
ROS2 under Windows can only be compiled with msbuild.
Set the environment varialble `ROS2_HOME` to the base of your ROS2 installation.
If you use structs and message generation, you need to install colcon:
```bash
pip3 install -U colcon-common-extensions
```
<!-- (c) https://github.com/MontiCore/monticore -->
# Quickstart guide for generator developers
- Download and install Java(8+), Maven, as well as Git.
- Clone this repository:
```bash
cd your/project/directory
git clone https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware.git
```
- Build the project
- Using the command line:
```bash
cd EMAM2Middleware
mvn clean install -s settings.xml
```
- Using Intellij Idea:
- Open and import the project
- Open the maven settings(ctrl+shift+a, search 'Maven settings'), tick 'Override' at 'User settings file' and select the 'settings.xml' from this Project
- Update all maven dependencies(ctrl+shift+a, seach 'Reimport All Maven Projects')
- Build the project(crtl+F9)
- Make your changes
## Compiling the Projects
Options
1. Add your new generated test projects to the integration tests(check the scripts in [src/test/bash/](src/test/bash/) as well as [.gitlab-ci.yml](.gitlab-ci.yml)) and let the CI/CD system compile them. Alternatively you can use Docker to run the integration tests locally(reference [README.md](README.md) , Section 'Running the Integration tests locally')
2. Install all dependencies (reference [README.md](README.md) , Section 'Dependencies needed to compile the generated projects') and execute the generated compile scripts.
<!-- (c) https://github.com/MontiCore/monticore -->
# Quickstart guide for generator users
- Download the latest version of the generator from the [se-nexus](https://nexus.se.rwth-aachen.de/service/rest/repository/browse/public/de/monticore/lang/monticar/embedded-montiarc-math-middleware-generator/) (e.g. .../0.0.20-20190311.154342-1/embedded-montiarc-math-middleware-generator-0.0.20-20190311.154342-1-jar-with-dependencies.jar) and save it as mw-generator.jar
- Create a `project.json` config file for your project
- make sure your model directory and root model are correct
- for examples see: [valid.json](src/test/resources/config/valid.json), [emadl.json](src/test/resources/config/emadl.json)
- Refer to the main [readme.md](README.md)(section CLI) to see all options.
- Generate your project by running
```bash
java -jar mw-generator.jar project.json
```
- Refer to the main [readme.md](README.md)(Section: Dependencies needed to compile the generated projects) for instructions on how to install the needed dependencies for compilation
- Compile your project by running one of the generated compile scripts. E.g.:
```bash
cd defined/output/directory
./compile.sh
# or on Windows
call compileMingw.bat
# or
call compileMsbuild.bat
# or to avoid path length error:
call substCompileMingw.bat
```
For two example Projects using this generator see:
- [Cooperative Intersection](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/applications/cooperativeintersection) (Uses EMAM, ROS, CoInCar Simulator)
- [Autonomous driving](https://git.rwth-aachen.de/autonomousdriving/torcs_dl) (Uses EMADL, ROS, Torcs Simulator)
This diff is collapsed.