diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9e29e0f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,55 @@ +name: Bob the Builder + +# Run on all branches, including all pull requests, except the 'dev' +# branch since that's where we run Coverity Scan (limited tokens/day) +on: + push: + branches: + - '**' + - '!dev' + pull_request: + branches: + - '**' + +jobs: + build: + # Verify we can build on latest Ubuntu with both gcc and clang + name: ${{ matrix.compiler }} + strategy: + matrix: + compiler: [gcc, clang] + fail-fast: false + runs-on: ubuntu-latest + env: + MAKEFLAGS: -j3 + CC: ${{ matrix.compiler }} + steps: + - name: Install build dependencies ... + run: | + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq -y tree tshark + - uses: actions/checkout@v2 + - name: Configure + run: | + ./autogen.sh + ./configure --prefix= + - name: Build + run: | + make V=1 + - name: Install + run: | + make V=1 DESTDIR=~/tmp install-strip + tree ~/tmp + ldd ~/tmp/sbin/syslogd + size ~/tmp/sbin/syslogd + ~/tmp/sbin/syslogd -? + - name: Example w/ libsyslog + run: | + mkdir -p ~/tmp/example + cp -a example/example.* ~/tmp/example/ + pushd ~/tmp/example/ + PKG_CONFIG_LIBDIR=~/tmp/lib/pkgconfig make -f example.mk + popd + - name: Unit tests + run: | + sudo make check || (cat test/start.log; cat test/remote.log; false) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index 8f7e295..0000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: C/C++ CI - -on: [push] - -jobs: - build: - name: sysklogd ci - runs-on: ubuntu-latest - - steps: - - name: Update packagage cache ... - run: sudo apt-get update - - name: Install build dependencies ... - run: sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq -y tree tshark - - uses: actions/checkout@v1 - - name: Generate and run configure script ... - run: ./autogen.sh && ./configure --disable-silent-rules - - name: Build project ... - run: make - - name: Run project unit tests ... - run: sudo make check || (cat cat test/start.log; cat test/remote.log; false) -# - name: clang-tidy check -# uses: muxee/clang-tidy-action@0.0.1-rc1 -# - name: SonarCloud Scan -# uses: SonarSource/sonarcloud-github-action@v1.1 - - name: Check project installation ... - run: make install-strip DESTDIR=/tmp/tok; tree /tmp/tok -