Skip to content

IEC-104 server and client updates #53

IEC-104 server and client updates

IEC-104 server and client updates #53

Workflow file for this run

name: Build and test C++ bennu and deb for pybennu
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: checkout the repo
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y build-essential cmake g++ gcc libasio-dev libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-python-dev libboost-system-dev libboost-thread-dev libfreetype6-dev libssl-dev libzmq5-dev python3-pip python3-wheel
sudo gem install fpm
- name: configure bennu
run: |
mkdir build
cd build/
cmake ../
- name: build bennu
run: |
cd build/
make -j$(nproc)
- name: test bennu
run: |
cd build/
sudo make install
sudo ldconfig
bennu-test-ep-server --d 1 >ep.out 2>&1 &
bennu-field-device --f ../data/configs/ep/dnp3-server.xml >fd-server.out 2>&1 &
bennu-field-device --f ../data/configs/ep/dnp3-client.xml >fd-client.out 2>&1 &
sleep 5
bennu-probe --c query >probe.out
grep "brkr" probe.out
sleep 10
bennu-probe --c read --t brkr >>probe.out
bennu-probe --c read --t load-power >>probe.out
sleep 3
cat probe.out
grep "brkr:true" probe.out
grep "load-power:400.5" probe.out
bennu-probe --c write --t load-breaker-toggle --s false >>probe.out
bennu-probe --c write --t load-mw-setpoint --v 999 >>probe.out
sleep 8
bennu-probe --c read --t brkr >>probe.out
bennu-probe --c read --t load-power >>probe.out
sleep 3
cat probe.out
grep "brkr:false" probe.out
grep "load-power:999" probe.out
echo -e "help\nexit" | bennu-brash >brash.out 2>&1
grep "SCEPTRE Field-Device" brash.out
bennu-watcherd --help
bennu-simulink-provider --help
bennu-field-deviced --help
bennu-simulink-provider-helics --help
- name: build deb for bennu
run: |
cd build/
sudo make package
cp ./*.deb ../bennu.deb
- name: build deb for pybennu
run: |
cd src/pybennu
sudo make deb
cp ./dist/*.deb ../../pybennu.deb
- name: archive deb artifacts
uses: actions/upload-artifact@v4
with:
name: bennu-deb-artifacts
if-no-files-found: error
path: |
bennu.deb
pybennu.deb
- name: deb file metadata
run: |
dpkg-deb --info ./bennu.deb
dpkg-deb --info ./pybennu.deb
- name: check bennu deb installs
run: |
sudo dpkg -i bennu.deb
- name: check pybennu deb installs
run: |
sudo dpkg -i pybennu.deb
- name: release debs to apt repo
if: (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) || (github.event_name == 'push' && github.ref == 'refs/heads/main')
run: |
curl -F [email protected] https://${{ secrets.GEMFURY }}@push.fury.io/sceptre/
curl -F [email protected] https://${{ secrets.GEMFURY }}@push.fury.io/sceptre/