Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions updates #1841

Merged
merged 29 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e96246b
Add Mac build action
srcejon Sep 23, 2023
83cbac8
Build on mac_ci branch for testing
srcejon Sep 23, 2023
578bb46
Use brew for some dependencies
srcejon Sep 23, 2023
1a7ea12
Fix indent
srcejon Sep 23, 2023
5ec8bde
Try using prebuilt libraries
srcejon Sep 23, 2023
2e26ef4
Add FFmpeg, so we don't try to build it
srcejon Sep 23, 2023
e40b98b
Don't build UHD it ENABLE_EXTERNAL_LIBRARIES=AUTO
srcejon Sep 23, 2023
7873595
Fix syntax error
srcejon Sep 23, 2023
cd49cca
Remove Qt6
srcejon Sep 23, 2023
f290cb7
Try Qt5_ROOT instead
srcejon Sep 23, 2023
ac00b64
Try brew's Qt5
srcejon Sep 23, 2023
7e410ac
Try Qt6 build
srcejon Sep 23, 2023
138122b
Fix syntax
srcejon Sep 23, 2023
6e51443
Try Qt6
srcejon Sep 23, 2023
dc40fac
Fix for Qt6
srcejon Sep 23, 2023
9fadf29
QGLFormat is removed from Qt6
srcejon Sep 23, 2023
8c9eb22
Upload Mac artifact
srcejon Sep 24, 2023
ddbac0e
Try to fix version number
srcejon Sep 24, 2023
c875b30
Try to fix version number
srcejon Sep 24, 2023
56aba40
Try to fix OS version number
srcejon Sep 24, 2023
ad7c08d
Try to fix version number
srcejon Sep 24, 2023
9a6ade3
Cache version numbers, so they can be used in other scripts
srcejon Sep 24, 2023
608609a
Fix syntax error
srcejon Sep 24, 2023
d96878f
Get version after configure
srcejon Sep 24, 2023
6a75d36
Fix filename. Try 3 parallel jobs
srcejon Sep 24, 2023
12d592d
Display exe size
srcejon Sep 24, 2023
b267efa
Check space at more points
srcejon Sep 24, 2023
a563e8f
Don't generate .zip file on windows
srcejon Sep 24, 2023
3def09f
Remove debug
srcejon Sep 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions .github/workflows/sdrangel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master
- mac_ci
tags:
- 'v*'
pull_request:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand All @@ -95,3 +98,31 @@ jobs:
uses: softprops/[email protected]
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
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}\"")
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions cmake/cpack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion sdrbase/util/psk31.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down