From e64e4dccb0342155ba28229eead9b6a348817fd6 Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 22:10:35 +0800 Subject: [PATCH 1/7] build both arm and x86_64 for osx, upload artifact --- .github/workflows/cmake.yml | 45 +++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 85c13ceb..9d89f627 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -167,7 +167,15 @@ jobs: path: SDDC_SOAPY.ZIP build-on-macos: - runs-on: macos-latest + name: build-on-macos + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: macos-latest + arch: x86_64 + - os: macos-14-arm64 + arch: arm64 steps: - name: Checkout code uses: actions/checkout@v4 @@ -178,13 +186,32 @@ jobs: brew install soapysdr brew install fftw - - name: Build SoapySDR Module + - name: Configure and Install SoapySDR Module + shell: bash + working-directory: ${{ runner.workspace }} run: | - mkdir -p build - cd build - cmake -DCMAKE_INSTALL_PREFIX=$(brew --prefix) .. - sudo make install - - - name: Check SoapySDR Installation + set -euo pipefail + build_dir="${{ runner.workspace }}/build-${{ matrix.arch }}" + install_dir="${{ runner.workspace }}/install/${{ matrix.arch }}" + mkdir -p "${build_dir}" + cd "${build_dir}" + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX="${install_dir}" + cmake --build . --config $BUILD_TYPE --target install + + - name: Package SoapySDR Module + shell: bash run: | - SoapySDRUtil --info + install_dir="${{ runner.workspace }}/install/${{ matrix.arch }}" + archive="SDDC_SOAPY_${{ matrix.arch }}.zip" + if [ -d "${install_dir}" ]; then + zip -r "${archive}" "${install_dir}" + else + echo "Install dir not found: ${install_dir}" >&2 + exit 1 + fi + + - name: Upload SoapySDR Package + uses: actions/upload-artifact@v4 + with: + name: soapy-package-${{ matrix.arch }} + path: SDDC_SOAPY_${{ matrix.arch }}.zip \ No newline at end of file From 845c72872903a86633819f4483858470630b0abf Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 22:18:40 +0800 Subject: [PATCH 2/7] Fix os --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9d89f627..2e1833ba 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -172,9 +172,9 @@ jobs: strategy: matrix: include: - - os: macos-latest + - os: macos-15-intel arch: x86_64 - - os: macos-14-arm64 + - os: macos-latest arch: arm64 steps: - name: Checkout code From 5e45114f17ed304528b5cc9f3ca0e8f98541beac Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 22:29:00 +0800 Subject: [PATCH 3/7] Fix macos build for arm64 --- Core/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 6c9fa6f2..646dd72c 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -25,8 +25,15 @@ else() message(STATUS "Compiling for Neon") list(FILTER SRC EXCLUDE REGEX "fft_mt_r2iq_avx.*") list(APPEND SRC fft_mt_r2iq_neon.cpp) - set_source_files_properties(fft_mt_r2iq_neon.cpp PROPERTIES COMPILE_FLAGS -mfpu=neon-vfpv4) - set_source_files_properties(pffft/pf_mixer.cpp PROPERTIES COMPILE_FLAGS "-D PFFFT_ENABLE_NEON -mfpu=neon-vfpv4 -Wno-strict-aliasing") + # On Apple Silicon (arm64) clang does not accept '-mfpu='; NEON is enabled by default. + if(APPLE) + # Don't pass -mfpu to Apple clang; only enable PFFFT's NEON code path and relax strict-aliasing warnings + set_source_files_properties(fft_mt_r2iq_neon.cpp PROPERTIES COMPILE_FLAGS "") + set_source_files_properties(pffft/pf_mixer.cpp PROPERTIES COMPILE_FLAGS "-D PFFFT_ENABLE_NEON -Wno-strict-aliasing") + else() + set_source_files_properties(fft_mt_r2iq_neon.cpp PROPERTIES COMPILE_FLAGS -mfpu=neon-vfpv4) + set_source_files_properties(pffft/pf_mixer.cpp PROPERTIES COMPILE_FLAGS "-D PFFFT_ENABLE_NEON -mfpu=neon-vfpv4 -Wno-strict-aliasing") + endif() else() message(FATAL_ERROR "Unable to identify CPU: ${CMAKE_SYSTEM_PROCESSOR}") endif() From 064e71115d768e1de86ac18f292ac776befd7137 Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 22:42:58 +0800 Subject: [PATCH 4/7] Update filename --- .github/workflows/cmake.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2e1833ba..aeda0a4f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -159,12 +159,12 @@ jobs: - name: Create Package shell: bash - run: zip SDDC_SOAPY.ZIP ${{runner.workspace}}/build/SoapySDDC/libSDDCSupport.so + run: zip SDDC_SOAPY_Linux_x86_64.ZIP ${{runner.workspace}}/build/SoapySDDC/libSDDCSupport.so - uses: actions/upload-artifact@v4 with: name: soapy-package - path: SDDC_SOAPY.ZIP + path: SDDC_SOAPY_Linux_x86_64.ZIP build-on-macos: name: build-on-macos @@ -202,9 +202,11 @@ jobs: shell: bash run: | install_dir="${{ runner.workspace }}/install/${{ matrix.arch }}" - archive="SDDC_SOAPY_${{ matrix.arch }}.zip" + archive="SDDC_SOAPY_OSX_${{ matrix.arch }}.zip" if [ -d "${install_dir}" ]; then - zip -r "${archive}" "${install_dir}" + # Create the archive from inside the install dir so the archive + # contains the module files without the leading install/... path. + (cd "${install_dir}" && zip -r "${{ runner.workspace }}/${archive}" .) else echo "Install dir not found: ${install_dir}" >&2 exit 1 @@ -214,4 +216,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: soapy-package-${{ matrix.arch }} - path: SDDC_SOAPY_${{ matrix.arch }}.zip \ No newline at end of file + path: SDDC_SOAPY_OSX_${{ matrix.arch }}.zip \ No newline at end of file From fd3b233da5427b29256849b89b73d0efb0828b83 Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 22:47:49 +0800 Subject: [PATCH 5/7] Update windows image --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index aeda0a4f..642c16c2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -45,7 +45,7 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-2019 + runs-on: windows-latest needs: build-firmware steps: From 7ca60ae7aa89fac70bd12a019d17282a671fdb16 Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 23:02:30 +0800 Subject: [PATCH 6/7] Update vs version --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 642c16c2..ab948dbc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -67,7 +67,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 16 2019" -A Win32 + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 17 2022" -A Win32 - uses: actions/download-artifact@v4 with: @@ -85,7 +85,7 @@ jobs: - name: Configure CMake64 shell: bash working-directory: ${{runner.workspace}}/build64 - run: cmake $GITHUB_WORKSPACE "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 16 2019" + run: cmake $GITHUB_WORKSPACE "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 17 2022" - name: Build working-directory: ${{runner.workspace}}/build64 From 381b7933d7a1ea847f76ca45c3e8c84461244868 Mon Sep 17 00:00:00 2001 From: Howard Su Date: Sat, 1 Nov 2025 23:07:58 +0800 Subject: [PATCH 7/7] Update file upload path --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ab948dbc..36814ec3 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -216,4 +216,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: soapy-package-${{ matrix.arch }} - path: SDDC_SOAPY_OSX_${{ matrix.arch }}.zip \ No newline at end of file + path: ${{ runner.workspace }}/SDDC_SOAPY_OSX_${{ matrix.arch }}.zip \ No newline at end of file