Refactor 0d73105, act on return of supervisor script immediately #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
curl -sS https://deb.troglobit.com/pubkey.gpg | sudo apt-key add - | |
echo "deb [arch=amd64] https://deb.troglobit.com/debian stable main" \ | |
| sudo tee /etc/apt/sources.list.d/troglobit.list | |
sudo apt-get -y update | |
sudo apt-get -y install pkg-config libsystemd-dev libconfuse-dev \ | |
libuev-dev libite-dev | |
- 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: | | |
./autogen.sh | |
./configure --prefix=/tmp/wdog --sysconfdir=/etc --localstatedir=/var --enable-examples | |
- name: Build | |
run: | | |
make V=1 distcheck | |
make V=1 | |
- name: Install | |
run: | | |
sudo make install-strip | |
tree /tmp/wdog | |
ldd /tmp/wdog/sbin/watchdogd | |
LD_LIBRARY_PATH=/tmp/wdog/lib /tmp/wdog/sbin/watchdogd -h | |
LD_LIBRARY_PATH=/tmp/wdog/lib /tmp/wdog/bin/watchdogctl -h | |
- name: Test | |
run: | | |
LD_LIBRARY_PATH=/tmp/wdog/lib ./src/testit.sh | |
debian: | |
# Verify that Debian packages can be built | |
name: Debian Package | |
runs-on: ubuntu-latest | |
container: debian:stable | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Installing dependencies | |
run: | | |
apt-get update | |
apt-get install -y build-essential bison flex autoconf automake \ | |
pkg-config libconfuse-dev libsystemd-dev systemd \ | |
dpkg-dev debhelper devscripts wget curl debian-keyring | |
curl -sS https://deb.troglobit.com/pubkey.gpg | apt-key add - | |
echo "deb [arch=amd64] https://deb.troglobit.com/debian stable main" \ | |
| tee /etc/apt/sources.list.d/troglobit.list | |
apt-get update | |
apt-get install -y libuev-dev libite-dev | |
- name: Building Debian package | |
run: | | |
./autogen.sh | |
./configure | |
make distcheck | |
make package | |
echo "== watchdogd.changes ================================================" | |
cat ../watchdogd*.changes |