Continuous-Integration-Verification-Simulink-Models-GitLab

버전 1.0 (1.4 MB) 작성자: Jemima Pulipati
This project is used in the explanation of the Technical Article 'Continuous Integration for Verification of Simulink® Models Using GitLab®'
다운로드 수: 184
업데이트 날짜: 2021/12/3

Continuous Integration for Verification of Simulink® Models Using GitLab

This project is used in the explanation of the Technical Article 'Continuous Integration for Verification of Simulink® Models Using GitLab®' to describe a simple end-to-end example showing Model Based Design integration into GitLab®. Upon following the steps in the Technical Article, one can setup a running Continuous Integration pipeline performing verify, build, test and package stages to generate corresponding artifacts.

Quick Start guide

  1. Fork the repository to your own GitHub® account.
  2. Setup the GitLab® Runner, as outlined in the Technical Article.
  3. Create a new CI job using your forked repository.

Please refer the Technical Article 'Continuous Integration for Verification of Simulink Models Using GitLab' for detailed instructions on how to setup and run the continuous integration pipeline.

Folder Structure

Top-level directory layout

.
├── Data                                        # Data required to run the models and test cases.
├── Design                                      # This folder consists of sub-folders for each of the models in Cruise Control System.
├── Requirements                                # Requirements for the Cruise Control System.
├── tools                                       # Consists of files which can be useful while working with the models.
│   ├── help                                    # Contains files which describe the Cruise Control System and its behaviour.
│   ├── utilities                               # Consists of scripts and functions which are used for running the models.
├── .gitlab-ci.yml                              # Contains the stages to run in the parent pipeline and definitions for the child pipelines.
├── .driverSwRequest-gitlab-ci.yml              # Contains the stages to run in the child pipeline for the model 'DriverSwRequest'.
├── .cruiseControlMode-gitlab-ci.yml            # Contains the stages to run in the child pipeline for the model 'CruiseControlMode'.
├── .targetSpeedThrottle-gitlab-ci.yml          # Contains the stages to run in the child pipeline for the model 'TargetSpeedThrottle'.
├── .crs_controller-gitlab-ci.yml               # Contains the stages to run in the child pipeline for the model 'crs_controller'.
├── CruiseControlExample.prj                    # Can run this file in MATLAB® to setup the Simulink project
├── LICENSE
├── SECURITY.md
└── README.md

Design files

The Design folder consists of sub-folders for each of the models in the Cruise Control System.

The models are:

  1. crs_controller
  2. CruiseControlMode
  3. DriverSwRequest
  4. TargetSpeedThrottle

Each model folder consists of:

.
├── ...
├── Design
│   ├── crs_controller
│   │   ├── ...
│   ├── CruiseControlMode
│   │   ├── ...
│   ├── DriverSwRequest
│   │   ├── pipeline                 # Contains files related to 'DriverSwRequest' model's child pipeline.
│   │   │   ├── analyze              # Contains artifacts corresponding to different stages in the executed pipeline.
│   │   │   │   ├── verify           # Contains generated Model Advisor Report.
│   │   │   │   ├── build            # Contains generated Build Report.
│   │   │   │   ├── testing          # Contains generated Test Result Reports.
│   │   │   │   ├── package          # Contains generated Summary Report which is a summary of all the results from the previous stages.
│   │   │   ├── build                # Contains scripts to build the model.
│   │   │   ├── tests                # Contains scripts to run unit tests on the model.
│   │   │   ├── verify               # Contains scripts to run Model Advisor using ISO26262 checks on the model.
│   │   ├── specification            # Contains the Simulink®  Model file.
│   ├── TargetSpeedThrottle
│   │   ├── ...
└── ...

Tools and Utilities

.
├── ...
├── tools
│   ├── ...
│   ├── utilities
│   │   ├── config_data
│   │   │   ├── iso26262Checks.json              # The configuration file containing the Model Advisor Checks.
│   │   ├── pipeline_functions                   # Contains those scripts which are used for running the pipeline.
│   │   │   ├── deleteLogs.m                     # Deletes the logs generated while running the verify, build , test stages in the pipeline.
│   │   │   ├── generateHTMLReport.m             # Generates the HTML Summary report for a specified model.
│   │   │   ├── generateXMLFromLogs.m            # Generates a single XML file containg the results from the verify, build, test stages of the pipeline.
│   │   │   ├── modelAdvisorAction.m             # Runs the Model Advisor Checks for a specified model.
│   │   │   ├── modelBuildAction.m               # Script to build the model.
│   │   │   ├── modelTestsAction.m               # Runs the unit tests for the specified model.
│   │   │   ├── report.xsl                       # Template of the Summary Report that gets generated in the Package stage of the pipeline.
│   │   │   ├── runFolderTests.m                 # Runs the scripts in a specified folder for a specified model.
│   │   ├── setup
│   │   │   ├── cleanUp.m                        # Can be used to run at the end to remove generated files and folders.
│   │   │   ├── startUp.m                        # Configured to run on Project startup and can be used to modify locations where Simulink® Cache files and codegen folders are generated.
│   │   ├── user_scripts
│   │   │   ├── openModels.m                     # Opens all the models
│   │   │   ├── runAllTestsLocally.m             # Used for locally running all the scripts used in various stages of pipeline and can be run before pushing to remote.
└── ...

Products/Toolboxes Required

This project works on MATLAB 2020b, 2021a.

License

The license for Continuous Integration for Verification of Simulink Models Using GitLab is available in the license.txt file in this repository.

Community Support

MATLAB Central

Copyright 2021 The MathWorks, Inc.

인용 양식

Jemima Pulipati (2024). Continuous-Integration-Verification-Simulink-Models-GitLab (https://github.com/mathworks/Continuous-Integration-Verification-Simulink-Models-GitLab/releases/tag/v1.0), GitHub. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2020b
R2020b에서 R2021a까지의 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Data

Design/CruiseControlMode/pipeline/build

Design/CruiseControlMode/pipeline/tests

Design/CruiseControlMode/pipeline/verify

Design/DriverSwRequest/pipeline/build

Design/DriverSwRequest/pipeline/tests

Design/DriverSwRequest/pipeline/verify

Design/TargetSpeedThrottle/pipeline/build

Design/TargetSpeedThrottle/pipeline/tests

Design/TargetSpeedThrottle/pipeline/verify

Design/crs_controller/pipeline/build

Design/crs_controller/pipeline/tests

Design/crs_controller/pipeline/verify

tools/utilities/pipeline_functions

tools/utilities/setup

tools/utilities/user_scripts

Design/CruiseControlMode/specification

Design/DriverSwRequest/specification

Design/TargetSpeedThrottle/specification

Design/crs_controller/specification

Design/crs_plant/specification

버전 게시됨 릴리스 정보
1.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.