From b9deecbe98d9b398450a6326d97df740af486d4f Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sun, 25 Jan 2026 17:54:45 +0100 Subject: [PATCH] Creating a GitHub action for build testing --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++++ ci/build.sh | 16 ++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100755 ci/build.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..8659704 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,27 @@ +name: Continuous integration + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + Test-Linux: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04] + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install libcap2-bin lcov autoconf automake libtool + + - name: Build + run: | + ci/build.sh \ No newline at end of file diff --git a/ci/build.sh b/ci/build.sh new file mode 100755 index 0000000..3bfea9a --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -x + +PATH=$(pwd)/ci/build/bin:$PATH + +if [ ! -d ci ]; then + echo "you must run this in the root fping directory" >&2 + exit 1 +fi + +autoreconf --install +./configure --prefix=/opt/ftraceroute +make CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" + +sudo chown root src/ftraceroute +sudo chmod u+s src/ftraceroute \ No newline at end of file -- 2.43.0