Fork and rename project to mcd #2
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: | | |
sudo apt-get -y update | |
sudo apt-get -y install pkg-config libsystemd-dev ethtool socat 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: | | |
./autogen.sh | |
./configure --prefix= --enable-test | |
- name: Build | |
run: | | |
make V=1 | |
- name: Install | |
run: | | |
DESTDIR=~/tmp make install-strip | |
tree ~/tmp | |
ldd ~/tmp/sbin/mcd | |
size ~/tmp/sbin/mcd | |
~/tmp/sbin/mcd -h | |
~/tmp/sbin/mctl -h | |
- name: Test | |
run: | | |
make check || (cat test/test-suite.log; false) | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mcd-test-${{ matrix.compiler }} | |
path: test/* |