From 433b3c4219a2cff611c4cfe5967697e89872c034 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 23 Mar 2020 09:38:47 +0100 Subject: [PATCH] feat: add github actions * feat: add github actions * Update ccpp.yml * build: build and install deb in container * build: clean up --- .github/workflows/ccpp.yml | 20 ++++++++++++++++++++ build.sh | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml new file mode 100644 index 0000000..fcf122b --- /dev/null +++ b/.github/workflows/ccpp.yml @@ -0,0 +1,20 @@ +name: CMake + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: build examples and tests + run: rm -rf build || true && mkdir build && cd build && cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON && cmake --build . -j + + debian: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: build debian package + run: rm -rf build || true && mkdir build && cd build && cmake .. -DLIBMBUS_PACKAGE_DEB=ON && cpack .. && sudo dpkg -i *.deb && ls /usr/lib diff --git a/build.sh b/build.sh index d4ce3c7..2179070 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,17 @@ #!/bin/sh + rm -rf _build mkdir _build cd _build cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON cmake --build . + +# build deb + +# rm -rf _build +# mkdir _build +# cd _build +# cmake .. -DLIBMBUS_PACKAGE_DEB=ON +# cpack .. +# dpkg -i *.deb