From 2a5d381f68fd05d5b3c0e7db56c36892ea99b4ae Mon Sep 17 00:00:00 2001
From: "Christian W. Zuckschwerdt" <christian@zuckschwerdt.org>
Date: Sun, 5 Oct 2025 16:33:48 +0200
Subject: [PATCH 12/12] Add GitHub build check action

---
 .github/workflows/build.yml | 59 ++++++++++++++++++++++++++++++++++++
 .travis.yml                 | 60 -------------------------------------
 README.md                   |  4 ---
 3 files changed, 59 insertions(+), 64 deletions(-)
 create mode 100644 .github/workflows/build.yml
 delete mode 100644 .travis.yml

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..62036f1
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,59 @@
+name: Build check
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+  macos_macports_build_job:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-14, macos-15]
+    runs-on: ${{ matrix.os }}
+    name: Build on ${{ matrix.os }} (macports)
+    steps:
+      - uses: actions/checkout@v4
+      - uses: melusina-org/setup-macports@v1
+      - name: Install ports
+        run: port install SoapySDR py310-setuptools uhd
+        # Note: MacPorts uhd depends on non-default boost171
+      - name: Configure
+        run:  BOOST_ROOT=/opt/local/libexec/boost/1.71 cmake -B build
+      - name: Build
+        run: cmake --build build
+
+  macos_homebrew_build_job:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-14, macos-15]
+    runs-on: ${{ matrix.os }}
+    name: Build on ${{ matrix.os }} (homebrew)
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup tools
+        run: brew install soapysdr uhd
+      - name: Configure
+        run: cmake -B build
+      - name: Build
+        run: cmake --build build
+
+  linux_build_job:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-22.04, ubuntu-24.04]
+    runs-on: ${{ matrix.os }}
+    name: Build on ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup tools
+        run: |
+          sudo apt-get update -q -y
+          sudo apt-get install -y --no-install-recommends cmake ninja-build
+          sudo apt-get install -q -y libsoapysdr-dev libuhd-dev
+      - name: Configure
+        run: cmake -GNinja -B build
+      - name: Build
+        run: cmake --build build
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 281ac35..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-########################################################################
-## Travis CI config for SoapyUHD
-##
-## * installs UHD from PPA
-## * installs SoapySDR from source
-## * matrix tests multiple UHD versions
-## * confirms build and install
-## * checks that drivers load
-########################################################################
-
-sudo: required
-dist: focal
-
-language: cpp
-compiler: gcc
-
-env:
-  global:
-    - INSTALL_PREFIX=/usr/local
-    - SOAPY_SDR_BRANCH=master
-  matrix:
-    - BUILD_TYPE=Debug
-    - BUILD_TYPE=Release
-
-before_install:
-  # regular ubuntu packages
-  - sudo add-apt-repository main
-  - sudo add-apt-repository universe
-
-  # driver development files from ppa
-  - sudo add-apt-repository -y ppa:ettusresearch/uhd
-
-  # update after package changes
-  - sudo apt-get update
-
-install:
-  #boost development files
-  - sudo apt-get install -qq libboost-all-dev
-
-  #sdr development files
-  - sudo apt-get install --no-install-recommends -q -y libuhd-dev
-
-  # install SoapySDR from source
-  - git clone https://github.com/pothosware/SoapySDR.git
-  - pushd SoapySDR
-  - git checkout ${SOAPY_SDR_BRANCH}
-  - mkdir build && cd build
-  - cmake ../ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF
-  - make && sudo make install
-  - popd
-
-script:
-  - mkdir build && cd build
-  - cmake ../ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
-  - make && sudo make install
-  # print info about the install
-  - export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}
-  - export PATH=${INSTALL_PREFIX}/bin:${PATH}
-  - SoapySDRUtil --info
-  - SoapySDRUtil --check=uhd
diff --git a/README.md b/README.md
index e15cd0e..921edc6 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,5 @@
 # Soapy SDR plugins for UHD devices
 
-## Build Status
-
-- Travis: [![Travis Build Status](https://travis-ci.org/pothosware/SoapyUHD.svg?branch=master)](https://travis-ci.org/pothosware/SoapyUHD)
-
 ## Dependencies
 
 * UHD - https://github.com/EttusResearch/uhd/wiki
-- 
2.47.3

