Repository navigation
51 lines (44 loc) · 2.18 KB
/
Copy pathunitTest.yml
File metadata and controls
51 lines (44 loc) · 2.18 KB
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
name: SimulatorToFMU Tests
on: [push]
env:
SIMULATORTOFMUPATH: "/home/runner/work/SimulatorToFMU/SimulatorToFMU/simulatortofmu"
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.7"]
steps:
- uses: actions/checkout@v3
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: Copy Python libraries to /usr/lib/
run: |
sudo cp $SIMULATORTOFMUPATH/parser/libraries/modelica/SimulatorToFMU/Resources/Library/linux64/libpython37.so /usr/lib/
- name: Install OpenModelica
run: |
sudo apt-get update
sudo apt install -y wget gnupg lsb-release
curl -fsSL http://build.openmodelica.org/apt/openmodelica.asc | sudo gpg --dearmor -o /usr/share/keyrings/openmodelica-keyring.gpg
#echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/openmodelica.list > /dev/null
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt focal stable" | sudo tee /etc/apt/sources.list.d/openmodelica.list > /dev/null
sudo apt-get update
sudo apt install -y openmodelica
#for PKG in `apt-cache search "omlib-.*" | cut -d" " -f1`; do sudo apt-get install -y "$PKG"; done
sudo apt install omlibrary
- name: Install Python dependencies
run: |
$CONDA/bin/conda install -c anaconda jinja2
$CONDA/bin/conda install -c conda-forge pyfmi
- name: Set environment variables
run: |
echo "OPENMODELICALIBRARY=/home/runner/.openmodelica/libraries/" >> $GITHUB_ENV
echo "PYTHONPATH=$SIMULATORTOFMUPATH/parser/utilities:$PYTHONPATH" >> $GITHUB_ENV
- name: Run UnitTests
run: |
cd $SIMULATORTOFMUPATH/bin/
python runUnitTest.py