1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

Merge pull request #1841 from srcejon/mac_ci

Github Actions updates
This commit is contained in:
Edouard Griffiths 2023-09-25 02:30:34 +02:00 committed by GitHub
commit c245aaa886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 9 deletions

View File

@ -6,6 +6,7 @@ on:
push:
branches:
- master
- mac_ci
tags:
- 'v*'
pull_request:
@ -40,9 +41,6 @@ jobs:
echo github.event_name: ${{ github.event_name }}
echo github.ref: ${{ github.ref }}
echo github.workspace: ${{ github.workspace }}
- name: Get version
id: get_version
run: echo "version=$(git describe --tags | cut -c2-)" >> $env:GITHUB_OUTPUT
- name: Install basic dependencies on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
@ -85,6 +83,11 @@ jobs:
mkdir build && cd build
cmake .. -G "${{ matrix.config.generators }}" -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=SSE4_2 -DDEBUG_OUTPUT=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DCMAKE_PREFIX_PATH="C:\Qt\5.15.2\msvc2019_64;C:\Libraries\boost_1_73_0"
cmake --build . --config Release --target package
- name: Check disk space
run: Get-PSDrive
- name: Get version
id: get_version
run: echo "version=$(grep sdrangel_VERSION build/CMakeCache.txt | cut -d "=" -f2)" >> $env:GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
@ -95,3 +98,31 @@ jobs:
uses: softprops/action-gh-release@v0.1.13
with:
files: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
build_mac:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Update brew
run: brew update
- name: Install brew packages
run: brew install nasm boost hidapi libusb fftw ffmpeg faad2 opencv zlib airspy airspyhf hackrf rtl-sdr libbladerf uhd soapysdr
- 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_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=AUTO -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE
- name: Get filename
id: get_filename
run: echo "filename=$(grep CPACK_PACKAGE_FILE_NAME build/CMakeCache.txt | cut -d "=" -f2)" >> $GITHUB_OUTPUT
- name: Build SDRangel on Mac
run: |
cd build
make package -j3
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_filename.outputs.filename }}.dmg
path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg

View File

@ -173,7 +173,7 @@ if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
endif()
endif()
set(sdrangel_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}")
set(sdrangel_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}" CACHE INTERNAL "")
message(STATUS "${APPLICATION_NAME} Version: ${sdrangel_VERSION}")
add_definitions("-DSDRANGEL_LIB_VERSION=\"${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}\"")
add_definitions("-DSDRANGEL_VERSION=\"${sdrangel_VERSION}\"")
@ -753,6 +753,7 @@ if (NOT ENABLE_EXTERNAL_LIBRARIES OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO")
find_package(AptDec)
find_package(LibDAB)
find_package(HIDAPI)
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
# Devices
if(ENABLE_AIRSPY)

View File

@ -24,7 +24,9 @@
#include <QSysInfo>
#include <QSettings>
#ifdef __APPLE__
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
#include <QGLFormat>
#endif
#include <QSurfaceFormat>
#endif
#ifdef ANDROID
@ -212,10 +214,12 @@ int main(int argc, char* argv[])
// will not work. Because of this, we have two versions of the shaders:
// OpenGL 2 versions for compatiblity with older drivers and OpenGL 3.3
// versions for newer drivers
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QGLFormat fmt;
fmt.setVersion(3, 3);
fmt.setProfile(QGLFormat::CoreProfile);
QGLFormat::setDefaultFormat(fmt);
#endif
QSurfaceFormat sfc;
sfc.setVersion(3, 3);
sfc.setProfile(QSurfaceFormat::CoreProfile);

View File

@ -36,7 +36,7 @@ if(APPLE AND BUNDLE AND BUILD_GUI)
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/cmake/cpack/sdrangel_icon.icns")
set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/Info.plist")
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/cpack/sdrangel_icon.icns")
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_MACOS_PACKAGE_ARCHITECTURE}_${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_MACOS_PACKAGE_ARCHITECTURE}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
set(CPACK_PRE_BUILD_SCRIPTS "${PROJECT_BINARY_DIR}/deploy_mac.cmake")
# copy SoapySDR Modules
@ -331,7 +331,7 @@ elseif(WIN32 OR MINGW)
endforeach()
" COMPONENT Runtime)
list(APPEND CPACK_GENERATOR "ZIP;NSIS")
list(APPEND CPACK_GENERATOR "NSIS")
set(CPACK_MONOLITHIC_INSTALL ON)
set(CPACK_NSIS_HELP_LINK ${CPACK_PACKAGE_CONTACT})
set(CPACK_NSIS_URL_INFO_ABOUT ${CPACK_PACKAGE_CONTACT})

View File

@ -1478,7 +1478,7 @@ if (WIN32 OR APPLE)
endif ()
endif (ENABLE_BLADERF)
if (ENABLE_USRP AND Boost_FOUND AND NOT WIN32)
if (ENABLE_USRP AND Boost_FOUND AND NOT WIN32 AND ((NOT UHD_FOUND) OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "ON")))
ExternalProject_Add(uhd
GIT_REPOSITORY https://github.com/EttusResearch/uhd.git
GIT_TAG v4.2.0.0
@ -1504,7 +1504,7 @@ if (WIN32 OR APPLE)
set(UHD_LIBRARIES "${install_dir}/lib/libuhd${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${install_dir}/lib")
endif ()
endif (ENABLE_USRP AND Boost_FOUND AND NOT WIN32)
endif (ENABLE_USRP AND Boost_FOUND AND NOT WIN32 AND ((NOT UHD_FOUND) OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "ON")))
endif (WIN32 OR APPLE)

View File

@ -302,7 +302,7 @@ void PSK31Encoder::addCode(unsigned& bits, unsigned int& bitCount, const QString
unsigned int codeLen = code.size();
for (unsigned int i = 0; i < codeLen; i++) {
codeBits |= (code[i] == "1" ? 1 : 0) << i;
codeBits |= (code[i] == '1' ? 1 : 0) << i;
}
addStartBits(bits, bitCount);