Skip to content

Commit 748df49

Browse files
authored
Contiuous Integration using OpenModelica/openmodelica-library-testing-action (#83)
* Adding openmodelica-library-testing - Refactoring Markdown - Removing OpenModelica test scripts * Fixing version, adding deploy * Fixing action name * Fixing ci * Adding 3-Clause BSD * Stuff * change root url to hsbi * Fix version * Fixing CODEOWNERS * Updating reference file * No deploy, doesn't work with forks * Revert rtest removal
1 parent 49d2ad4 commit 748df49

File tree

105 files changed

+120
-4859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+120
-4859
lines changed

Diff for: .gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
*.order text eol=lf
99
Testing/OpenModelica/rtest text eol=lf
1010

11+
# Set linguist language to Modelica
12+
*.mo linguist-language=Modelica
13+
1114
# Denote all files that are truly binary and should not be modified.
1215
*.jpg binary
1316
*.mat binary

Diff for: .github/CODEOWNERS

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Each line is a file pattern followed by one or more owners.
2+
3+
# License changes
4+
*license* @bernhardbachmann
5+
*LICENSE* @bernhardbachmann

Diff for: .github/workflows/Test.yml

+30-21
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
name: Test
22

33
on:
4+
workflow_dispatch:
5+
pull_request:
46
push:
57
branches:
6-
- 'master'
7-
pull_request:
8+
- main
9+
- 'releases/*'
10+
tags: 'v*'
811

912
jobs:
1013
test:
11-
runs-on: 'ubuntu-latest'
12-
env:
13-
OPENMODELICAHOME: '/usr'
14+
runs-on: ubuntu-latest
1415
timeout-minutes: 60
16+
strategy:
17+
matrix:
18+
omc-version: ['stable']
19+
fail-fast: false
1520

1621
steps:
17-
- uses: actions/checkout@v3
22+
- name: Checkout
23+
uses: actions/checkout@v4
1824

19-
- name: "Set up OpenModelica Compiler"
20-
uses: AnHeuermann/setup-[email protected]
25+
- name: Setup Python 3
26+
uses: actions/setup-python@v5
2127
with:
22-
version: 'stable'
28+
python-version: '3.10'
29+
30+
- name: Setup OpenModelica
31+
uses: OpenModelica/setup-openmodelica@v1
32+
with:
33+
version: ${{ matrix.omc-version }}
2334
packages: |
2435
omc
2536
libraries: |
26-
'Modelica 4.0.0'
37+
Modelica 4.0.0
2738
omc-diff: true
2839

29-
- name: "Test OpenModelica"
30-
run: "make -C Testing openmodelica"
31-
32-
- name: "Upload openmodelica.log"
33-
uses: actions/upload-artifact@v3
40+
- name: openmodelica-library-testing
41+
uses: OpenModelica/[email protected]
3442
with:
35-
name: openmodelica.log
36-
path: Testing/openmodelica.log
43+
library: PNlib
44+
library-version: '2.2'
45+
modelica-file: PNlib/package.mo
46+
omc-version: ${{ matrix.omc-version }}
47+
reference-files-dir: ReferenceFiles
48+
reference-files-extension: mat
49+
reference-files-delimiter: .
3750

38-
- name: "Look for failing tests"
39-
run: |
40-
grep "\(^ - \)\|\(... equation mismatch\)" Testing/openmodelica.log | true
41-
grep -i "^== 0 out of [0-9]* tests failed" Testing/openmodelica.log

Diff for: LICENSE

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright 2013 - 2024 Sabrina Proß, Lennart Ochel, Timo Lask, Bernhard Bachmann
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this
7+
list of conditions and the following disclaimer.
8+
9+
2. Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation and/or
11+
other materials provided with the distribution.
12+
13+
3. Neither the name of the copyright holder nor the names of its contributors
14+
may be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Diff for: README.md

+53-25
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,67 @@
11
# PNlib
2+
3+
[![Test][test-badge]][test-link]
4+
25
Free Modelica library for modelling xHPN.
36

47
## Library description
5-
The advanced Petri Net library, called PNlib, enables the modeling of extended hybrid Petri Nets (xHPN). It comprises
6-
* discrete (PD) and continuous places (PC),
7-
* discrete (TD), stochastic (TS), and continuous transitions (TC), and
8-
* test (TA), inhibitor (IA), and read arcs (RA).
98

10-
![iconsxHPN](PNlib/Resources/Images/iconsxHPN.png "xHPN: Extended Hybrid Petri Nets")
9+
The advanced Petri Net library, called PNlib, enables the modeling of extended
10+
hybrid Petri Nets (xHPN). It comprises
11+
12+
* discrete (PD) and continuous places (PC),
13+
* discrete (TD), stochastic (TS), and continuous transitions (TC), and
14+
* test (TA), inhibitor (IA), and read arcs (RA).
15+
16+
![iconsxHPN][pnlib-img]
1117

1218
The main package PNlib is divided into the following sub-packages:
13-
* _Interfaces_: contains the connectors of the Petri net component models.
14-
* _Blocks_: contains blocks with specific procedures that are used in the Petri net component models.
15-
* _Functions_: contains functions with specific algorithmic procedures which are used in the Petri net component models.
16-
* _Constants_: contains constants which are used in the Petri net component models.
17-
* _Examples_: contains several examples and unit tests.
19+
20+
* _Interfaces_: contains the connectors of the Petri net component models.
21+
* _Blocks_: contains blocks with specific procedures that are used in the Petri
22+
net component models.
23+
* _Functions_: contains functions with specific algorithmic procedures which
24+
are used in the Petri net component models.
25+
* _Constants_: contains constants which are used in the Petri net component
26+
models.
27+
* _Examples_: contains several examples and unit tests.
1828

1929
## Current release
20-
Download [PNlib v2.2 (2019-10-24)](../../archive/v2.2.zip)
2130

22-
## Compatibility [![Test](https://github.com/AMIT-HSBI/PNlib/actions/workflows/Test.yml/badge.svg)](https://github.com/AMIT-HSBI/PNlib/actions/workflows/Test.yml)
23-
* Works in OpenModelica (latest release) ([trend](http://libraries.openmodelica.org/branches/history/master/PNlib.svg), [coverage](http://libraries.openmodelica.org/branches/master/PNlib/PNlib.html))
24-
* Works in Dymola 2017/2019/2020
31+
Download [PNlib v2.2 (2019-10-24)][release-v-2-2]
32+
33+
## Compatibility
34+
35+
* Works in OpenModelica (latest release)
36+
37+
![Pnlib omc-master](https://libraries.openmodelica.org/branches/history/master/PNlib.svg)
38+
39+
Latest [Coverage][coverage-link] with OpenModelica.
40+
* Works in Dymola 2017/2019/2020
2541

2642
## License
27-
This Modelica package is free software and the use is completely at your own risk;
28-
it can be redistributed and/or modified under the terms of the [Modelica License 2](https://modelica.org/licenses/ModelicaLicense2).
43+
44+
This package is licensed with the [3-Clause BSD License](./LICENSE).
2945

3046
## Development and contribution
31-
University of Applied Sciences Bielefeld
32-
Department of engineering and mathematics
33-
33619 Bielefeld - Germany
34-
* Sabrina Proß
35-
* Lennart Ochel
36-
* Timo Lask
37-
* Bernhard Bachmann
38-
39-
You may report feedback, issues or feature-requests using the [Issues](../../issues) button.
47+
48+
```
49+
Hochschule Bielefeld – University of Applied Sciences and Arts
50+
Faculty of Engineering and Mathematics
51+
```
52+
53+
* Sabrina Proß
54+
* Lennart Ochel
55+
* Timo Lask
56+
* Bernhard Bachmann
57+
58+
You may report feedback, issues or feature-requests using
59+
[GitHub Issues][issues].
60+
61+
[test-badge]: https://github.com/AMIT-HSBI/PNlib/actions/workflows/Test.yml/badge.svg
62+
[test-link]: https://github.com/AMIT-HSBI/PNlib/actions/workflows/Test.yml
63+
[pnlib-img]: PNlib/Resources/Images/iconsxHPN.png "xHPN: Extended Hybrid PetriNets"
64+
[release-v-2-2]: https://github.com/AMIT-HSBI/PNlib/releases/tag/v2.2
65+
[coverage-link]: http://libraries.openmodelica.org/branches/master/PNlib/PNlib.html
66+
[license-link]: https://modelica.org/licenses/ModelicaLicense2
67+
[issues]: https://github.com/AMIT-HSBI/PNlib/issues
-20 KB
Binary file not shown.

Diff for: Testing/Dymola/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TEST = ./../OpenModelica/rtest -v
1+
TEST = ../rtest -v
22
DYMOLA = Dymola
33

44
TESTFILES = \

Diff for: Testing/Makefile

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
.PHONY : test clean openmodelica dymola
1+
.PHONY : test clean dymola
22

3-
test: openmodelica dymola
4-
5-
openmodelica:
6-
@make -C OpenModelica | tee openmodelica.log
7-
@make -C OpenModelica clean
8-
@echo ""
9-
@grep == openmodelica.log
3+
test: dymola
104

115
dymola:
126
@make -C Dymola | tee dymola.log
@@ -15,6 +9,5 @@ dymola:
159
@grep == dymola.log
1610

1711
clean:
18-
@make -C OpenModelica clean
1912
@make -C Dymola clean
2013
@rm *.log

Diff for: Testing/OpenModelica/.gitignore

-12
This file was deleted.

Diff for: Testing/OpenModelica/Makefile

-138
This file was deleted.

0 commit comments

Comments
 (0)