Skip to content

Commit 23d0a09

Browse files
authored
Fix workflow for testing OpenModelica (#78)
1 parent 80e6438 commit 23d0a09

File tree

5 files changed

+296
-341
lines changed

5 files changed

+296
-341
lines changed

Diff for: .github/workflows/Test.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,34 @@ on:
88

99
jobs:
1010
test:
11-
#runs-on: 'ubuntu-latest' currently not working because we don't have omc-diff on ubuntu
12-
runs-on: 'windows-latest'
11+
runs-on: 'ubuntu-latest'
12+
env:
13+
OPENMODELICAHOME: '/usr'
1314
timeout-minutes: 60
1415

1516
steps:
1617
- uses: actions/checkout@v3
1718

1819
- name: "Set up OpenModelica Compiler"
19-
uses: AnHeuermann/setup-openmodelica@main
20+
uses: AnHeuermann/setup-openmodelica@v0.6
2021
with:
2122
version: 'stable'
2223
packages: |
2324
omc
2425
libraries: |
25-
'Modelica 3.2.3'
26+
'Modelica 4.0.0'
27+
omc-diff: true
2628

2729
- name: "Test OpenModelica"
2830
run: "make -C Testing openmodelica"
2931

3032
- name: "Upload openmodelica.log"
3133
uses: actions/upload-artifact@v3
3234
with:
33-
name: openmodelicar.-log
35+
name: openmodelica.log
3436
path: Testing/openmodelica.log
3537

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: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The main package PNlib is divided into the following sub-packages:
1919
## Current release
2020
Download [PNlib v2.2 (2019-10-24)](../../archive/v2.2.zip)
2121

22-
## Compatibility
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)
2323
* 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))
2424
* Works in Dymola 2017/2019/2020
2525

Diff for: Testing/OpenModelica/.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Source files
2+
*.bin
3+
*.c
4+
*.h
5+
*.json
6+
*.libs
7+
*.log
8+
*.o
9+
*.o.tmp
10+
*.makefile
11+
*.xml
12+

Diff for: Testing/OpenModelica/Makefile

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ PNlib.Examples.ExtTest.TDSuniform.mos \
7272
PNlib.Examples.ExtTest.TDStruncatednormal.mos \
7373
PNlib.Examples.ExtTest.TDSdiscrete.mos \
7474
PNlib.Examples.ExtTest.TFDStest.mos \
75-
PNlib.Examples.ExtTest.TEStest.mos \
75+
PNlib.Examples.ExtTest.TESTest.mos \
7676
PNlib.Examples.ExtTest.NoTokens.mos \
7777
PNlib.Examples.HybTest.ConflictPrio.mos \
7878
PNlib.Examples.HybTest.ConflictProb.mos \
@@ -113,8 +113,6 @@ CLEAN = `ls | grep -w -v -f deps.tmp`
113113
test:
114114
@echo
115115
@echo Running tests...
116-
@echo
117-
@echo "OPENMODELICAHOME = $(OPENMODELICAHOME)"
118116
@$(TEST) $(TESTFILES)
119117

120118
# Cleans all files that are not listed as dependencies
@@ -137,5 +135,4 @@ getdeps:
137135
failingtest:
138136
@echo
139137
@echo Running failing tests...
140-
@echo
141138
@$(TEST) $(FAILINGTESTFILES)

0 commit comments

Comments
 (0)