Next 2 #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Conan installation | |
id: conan | |
uses: turtlebrowser/get-conan@v1.2 | |
- name: Install platform deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y mosquitto mosquitto-clients | |
sudo mosquitto -d -c /etc/mosquitto/mosquitto.conf | |
echo "loguru paho-mqtt pyserial pyudev pymodbus" | xargs -n1 > requirements.txt | |
pip install -r requirements.txt | |
- name: Fetch platform | |
uses: actions/checkout@v3 | |
with: | |
repository: 'Panduza/panduza-py' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: panduza-py | |
ref: 28-remonter-de-la-consommation-courante-hm310t | |
- name: Run platform | |
run: | | |
sudo mkdir -p /etc/panduza/log | |
sudo chown -R $(whoami):$(whoami) /etc/panduza | |
cd panduza-py | |
pip install -e ./platform | |
nohup python3 platform/deploy/pza-py-platform-run.py ../test/tree.json & | |
- name: Build Debug and Test | |
run: | | |
rm -rf build | |
./scripts/build.sh | |
cd build | |
make test | |
- name: Build Release and Test | |
run: | | |
rm -rf build | |
./scripts/build.sh Release | |
cd build | |
make test |