From 362e23bea06bb288c55646c9545d6f04fc69d619 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 13:53:45 +0000 Subject: [PATCH 01/29] Add github action to build Mac release --- .github/workflows/mac.yml | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/mac.yml diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml new file mode 100644 index 0000000000..21ec79cbbc --- /dev/null +++ b/.github/workflows/mac.yml @@ -0,0 +1,40 @@ +name: SDRangel Mac release build + +on: + push: + branches: + - mac_ci + tags: + - 'v*' + +jobs: + build_mac_arm: + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + - name: Configure SDRangel + run: | + mkdir build && cd build + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + - name: Build SDRangel on Mac + run: | + cd build + make -j3 all + - name: Build dmg + run: | + cd build + make package + - name: Get version + id: get_version + run: echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $env:GITHUB_OUTPUT + - name: Get filename + id: get_filename + run: echo "filename=$(grep CPACK_PACKAGE_FILE_NAME build/CMakeCache.txt | cut -d "=" -f2)" >> $GITHUB_OUTPUT + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: sdrangel-${{ steps.get_version.outputs.version }}-macarm.dmg + path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg From fceee074866f28583b65baea137d6df0efc44243 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 13:56:29 +0000 Subject: [PATCH 02/29] Remove nehalem for arm build --- .github/workflows/mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 21ec79cbbc..44e06f1e38 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -18,7 +18,7 @@ jobs: - name: Configure SDRangel run: | mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE - name: Build SDRangel on Mac run: | cd build From 46e8688de223f4cdb6df33b8906463c6f850c3ac Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 14:03:21 +0000 Subject: [PATCH 03/29] Install Qt 6 --- .github/workflows/mac.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 44e06f1e38..003765a4e7 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -15,6 +15,14 @@ jobs: with: submodules: true fetch-depth: 0 + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '6.7.3' + host: 'mac' + arch: 'clang_64' + setup-python: false + modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools' - name: Configure SDRangel run: | mkdir build && cd build From e5fa27ba9664d51fe94f93012af83ac5b581bdb6 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 14:34:48 +0000 Subject: [PATCH 04/29] Try removing setup-python --- .github/workflows/mac.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 003765a4e7..cf32298572 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -21,7 +21,6 @@ jobs: version: '6.7.3' host: 'mac' arch: 'clang_64' - setup-python: false modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools' - name: Configure SDRangel run: | From 11614b417bc98e1c63fd1508ba72ad7805e1c28c Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 14:50:06 +0000 Subject: [PATCH 05/29] Add brew subversion and nasm. Add qtwebchannel as appears to be needed by qtwebengine. --- .github/workflows/mac.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index cf32298572..0a95c88092 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -15,13 +15,17 @@ jobs: with: submodules: true fetch-depth: 0 + - name: Update brew + run: brew update + - name: Install brew packages + run: brew install nasm subversion - name: Install Qt uses: jurplel/install-qt-action@v4 with: version: '6.7.3' host: 'mac' arch: 'clang_64' - modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools' + modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools qtwebchannel' - name: Configure SDRangel run: | mkdir build && cd build From 7bab142af1d5347ecc1b7c5f7c9b766babc07b46 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 15:16:08 +0000 Subject: [PATCH 06/29] usrpoutput: add_dependencies needs to follow add_library --- plugins/samplesink/usrpoutput/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/samplesink/usrpoutput/CMakeLists.txt b/plugins/samplesink/usrpoutput/CMakeLists.txt index b0bd6dc8f3..6808a8f719 100644 --- a/plugins/samplesink/usrpoutput/CMakeLists.txt +++ b/plugins/samplesink/usrpoutput/CMakeLists.txt @@ -45,14 +45,14 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -if(UHD_EXTERNAL) - add_dependencies(${TARGET_NAME} uhd) -endif() if(NOT Qt6_FOUND) add_library(${TARGET_NAME} ${usrpoutput_SOURCES}) else() qt_add_plugin(${TARGET_NAME} CLASS_NAME USRPOutputPlugin ${usrpoutput_SOURCES}) endif() +if(UHD_EXTERNAL) + add_dependencies(${TARGET_NAME} uhd) +endif() if(NOT BUILD_SHARED_LIBS) set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) From f1241863664bb18cef9e98fd03c22c23aef32695 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 15:33:00 +0000 Subject: [PATCH 07/29] Add python packages for UHD --- .github/workflows/mac.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 0a95c88092..164cca72f2 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -19,6 +19,10 @@ jobs: run: brew update - name: Install brew packages run: brew install nasm subversion + - name: Install python packages for UHD + run: | + python3 -m pip install --upgrade pip + pip3 install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 with: From 3df03768d2219fbfb3b85d23b91288f48145c8d6 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 16:22:50 +0000 Subject: [PATCH 08/29] Is pip3 already installed? --- .github/workflows/mac.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 164cca72f2..8c3845abb8 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -20,9 +20,7 @@ jobs: - name: Install brew packages run: brew install nasm subversion - name: Install python packages for UHD - run: | - python3 -m pip install --upgrade pip - pip3 install numpy mako requests Cheetah3 setuptools + run: pip3 install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 with: From e35133b741bca935cc35a93875aa1db693827b29 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 16:28:29 +0000 Subject: [PATCH 09/29] Try pipx --- .github/workflows/mac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 8c3845abb8..052766ec94 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -18,9 +18,9 @@ jobs: - name: Update brew run: brew update - name: Install brew packages - run: brew install nasm subversion + run: brew install nasm subversion pipx - name: Install python packages for UHD - run: pip3 install numpy mako requests Cheetah3 setuptools + run: pipx install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 with: From d9f36dc5088d3831309141407bcce82fb4259cd9 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 16:41:05 +0000 Subject: [PATCH 10/29] Try venv --- .github/workflows/mac.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 052766ec94..873c8851b4 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -18,9 +18,12 @@ jobs: - name: Update brew run: brew update - name: Install brew packages - run: brew install nasm subversion pipx + run: brew install nasm subversion - name: Install python packages for UHD - run: pipx install numpy mako requests Cheetah3 setuptools + run: | + python3 -m venv .venv + source .venv/bin/activate + python3 -m pip install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 with: @@ -30,10 +33,12 @@ jobs: modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools qtwebchannel' - name: Configure SDRangel run: | + source .venv/bin/activate mkdir build && cd build cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE - name: Build SDRangel on Mac run: | + source .venv/bin/activate cd build make -j3 all - name: Build dmg From 9d3fe6e86ea02b012f62db733c22b118135b580c Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 17:13:19 +0000 Subject: [PATCH 11/29] Try DPYTHON_EXECUTABLE --- .github/workflows/mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 873c8851b4..2c984b2d39 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -35,7 +35,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=`pwd`/.venv/bin/python3 - name: Build SDRangel on Mac run: | source .venv/bin/activate From 868bfea65e5f3166f92beed1e670afb6a5bc9576 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 18:10:27 +0000 Subject: [PATCH 12/29] Disble USRP for now. --- .github/workflows/mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 2c984b2d39..60564f0fb8 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -35,7 +35,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=`pwd`/.venv/bin/python3 + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=OFF -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE - name: Build SDRangel on Mac run: | source .venv/bin/activate From e707d75624622d219be73fd48ed051287725c767 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 18:57:08 +0000 Subject: [PATCH 13/29] Update OpenCV as fails to compile with c++17 --- external/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 137e77f265..00f8150054 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -546,7 +546,7 @@ endif (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) if (NOT OpenCV_FOUND AND NOT USE_PRECOMPILED_LIBS AND ENABLE_CHANNELTX_MODATV) ExternalProject_Add(opencv GIT_REPOSITORY https://github.com/opencv/opencv.git - GIT_TAG 4.5.5 + GIT_TAG 4.10.0 DEPENDS "${FFMPEG_DEPENDS}" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/opencv" CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DWITH_FFMPEG=ON -DCMAKE_PREFIX_PATH=${FFMPEG_INSTALL_DIR} From 32a9144f55b2bf33ee353f837f4bb9542e0bd13d Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 21:12:15 +0000 Subject: [PATCH 14/29] Don't use absolute path, as build directory may be somewhere else. --- cmake/cpack/deploy_mac.cmake.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/cpack/deploy_mac.cmake.in b/cmake/cpack/deploy_mac.cmake.in index 20b45a21d8..d6015e85a3 100644 --- a/cmake/cpack/deploy_mac.cmake.in +++ b/cmake/cpack/deploy_mac.cmake.in @@ -1,14 +1,15 @@ # This CPACK_PRE_BUILD_SCRIPTS script is used to copy all required Qt and other 3rd party libraries (SDR drivers and codecs) in to the .app bundle # It is run in a staging area (${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app) after all targets have been installed (E.g. sdrangel exe and plugins) # The copying of frameworks and libraries is mostly done by 'macdeployqt', however, in order for 'macdeployqt' to copy libraries built by external/CMakeLists.txt, -# we first need to add RPATHs into the libraries giving the locations of any libraries they might depend on. +# we first need to add RPATHs into the libraries giving the locations of any libraries they might depend on. # These paths are in the variable MACOS_EXTERNAL_LIBS_FIXUP set in externals/CMakeLists.txt # Is there an easier way to this? # Copy executable that will be run when icon in /Applications is clicked message ("Copying default executable to SDRangel.app/Contents/MacOS/SDRangel") execute_process (COMMAND mkdir ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app/Contents/MacOS/) -execute_process (COMMAND cp /opt/build/sdrangel/build/sdrangel ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app/Contents/MacOS/SDRangel) +execute_process (COMMAND pwd) +execute_process (COMMAND cp sdrangel ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app/Contents/MacOS/SDRangel) # Add RPATHS to libraries so macdeployqt can find out and copy all dependencies From 5c41fe8342db6a4efff4f9b59f3c15c4a438998e Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 21:12:36 +0000 Subject: [PATCH 15/29] Build in one step, as faster --- .github/workflows/mac.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 60564f0fb8..1c4a0c502d 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -40,11 +40,7 @@ jobs: run: | source .venv/bin/activate cd build - make -j3 all - - name: Build dmg - run: | - cd build - make package + make -j3 package - name: Get version id: get_version run: echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $env:GITHUB_OUTPUT From 622958bdb5cb6dfbe9cafd3abf44907bfd11677e Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 21:16:19 +0000 Subject: [PATCH 16/29] Use hash for ci builds --- .github/workflows/mac.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 1c4a0c502d..0b812a1a4f 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -43,7 +43,12 @@ jobs: make -j3 package - name: Get version id: get_version - run: echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $env:GITHUB_OUTPUT + run: | + if [[ "${{github.ref_name}}" == "mac_ci" ]]; then + echo "version=${{github.sha}}" >> $GITHUB_OUTPUT + else + echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT + fi - name: Get filename id: get_filename run: echo "filename=$(grep CPACK_PACKAGE_FILE_NAME build/CMakeCache.txt | cut -d "=" -f2)" >> $GITHUB_OUTPUT From 0bfef9de143c0825825e5022cbd3d71a4b92ab9f Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 08:08:19 +0000 Subject: [PATCH 17/29] Add x64 build. Try to build DATV. --- .github/workflows/mac.yml | 54 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 0b812a1a4f..40d3b75d23 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -8,6 +8,56 @@ on: - 'v*' jobs: + build_mac_x64: + runs-on: macos-13 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + - name: Update brew + run: brew update + - name: Install brew packages + run: brew install nasm subversion + - name: Install python packages for UHD + run: | + python3 -m venv .venv + source .venv/bin/activate + python3 -m pip install numpy mako requests Cheetah3 setuptools + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '6.7.3' + host: 'mac' + arch: 'clang_64' + modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools qtwebchannel' + - name: Configure SDRangel + run: | + source .venv/bin/activate + mkdir build && cd build + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + - name: Build SDRangel on Mac + run: | + source .venv/bin/activate + cd build + make -j4 package + - name: Get version + id: get_version + run: | + if [[ "${{github.ref_name}}" == "mac_ci" ]]; then + echo "version=${{github.sha}}" >> $GITHUB_OUTPUT + else + echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT + fi + - name: Get filename + id: get_filename + run: echo "filename=$(grep CPACK_PACKAGE_FILE_NAME build/CMakeCache.txt | cut -d "=" -f2)" >> $GITHUB_OUTPUT + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: sdrangel-${{ steps.get_version.outputs.version }}-macx64.dmg + path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg + build_mac_arm: runs-on: macos-14 steps: @@ -35,7 +85,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=OFF -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE - name: Build SDRangel on Mac run: | source .venv/bin/activate @@ -55,5 +105,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: sdrangel-${{ steps.get_version.outputs.version }}-macarm.dmg + name: sdrangel-${{ steps.get_version.outputs.version }}-macarm64.dmg path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg From 28d0b73bc5565d288ccb7f0339385454070feb52 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 09:08:25 +0000 Subject: [PATCH 18/29] Install SDRplay API --- .github/workflows/mac.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 40d3b75d23..f3bf77b337 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -19,6 +19,10 @@ jobs: run: brew update - name: Install brew packages run: brew install nasm subversion + - name: Install SDRplay API + run: | + wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg + sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg - name: Install python packages for UHD run: | python3 -m venv .venv @@ -69,6 +73,10 @@ jobs: run: brew update - name: Install brew packages run: brew install nasm subversion + - name: Install SDRplay API + run: | + wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg + sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg - name: Install python packages for UHD run: | python3 -m venv .venv From 03f4dfe2e1cafea680e16441eb370482295f63af Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 09:11:32 +0000 Subject: [PATCH 19/29] Add target option --- .github/workflows/mac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index f3bf77b337..805ab64e51 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -22,7 +22,7 @@ jobs: - name: Install SDRplay API run: | wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg - sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg + sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target / - name: Install python packages for UHD run: | python3 -m venv .venv @@ -76,7 +76,7 @@ jobs: - name: Install SDRplay API run: | wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg - sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg + sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target / - name: Install python packages for UHD run: | python3 -m venv .venv From 8e81d3825a57ce5dcda56267740578cb3547d772 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 10:10:31 +0000 Subject: [PATCH 20/29] Update boost to latest release. 1.78 fails to build using c++17 Update UHD to 4.7 and set -DENABLE_PYTHON_API=OFF to try to remove runtime python requirement. --- .github/workflows/mac.yml | 6 ++++-- external/CMakeLists.txt | 13 ++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 805ab64e51..e169d439d5 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -39,7 +39,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE - name: Build SDRangel on Mac run: | source .venv/bin/activate @@ -81,6 +81,7 @@ jobs: run: | python3 -m venv .venv source .venv/bin/activate + which python3 python3 -m pip install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 @@ -92,8 +93,9 @@ jobs: - name: Configure SDRangel run: | source .venv/bin/activate + which python3 mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE - name: Build SDRangel on Mac run: | source .venv/bin/activate diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 00f8150054..7dade82a90 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -31,15 +31,9 @@ set(SOAPYSDR_REMOTE_TAG "soapy-remote-0.5.1") set(AIRSPY_TAG "37c768ce9997b32e7328eb48972a7fda0a1f8554") set(HACKRF_TAG "v2022.09.1") set(LIBXML2_TAG "v2.10.4") -set(UHD_TAG "v4.6.0.0") -if (APPLE AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64)) - # UHD fails to load with 1.80+ - set(BOOST_TAG "1.78.0") - set(BOOST_TAG2 "1_78_0") -else() - set(BOOST_TAG "1.83.0") - set(BOOST_TAG2 "1_83_0") -endif() +set(UHD_TAG "v4.7.0.0") +set(BOOST_TAG "1.86.0") +set(BOOST_TAG2 "1_86_0") # For some external project macros include(ExternalProject) @@ -1578,6 +1572,7 @@ if (WIN32 OR APPLE) -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_INCLUDE_DIR=${LIBUSB_INCLUDE_DIR} ${UHD_PYTHON_ARGS} + -DENABLE_PYTHON_API=OFF -DCMAKE_INSTALL_NAME_DIR=/lib TEST_COMMAND "" ) From 7a9b5ee068282ac304bc334b08d4ecaf5ac330c2 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 10:48:36 +0000 Subject: [PATCH 21/29] Try Python3_ROOT_DIR --- .github/workflows/mac.yml | 4 ++-- external/CMakeLists.txt | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index e169d439d5..39206cc36c 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -39,7 +39,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv - name: Build SDRangel on Mac run: | source .venv/bin/activate @@ -95,7 +95,7 @@ jobs: source .venv/bin/activate which python3 mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv - name: Build SDRangel on Mac run: | source .venv/bin/activate diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 7dade82a90..c66d3a6c8d 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1560,6 +1560,11 @@ if (WIN32 OR APPLE) else () set(UHD_PYTHON_ARGS "") endif () + if (DEFINED Python3_ROOT_DIR) + set(UHD_PYTHON_ARGS "-DPython3_ROOT_DIR=${Python3_ROOT_DIR}") + else () + set(UHD_PYTHON_ARGS "") + endif () ExternalProject_Add(uhd GIT_REPOSITORY https://github.com/EttusResearch/uhd.git GIT_TAG ${UHD_TAG} From a9dbfea8d1354b9b1b3c11c6c55310a280219573 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 11:16:00 +0000 Subject: [PATCH 22/29] Try bin --- .github/workflows/mac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 39206cc36c..8c939d4996 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -39,7 +39,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv/bin - name: Build SDRangel on Mac run: | source .venv/bin/activate @@ -95,7 +95,7 @@ jobs: source .venv/bin/activate which python3 mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv/bin - name: Build SDRangel on Mac run: | source .venv/bin/activate From 1653698f9930071fa9ad58f1b8df2dfb384d6f2f Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 11:37:55 +0000 Subject: [PATCH 23/29] Try -DPYTHON_EXECUTABLE again --- .github/workflows/mac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 8c939d4996..ca01b15b29 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -39,7 +39,7 @@ jobs: run: | source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv/bin + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=`pwd`/.venv/bin/python3 - name: Build SDRangel on Mac run: | source .venv/bin/activate @@ -95,7 +95,7 @@ jobs: source .venv/bin/activate which python3 mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPython3_ROOT_DIR=`pwd`/.venv/bin + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=`pwd`/.venv/bin/python3 - name: Build SDRangel on Mac run: | source .venv/bin/activate From ff56523865592d50b2794e50973ba4eb59c26386 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 11:43:28 +0000 Subject: [PATCH 24/29] Try Python3_FIND_FRAMEWORK=NEVER --- external/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index c66d3a6c8d..f0e13862f3 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1577,6 +1577,7 @@ if (WIN32 OR APPLE) -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_INCLUDE_DIR=${LIBUSB_INCLUDE_DIR} ${UHD_PYTHON_ARGS} + -DPython3_FIND_FRAMEWORK=NEVER -DENABLE_PYTHON_API=OFF -DCMAKE_INSTALL_NAME_DIR=/lib TEST_COMMAND "" From 1094874321ae891ff6bf393c3bf9f69d0f6b3038 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 12:46:53 +0000 Subject: [PATCH 25/29] Remove test code. --- external/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index f0e13862f3..619bbe7bcd 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1560,11 +1560,6 @@ if (WIN32 OR APPLE) else () set(UHD_PYTHON_ARGS "") endif () - if (DEFINED Python3_ROOT_DIR) - set(UHD_PYTHON_ARGS "-DPython3_ROOT_DIR=${Python3_ROOT_DIR}") - else () - set(UHD_PYTHON_ARGS "") - endif () ExternalProject_Add(uhd GIT_REPOSITORY https://github.com/EttusResearch/uhd.git GIT_TAG ${UHD_TAG} From 9bd001c9ed5b9abf407076f7a1120db401a2c85a Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 12:49:39 +0000 Subject: [PATCH 26/29] Update to github releases --- .github/workflows/mac.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index ca01b15b29..82ee222a27 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -61,8 +61,13 @@ jobs: with: name: sdrangel-${{ steps.get_version.outputs.version }}-macx64.dmg path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg + - name: Upload release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + files: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg - build_mac_arm: + build_mac_arm64: runs-on: macos-14 steps: - uses: actions/checkout@v4 @@ -117,3 +122,8 @@ jobs: with: name: sdrangel-${{ steps.get_version.outputs.version }}-macarm64.dmg path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg + - name: Upload release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + files: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg From 441c47c35f64b07053e36c10bc10499f2ff8634d Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 13:30:36 +0000 Subject: [PATCH 27/29] Install python manually. --- .github/workflows/mac.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 82ee222a27..968d371c53 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -23,11 +23,13 @@ jobs: run: | wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target / + - name: Install python + run: | + wget https://www.python.org/ftp/python/3.12.7/python-3.12.7-macos11.pkg + sudo installer -pkg python-3.12.7-macos11.pkg -target / - name: Install python packages for UHD run: | - python3 -m venv .venv - source .venv/bin/activate - python3 -m pip install numpy mako requests Cheetah3 setuptools + /usr/local/bin/python3.12 -m pip install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 with: @@ -37,12 +39,10 @@ jobs: modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools qtwebchannel' - name: Configure SDRangel run: | - source .venv/bin/activate mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=`pwd`/.venv/bin/python3 + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=/usr/local/bin/python3.12 - name: Build SDRangel on Mac run: | - source .venv/bin/activate cd build make -j4 package - name: Get version @@ -82,12 +82,13 @@ jobs: run: | wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target / + - name: Install python + run: | + wget https://www.python.org/ftp/python/3.12.7/python-3.12.7-macos11.pkg + sudo installer -pkg python-3.12.7-macos11.pkg -target / - name: Install python packages for UHD run: | - python3 -m venv .venv - source .venv/bin/activate - which python3 - python3 -m pip install numpy mako requests Cheetah3 setuptools + /usr/local/bin/python3.12 -m pip install numpy mako requests Cheetah3 setuptools - name: Install Qt uses: jurplel/install-qt-action@v4 with: @@ -97,13 +98,10 @@ jobs: modules: 'qtcharts qtscxml qt5compat qtlocation qtmultimedia qtpositioning qtserialport qtspeech qtwebsockets qtwebengine qtshadertools qtwebchannel' - name: Configure SDRangel run: | - source .venv/bin/activate - which python3 mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=`pwd`/.venv/bin/python3 + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_USRP=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=ON -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DPYTHON_EXECUTABLE=/usr/local/bin/python3.12 - name: Build SDRangel on Mac run: | - source .venv/bin/activate cd build make -j3 package - name: Get version From 4f36b21d2e82e7bfc0aa6d1cc911462dc4b7188f Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 16:28:23 +0000 Subject: [PATCH 28/29] Use macos-14 image to build on ARM which is twice as fast. --- .github/workflows/sdrangel.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sdrangel.yml b/.github/workflows/sdrangel.yml index ac770c5d50..817ff7013b 100644 --- a/.github/workflows/sdrangel.yml +++ b/.github/workflows/sdrangel.yml @@ -101,7 +101,7 @@ jobs: files: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe build_mac: - runs-on: macos-13 + runs-on: macos-14 steps: - uses: actions/checkout@v4 with: @@ -126,10 +126,7 @@ jobs: - name: Configure SDRangel run: | mkdir build && cd build - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=AUTO -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DCMAKE_PREFIX_PATH="/usr/local/opt/ffmpeg@5/" - - name: Get filename - id: get_filename - run: echo "filename=$(grep CPACK_PACKAGE_FILE_NAME build/CMakeCache.txt | cut -d "=" -f2)" >> $GITHUB_OUTPUT + cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DDEBUG_OUTPUT=ON -DENABLE_CHANNELRX_DEMODDATV=OFF -DENABLE_CHANNELTX_MODDATV=OFF -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=AUTO -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DCMAKE_PREFIX_PATH="/usr/local/opt/ffmpeg@5/" - name: Build SDRangel on Mac run: | cd build From 763438c7e5ad5d26c86bf6c3ead5fb179d3b7257 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Nov 2024 21:33:38 +0000 Subject: [PATCH 29/29] Use short sha --- .github/workflows/mac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 968d371c53..df580c66d0 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -49,7 +49,7 @@ jobs: id: get_version run: | if [[ "${{github.ref_name}}" == "mac_ci" ]]; then - echo "version=${{github.sha}}" >> $GITHUB_OUTPUT + echo "version=$(echo ${{github.sha}} | cut -c1-7)" >> $GITHUB_OUTPUT else echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT fi @@ -108,7 +108,7 @@ jobs: id: get_version run: | if [[ "${{github.ref_name}}" == "mac_ci" ]]; then - echo "version=${{github.sha}}" >> $GITHUB_OUTPUT + echo "version=$(echo ${{github.sha}} | cut -c1-7)" >> $GITHUB_OUTPUT else echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT fi