-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.88 KB
/
build_linux.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
name: Linux
on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
build_linux:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- name: Install Mosquitto library
run: sudo apt-get install mosquitto
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install paho-mqtt
python -m pip install zserio
python -m pip install astroid==2.15.0
python -m pip install pylint==2.16.3
python -m pip install mypy==0.931
- name: Build Zserio Python Pub/Sub Paho Mqtt
run: |
zserio -src examples/calculator calculator.zs -python build/gen
mypy build/gen examples/calculator src
PYTHONPATH=build/gen pylint examples src \
--disable=missing-module-docstring,missing-function-docstring,duplicate-code,too-many-arguments \
--disable=too-few-public-methods,broad-exception-caught,unnecessary-lambda-assignment
- name: Test Zserio Python Pub/Sub Paho Mqtt
run: |
cd examples/calculator
python power_of_two_provider.py &
python square_root_of_provider.py &
sleep 10
echo -e "p\\n100\\nq" | python calculator_client.py | grep "square_root_of: 10.0"
echo -e "s\\n100\\nq" | python calculator_client.py | grep "power_of_two: 10000"
kill $(jobs -p)
env:
PYTHONDONTWRITEBYTECODE: 1
PYTHONPATH: "../../src:../../build/gen"