2021-07-27 03:00:34 +05:30
|
|
|
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:
|
2021-11-22 19:48:28 +05:30
|
|
|
- name: Install dependencies
|
2021-07-27 03:00:34 +05:30
|
|
|
run: |
|
2021-11-22 09:32:28 +05:30
|
|
|
sudo apt-get -y update
|
2022-05-29 19:17:37 +05:30
|
|
|
sudo apt-get -y install tree tshark valgrind
|
2023-04-22 12:48:07 +05:30
|
|
|
- uses: actions/checkout@v3
|
2021-11-22 20:19:08 +05:30
|
|
|
- name: Configure
|
2021-07-27 03:00:34 +05:30
|
|
|
run: |
|
2021-11-22 15:05:56 +05:30
|
|
|
set -x
|
2021-07-27 03:00:34 +05:30
|
|
|
./autogen.sh
|
2021-11-22 15:05:56 +05:30
|
|
|
mkdir -p build/dir
|
|
|
|
cd build/dir
|
2021-11-22 20:23:51 +05:30
|
|
|
../../configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system
|
2021-11-22 15:31:26 +05:30
|
|
|
chmod -R a+w .
|
2021-11-22 20:19:08 +05:30
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cd build/dir
|
2021-11-22 19:48:28 +05:30
|
|
|
make
|
|
|
|
- name: Install Check
|
2021-07-27 03:00:34 +05:30
|
|
|
run: |
|
2021-11-22 20:12:30 +05:30
|
|
|
cd build/dir
|
2021-11-22 20:23:51 +05:30
|
|
|
make V=1 install-strip
|
2022-12-09 23:40:36 +05:30
|
|
|
tree /tmp || true
|
2021-07-27 03:13:01 +05:30
|
|
|
ldd /tmp/sbin/syslogd
|
|
|
|
size /tmp/sbin/syslogd
|
|
|
|
/tmp/sbin/syslogd -?
|
2021-11-22 19:48:28 +05:30
|
|
|
- name: Build Example
|
2021-07-27 03:00:34 +05:30
|
|
|
run: |
|
2021-07-27 03:13:01 +05:30
|
|
|
mkdir -p /tmp/example
|
|
|
|
cp -a example/example.* /tmp/example/
|
|
|
|
pushd /tmp/example/
|
|
|
|
PKG_CONFIG_LIBDIR=/tmp/lib/pkgconfig make -f example.mk
|
2021-07-27 03:00:34 +05:30
|
|
|
popd
|
2021-11-22 19:48:28 +05:30
|
|
|
- name: Run Tests
|
2021-07-27 03:00:34 +05:30
|
|
|
run: |
|
2021-11-22 20:12:30 +05:30
|
|
|
cd build/dir
|
2021-11-22 19:48:28 +05:30
|
|
|
make check || (cat test/test-suite.log; false)
|
2022-05-29 19:13:37 +05:30
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-05-29 19:54:34 +05:30
|
|
|
name: ${{ matrix.compiler }}-test-logs
|
|
|
|
path: build/dir/test/*.log
|