92066b2b86
With the change in ubuntu-latest at GitHub, the behavior of the classic tree command has changed too. Just ignore any return code, the output is merely for our viewing pleasure -- ocular inspection. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
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 dependencies
|
|
run: |
|
|
sudo apt-get -y update
|
|
sudo apt-get -y install tree tshark valgrind
|
|
- uses: actions/checkout@v2
|
|
- name: Configure
|
|
run: |
|
|
set -x
|
|
./autogen.sh
|
|
mkdir -p build/dir
|
|
cd build/dir
|
|
../../configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system
|
|
chmod -R a+w .
|
|
- name: Build
|
|
run: |
|
|
cd build/dir
|
|
make
|
|
- name: Install Check
|
|
run: |
|
|
cd build/dir
|
|
make V=1 install-strip
|
|
tree /tmp || true
|
|
ldd /tmp/sbin/syslogd
|
|
size /tmp/sbin/syslogd
|
|
/tmp/sbin/syslogd -?
|
|
- name: Build Example
|
|
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: Run Tests
|
|
run: |
|
|
cd build/dir
|
|
make check || (cat test/test-suite.log; false)
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.compiler }}-test-logs
|
|
path: build/dir/test/*.log
|