Skip to content

Commit

Permalink
Merge pull request #112 from myriadrf/develop
Browse files Browse the repository at this point in the history
Update stable branch for tagged release
  • Loading branch information
rjonaitis authored Jan 28, 2025
2 parents b458fa1 + 83d044e commit b6787bb
Show file tree
Hide file tree
Showing 437 changed files with 14,404 additions and 117,446 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 2
INSTALL_PREFIX: ${{github.workspace}}/deps
CMAKE_OPTIONS: -DINSTALL_KERNEL_MODULE=0 -DENABLE_UDEV_RULES=0
CMAKE_OPTIONS:

jobs:
build-Linux:
Expand All @@ -27,9 +26,8 @@ jobs:
- uses: actions/checkout@v4

- name: Install GNURadio
if: ${{ matrix.os == 'ubuntu-22.04'}}
if: ${{ matrix.os != 'ubuntu-20.04'}} # 20.04 has GNURadio 3.8.1, it's python bindings are not using pybind11, so not compatible
run: |
sudo add-apt-repository ppa:gnuradio/gnuradio-releases
sudo apt-get update
sudo apt-get install -qq gnuradio-dev python3-packaging
Expand All @@ -39,11 +37,14 @@ jobs:
sudo ${{github.workspace}}/install_dependencies.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}} -DCMAKE_UNITY_BUILD=false

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}

- name: Install
run: sudo cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} --target install

build-Windows:
name: Windows build
runs-on: windows-latest
Expand All @@ -70,6 +71,9 @@ jobs:
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}

- name: Install
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} --target install

build-MacOS:
name: MacOS build
runs-on: macos-latest
Expand All @@ -78,11 +82,10 @@ jobs:

- name: Install dependencies
# GNURadio plugin fails to build due to issues with spdlog dependency
# gnuradio pybind11 castxml
run: brew install wxwidgets soapysdr
run: brew install wxwidgets soapysdr gnuradio pybind11 castxml

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}} -DCMAKE_UNITY_BUILD=false

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}
35 changes: 17 additions & 18 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
clang-format:
runs-on: [ubuntu-latest]
runs-on: [ubuntu-22.04]

steps:
- uses: actions/checkout@v4
Expand All @@ -22,22 +22,16 @@ jobs:
- name: Run clang-format
run: |
before="${{ github.event.pull_request.base.sha }}"
if [ "$before" == "" ]; then
before="${{ github.event.before }}"
clang-format --version
base_hash="${{ github.event.pull_request.base.sha }}"
# if base is not provided, do whole source formatting
if [ "$base_hash" == "" ]; then
base_hash=$(git rev-list --max-parents=0 HEAD)
fi
diff=$(git-clang-format --diff --commit "$before")
[ "$diff" = "no modified files to format" ] && exit 0
[ "$diff" = "clang-format did not modify any files" ] && exit 0
printf "\033[1mYou have introduced coding style breakages, suggested changes:\n\n"
echo "$diff" | colordiff
exit 1
./clang-format-all.sh "$base_hash"
cmake-format:
runs-on: [ubuntu-latest]
runs-on: [ubuntu-22.04]

steps:
- uses: actions/checkout@v4
Expand All @@ -49,16 +43,21 @@ jobs:
- name: Run cmake-format
run: |
cmake-format --version
cmake-format --check $(find ${{github.workspace}} -name CMakeLists.txt)
code=$?
if [[ $code != 0 ]]; then
exit 1
if [[ $code == 0 ]]; then
exit 0
fi
exit 0
# show why the formatting changes, for some reason local formatting not always match repo formatting
cmake-format -i $(find ${{github.workspace}} -name CMakeLists.txt)
git diff
exit 1
clang-tidy:
if: false # skip job until it's properly setup to be runnable locally
runs-on: [ubuntu-24.04] # Change to ubuntu-latest when that changes over
runs-on: [ubuntu-22.04] # Change to ubuntu-latest when that changes over

steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/gtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
# BUILD_TYPE: Release
BUILD_TYPE: Debug
CMAKE_BUILD_PARALLEL_LEVEL: 2
INSTALL_PREFIX: ${{github.workspace}}/deps

jobs:
build:
Expand All @@ -37,13 +36,8 @@ jobs:
if: matrix.os == 'macos-latest'
run: brew install libusb

- name: Configure CMake (windows)
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DFX3_SDK_RELATIVE_PATH=deps/FX3SDK -DBUILD_SHARED_LIBS=OFF -DENABLE_UNIT_TESTS=on

- name: Configure CMake (linux)
if: matrix.os != 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DBUILD_SHARED_LIBS=OFF -DBINARY_OUTPUT_DIR=${{github.workspace}}/build/bin/ -DENABLE_CODE_COVERAGE=0 -DENABLE_UNIT_TESTS=on
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DENABLE_UNIT_TESTS=on -DBUILD_GUI=off

- name: Build tests
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target gtest-runner
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Packaging

on:
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 2
CMAKE_OPTIONS:

jobs:
debian:
name: Package Debian
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04]

steps:
- uses: actions/checkout@v4
# need subdirectory, because building packages will place them one directory up
with:
path: 'source'

- name: Install GNURadio
if: ${{ matrix.os != 'ubuntu-20.04'}} # 20.04 has GNURadio 3.8.1, it's python bindings are not using pybind11, so not compatible
run: |
sudo apt-get update
sudo apt-get install -qq gnuradio-dev devscripts
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install debhelper dh-python dkms
sudo ${{github.workspace}}/source/install_dependencies.sh
# dh-dkms was split into separate package
- name: Install dh-dkms
if: ${{ matrix.os == 'ubuntu-24.04'}}
run: |
sudo apt-get install dh-dkms
- name: Set Debian variables
run: |
cd ${{github.workspace}}/source
source /etc/os-release
export DEBFULLNAME="Lime Microsystems"
export DEBEMAIL="[email protected]"
echo "ubuntu_codename=$UBUNTU_CODENAME" >> $GITHUB_ENV
cd debian
./set_debian_changelog_codenames.sh $UBUNTU_CODENAME
- name: Build
run: |
cd ${{github.workspace}}/source
export DEB_BUILD_OPTIONS="noautodbgsym"
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
dpkg-buildpackage --no-sign
- name: Archive packaging artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ubuntu_codename }}
retention-days: 2
path: |
${{github.workspace}}/*.tar.xz
${{github.workspace}}/*.dsc
${{github.workspace}}/*.deb
${{github.workspace}}/*.ddeb
Loading

0 comments on commit b6787bb

Please sign in to comment.