-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (52 loc) · 1.91 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build
on: [push, workflow_dispatch]
jobs:
build-on-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Configure and build
run: |
cmake . -B build -DFMU4CPP_BUILD_TESTS=ON
cmake --build build
- name: "Read model name"
run: |
echo "MODEL_PATH=$(cat build/model.txt)" >> $GITHUB_ENV
- name: Download and run FMUchecker
run: |
wget https://github.com/modelica-tools/FMUComplianceChecker/releases/download/2.0.4/FMUChecker-2.0.4-linux64.zip
7z x FMUChecker-2.0.4-linux64.zip && cd FMUChecker-2.0.4-linux64
./fmuCheck.linux64 ../build/${{ env.MODEL_PATH }}/${{ env.MODEL_PATH }}.fmu
- name: Test
run: |
cd build/export/tests
ctest --output-on-failure
build-on-windows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: "Configure and build"
run: |
cmake . -B build -DFMU4CPP_BUILD_TESTS=ON -A x64
cmake --build build --config Release
- name: "Read model name"
run: |
echo "MODEL_PATH=$(cat build/model.txt)" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: "Download and run FMUChecker"
run: |
Invoke-WebRequest -Uri "https://github.com/modelica-tools/FMUComplianceChecker/releases/download/2.0.4/FMUChecker-2.0.4-win64.zip" -OutFile "FMUChecker-2.0.4-win64.zip"
Expand-Archive -Path "FMUChecker-2.0.4-win64.zip" -DestinationPath "." -Force
cd "FMUChecker-2.0.4-win64"
./fmuCheck.win64.exe "../build/${env:MODEL_PATH}/${env:MODEL_PATH}.fmu"
- name: Test
run: |
cd build/export/tests
ctest -C Release --output-on-failure