Skip to content

Commit

Permalink
Update CI and docker images when reverting cmake (rscada#177, rscada#176
Browse files Browse the repository at this point in the history
)
  • Loading branch information
f-skold committed Jul 19, 2020
1 parent e1f4dbd commit b15f976
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
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*
56 changes: 56 additions & 0 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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 devscripts 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
14 changes: 14 additions & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# docker build . -f Dockerfile.deb -t deb_builder

FROM ubuntu

RUN apt update -y && apt 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
18 changes: 18 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# docker build . -f Dockerfile.test -t test_builder

FROM ubuntu

RUN apt update -y && \
apt install -y gcc g++ make && \
apt-get install -y autoconf libtoolw
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

0 comments on commit b15f976

Please sign in to comment.