Skip to content

Commit

Permalink
Update workflows (#13)
Browse files Browse the repository at this point in the history
* Update workflows

Signed-off-by: ClemensLinnhoff <[email protected]>

* Update readme

Signed-off-by: ClemensLinnhoff <[email protected]>

---------

Signed-off-by: ClemensLinnhoff <[email protected]>
  • Loading branch information
ClemensLinnhoff authored May 8, 2023
1 parent 35082e3 commit 5eb5984
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 29 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ jobs:
with:
path: /tmp/model_fmu
key: ${{ runner.os }}-model-fmu

- name: Commit ID
run: |
echo "Commit ID: "
echo $(git rev-parse --short HEAD)
5 changes: 1 addition & 4 deletions .github/workflows/cl0.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Credibility Assessment Level 0

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

jobs:
check-spdx-headers:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/cl1.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Credibility Assessment Level 1

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

jobs:
build_model:
Expand All @@ -16,6 +13,11 @@ jobs:
name: FMU Artifact
uses: ./.github/workflows/fmu_artifact.yml

fmu-checker:
needs: build_model
name: FMU Compliance Checker
uses: ./.github/workflows/fmu_checker.yml

cpp-linter:
name: C++ Linter
uses: ./.github/workflows/cpp-linter.yml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
cpp-linter:
name: C++ Linter
runs-on: ubuntu-latest
steps:
- name: Checkout Model
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/credibility_assessment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Credibility Assessment

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
cl0:
name: CL 0
uses: ./.github/workflows/cl0.yml

cl1:
name: CL 1
uses: ./.github/workflows/cl1.yml
2 changes: 1 addition & 1 deletion .github/workflows/fmu_artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
fmu-artifact:
name: Output FMU as artifact
name: FMU Artifact
runs-on: ubuntu-latest

steps:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/fmu_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: FMU Compliance Checker

on:
workflow_call:

jobs:
fmu-compliance-checker:
name: FMU Compliance Checker
runs-on: ubuntu-latest

steps:
- name: Cache Model FMU
id: cache-model-fmu
uses: actions/cache@v3
with:
path: /tmp/model_fmu
key: ${{ runner.os }}-model-fmu

- name: Cache FMUComplianceChecker
id: cache-fmu-checker
uses: actions/cache@v3
with:
path: /tmp/FMUComplianceChecker
key: ${{ runner.os }}-fmu-checker

- name: Get FMUComplianceChecker
if: steps.cache-fmu-checker.outputs.cache-hit != 'true'
working-directory: /tmp
run: git clone https://github.com/modelica-tools/FMUComplianceChecker.git

- name: Build FMUComplianceChecker
if: steps.cache-fmu-checker.outputs.cache-hit != 'true'
working-directory: /tmp/FMUComplianceChecker
run: |
mkdir build
cd build
cmake ..
cmake --build .
- name: Run FMUComplianceChecker
working-directory: /tmp/FMUComplianceChecker/build
run: ./fmuCheck.linux64 /tmp/model_fmu/${{ github.event.repository.name }}.fmu

- name: Commit ID
working-directory: /tmp/FMUComplianceChecker
run: |
echo "Commit ID: "
echo $(git rev-parse --short HEAD)
fmpy:
name: FMPy Validate
runs-on: ubuntu-latest

steps:
- name: Cache Model FMU
id: cache-model-fmu
uses: actions/cache@v3
with:
path: /tmp/model_fmu
key: ${{ runner.os }}-model-fmu

- name: Install FMPy
run: python -m pip install fmpy[complete]

- name: Run FMPy Validate
working-directory: /tmp/model_fmu
run: fmpy validate ${{ github.event.repository.name }}.fmu
1 change: 1 addition & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
markdown-lint:
name: Markdown Linter
runs-on: ubuntu-latest
steps:
- name: checkout
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/spdx.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/srmd-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
srmd-validator:
name: SRMD Validator
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -23,3 +24,9 @@ jobs:
- name: Validate SRMD
working-directory: sl-1-5-sensor-model-testing/src/srmd-validator
run: python3 srmd-validator.py

- name: Commit ID
working-directory: sl-1-5-sensor-model-testing
run: |
echo "Commit ID: "
echo $(git rev-parse --short HEAD)
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SL 1-2 Reflection Based Lidar Object Model

[![Credibility Assessment Level 0](../../actions/workflows/cl0.yml/badge.svg)](https://github.com/openMSL/sl-1-5-sensor-model-testing/blob/main/doc/test_architecture.md#cl-0-license-check)
[![Credibility Assessment Level 1](../../actions/workflows/cl1.yml/badge.svg)](https://github.com/openMSL/sl-1-5-sensor-model-testing/blob/main/doc/test_architecture.md#cl-1-code-verification)
[![Credibility Assessment](../../actions/workflows/credibility_assessment.yml/badge.svg)](https://github.com/openMSL/sl-1-0-sensor-model-repository-template/actions/workflows/test_pipeline.yml)

:warning: **Current version not compliant with official ASAM OSI**:
The current version of the model is build on the enhancements to the Open Simulation Interface from the publicly funded SETLevel project.
Expand Down
2 changes: 1 addition & 1 deletion src/model/profiles/profile_list.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VLP32
SCALA_1
Ibeo_LUX_2010
VLP32
VLP16
Blickfeld
2 changes: 2 additions & 0 deletions src/osmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ add_custom_command(TARGET ${MODEL_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/buildfmu"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/extra/net.pmsf.ssp.srmd"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/modelDescription.xml" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/../../sl-1-2-reflection-based-lidar-object-model.srmd" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/extra/net.pmsf.ssp.srmd/resourceMetaData.srmd"
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${MODEL_NAME}> $<$<BOOL:${MSVC}>:$<$<CONFIG:Debug>:$<TARGET_PDB_FILE:${MODEL_NAME}>>> "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/" "${FMU_INSTALL_DIR}/${MODEL_NAME}/"
COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/buildfmu" ${CMAKE_COMMAND} -E tar "cfv" "${FMU_INSTALL_DIR}/${MODEL_NAME}.fmu" --format=zip "modelDescription.xml" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}"
Expand Down

0 comments on commit 5eb5984

Please sign in to comment.