]> git.gsnw.org Git - ftraceroute.git/commitdiff
Creating a GitHub action for build testing
authorGerman Service Network <support@gsnw.de>
Sun, 25 Jan 2026 16:54:45 +0000 (17:54 +0100)
committerGerman Service Network <support@gsnw.de>
Sun, 25 Jan 2026 16:54:45 +0000 (17:54 +0100)
.github/workflows/ci.yaml [new file with mode: 0644]
ci/build.sh [new file with mode: 0755]

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644 (file)
index 0000000..8659704
--- /dev/null
@@ -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 (executable)
index 0000000..3bfea9a
--- /dev/null
@@ -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