Skip to content

Commit ebf4742

Browse files
committed
fix continuous integration
1 parent 8dace5d commit ebf4742

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

.github/moparser.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "moparser",
5+
"pattern": [
6+
{
7+
"regexp": "^syntax\\s(error)\\son\\s\\line\\s(\\d+)\\sof\\s(.*):\\s(.*)$",
8+
"file": 3,
9+
"line": 2,
10+
"severity": 1,
11+
"message": 4
12+
}
13+
]
14+
}
15+
]
16+
}

.github/workflows/main.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,25 @@ on:
1010

1111
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1212
jobs:
13-
# This workflow contains a single job called "parse"
14-
parse:
13+
# This workflow contains a single job called "syntax_check"
14+
syntax_checks:
15+
timeout-minutes: 5
1516
runs-on: ubuntu-latest
16-
container: openmodelica/moparser:3.4
17-
# Steps represent a sequence of tasks that will be executed as part of the job
1817
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v2
21-
- name: Parse the library
22-
run: moparser -v 3.4 -r Physiolibrary
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 5
22+
- name: Get moparser
23+
run: git clone --depth=1 https://github.com/modelica-tools/ModelicaSyntaxChecker
24+
- name: Check file encoding
25+
run: "! find . -name '*.mo' -exec bash -c 'iconv -o /dev/null -f utf8 -t utf8 \"{}\" |& sed \"s,^,{}: ,\"' ';' | grep '.'"
26+
- name: Check for UTF-8 BOM
27+
run: "! find . -name '*.mo' -print0 | xargs -0 grep -l $'^\\xEF\\xBB\\xBF' | grep ."
28+
- name: Check syntax
29+
run: |
30+
echo "::add-matcher::./.github/moparser.json"
31+
ModelicaSyntaxChecker/Linux64/moparser -v 3.6 -r Physiolibrary
32+
echo "::remove-matcher owner=moparser::"
33+
34+

0 commit comments

Comments
 (0)