Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/_build
/build
.git
.github
Dockerfile*
57 changes: 57 additions & 0 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: libmbus

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: build examples and tests
run: |
./build.sh
cd test && make
cd ..

- name: generate test frames
run: |
PROG=test/mbus_parse_hex
./test/generate-xml.sh test/test-frames $PROG
echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12"
./test/generate-xml.sh test/error-frames $PROG || true
./test/generate-xml.sh test/unsupported-frames $PROG || true

- name: install and run gcovr
run: sudo pip install gcovr && gcovr .

debian:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: install packages
run: |
sudo apt update -y
sudo apt install -y debhelper devscripts dh-autoreconf dpkg-dev fakeroot
- name: build debian package
run: |
./build-deb.sh
sudo dpkg -i ../*.deb
ls /usr/lib

# doc:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
# - name: build doxygen documentation
# run: sudo apt install -y doxygen
#
# - name: build doxygen documentation
# run: |
# rm -rf build || true
# mkdir build
# cd build
# cmake .. -DLIBMBUS_BUILD_DOCS=ON
# cmake --build . --target doc
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ os:

script:
- ./build.sh
- cd test && make && ./generate-xml.sh test-frames
- cd test && make && ./generate-xml.sh test/error-frames || true
- cd test && make && ./generate-xml.sh test/unsupported-frames || true
- cd test && make && cd ..
- PROG=test/mbus_parse_hex
- test/generate-xml.sh test/test-frames $PROG
- test/generate-xml.sh test/error-frames $PROG || true
- test/generate-xml.sh test/unsupported-frames $PROG || true
17 changes: 17 additions & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# docker build . -f Dockerfile.debian -t deb_builder

FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractiv

RUN apt-get update -y && \
apt-get install -y gcc g++ make && \
apt-get install -y autoconf libtool

# What package is debuild
RUN apt-get install -y gnupg dput dh-make devscripts lintian
COPY . /tmp
RUN cd /tmp && \
./build-deb.sh && \
ls -al . .. && \
cd .. && \
dpkg -i *.deb || true
19 changes: 19 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# docker build . -f Dockerfile.test -t test_builder

FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractiv

RUN apt update -y && \
apt install -y gcc g++ make && \
apt-get install -y autoconf libtool
COPY . /tmp
RUN cd /tmp && \
./build.sh && \
cd test && \
make && \
./generate-xml.sh test-frames/ ./mbus_parse_hex

RUN cd /tmp && \
echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" && \
./test/generate-xml.sh test/error-frames || true ; \
./test/generate-xml.sh test/unsupported-frames || true