Skip to content

.github: update workflows #31

.github: update workflows

.github: update workflows #31

Workflow file for this run

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 }}
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
fail-fast: false
env:
MAKEFLAGS: -j3
CC: ${{ matrix.compiler }}
steps:
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install pkg-config libsystemd-dev bird2 ethtool keepalived tshark tree
- uses: actions/checkout@v4
- name: Configure
# Build in a sub-directory so we can safely set a+w on all
# directories. Needed for `make check` since it runs with
# root dropped and wants to write .trs and .log files.
run: |
set -x
./autogen.sh
./configure --prefix= --enable-rsrr --enable-test
make dist && archive=$(ls *.tar.gz)
if [ -n "$archive" -a -f "$archive" ]; then
tar xf "$archive"
dir=$(echo "$archive" |rev |cut -f3- -d. |rev)
cd "$dir"
fi
mkdir -p .build/dir
cd .build/dir
../../configure --prefix= --enable-rsrr --enable-test
chmod -R a+w .
- name: Build
run: |
make V=1
- name: Install
run: |
DESTDIR=~/tmp make install-strip
tree ~/tmp
ldd ~/tmp/sbin/pimdd
size ~/tmp/sbin/pimdd
ldd ~/tmp/sbin/pimctl
size ~/tmp/sbin/pimctl
sudo ~/tmp/sbin/pimdd -p ~/tmp/foo.pid -u ~/tmp/foo.sock
sleep 1
~/tmp/sbin/pimdd -h
sudo ~/tmp/sbin/pimctl -u ~/tmp/foo.sock -h
sudo ~/tmp/sbin/pimctl -u ~/tmp/foo.sock
sudo ~/tmp/sbin/pimctl -u ~/tmp/foo.sock kill
- name: Test
run: |
make check || (cat test/test-suite.log; false)
- name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: pimd-dense-test-${{ matrix.compiler }}
path: test/*