mirror of
https://github.com/gqrx-sdr/gqrx.git
synced 2025-12-23 14:37:44 -05:00
Move macOS builds to Conda
Co-authored-by: kgarrels <kgarrels@users.noreply.github.com> Co-authored-by: Clayton Smith <argilo@gmail.com>
This commit is contained in:
90
.github/workflows/build.yml
vendored
90
.github/workflows/build.yml
vendored
@@ -85,71 +85,28 @@ jobs:
|
||||
else
|
||||
echo "available=false" >> $GITHUB_OUTPUT;
|
||||
fi
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uname -a
|
||||
# for https://github.com/actions/runner-images/issues/9272
|
||||
sudo chown -R runner:admin /usr/local/
|
||||
brew update
|
||||
brew install --HEAD librtlsdr
|
||||
brew install airspy airspyhf boost dylibbundler gnuradio hackrf libbladerf libserialport portaudio pybind11 six soapyremote uhd qt@6 || true
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/analogdevicesinc/libiio.git
|
||||
cd libiio
|
||||
git checkout v0.26
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j4
|
||||
sudo make install
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/analogdevicesinc/libad9361-iio.git
|
||||
cd libad9361-iio
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j4
|
||||
sudo make install
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/pothosware/SoapyPlutoSDR.git
|
||||
cd SoapyPlutoSDR
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j4
|
||||
sudo make install
|
||||
|
||||
cd /tmp
|
||||
sudo cp /Library/Frameworks/iio.framework/iio /usr/local/lib/libiio.dylib
|
||||
sudo install_name_tool -id "/usr/local/lib/libiio.dylib" /usr/local/lib/libiio.dylib
|
||||
sudo cp /Library/Frameworks/ad9361.framework/ad9361 /usr/local/lib/libad9361.dylib
|
||||
sudo install_name_tool -id "/usr/local/lib/libad9361.dylib" /usr/local/lib/libad9361.dylib
|
||||
sudo install_name_tool -delete_rpath /Library/Frameworks /usr/local/lib/libad9361.dylib
|
||||
sudo install_name_tool -change @rpath/iio.framework/Versions/0.23/iio /usr/local/lib/libiio.dylib /usr/local/lib/libad9361.dylib
|
||||
sudo install_name_tool -change @rpath/iio.framework/Versions/0.23/iio /usr/local/lib/libiio.dylib /usr/local/lib/SoapySDR/modules0.*/libPlutoSDRSupport.so
|
||||
sudo install_name_tool -change @rpath/ad9361.framework/Versions/0.2/ad9361 /usr/local/lib/libad9361.dylib /usr/local/lib/SoapySDR/modules0.*/libPlutoSDRSupport.so
|
||||
|
||||
cd /tmp
|
||||
git clone https://gitea.osmocom.org/sdr/gr-iqbal.git
|
||||
cd gr-iqbal
|
||||
git submodule update --init --recursive
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j4
|
||||
sudo make install
|
||||
|
||||
cd /tmp
|
||||
git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git
|
||||
cd gr-osmosdr
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-register ..
|
||||
LIBRARY_PATH=/usr/local/opt/icu4c/lib make -j4
|
||||
sudo make install
|
||||
- name: Install conda dependencies
|
||||
id: setup-micromamba
|
||||
uses: mamba-org/setup-micromamba@v2
|
||||
with:
|
||||
environment-name: gqrx
|
||||
create-args: >-
|
||||
c-compiler
|
||||
cxx-compiler
|
||||
cmake
|
||||
make
|
||||
pkg-config
|
||||
gnuradio-core
|
||||
gnuradio-osmosdr
|
||||
libboost-devel
|
||||
qt6-main
|
||||
soapysdr
|
||||
soapysdr-module-audio
|
||||
soapysdr-module-lms7
|
||||
soapysdr-module-plutosdr
|
||||
soapysdr-module-remote
|
||||
soapysdr-module-volk-converters
|
||||
volk
|
||||
- name: Install Apple certificate
|
||||
if: ${{ steps.secret-check.outputs.available == 'true' }}
|
||||
env:
|
||||
@@ -173,11 +130,14 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Configure
|
||||
shell: bash -el {0}
|
||||
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- name: Compile
|
||||
working-directory: build
|
||||
run: make -j4
|
||||
- name: Build app bundle
|
||||
env:
|
||||
CONDA_PREFIX: ${{ steps.setup-micromamba.outputs.environment-path }}
|
||||
run: ./macos_bundle.sh ${{ steps.secret-check.outputs.available }}
|
||||
- name: Notarize app bundle
|
||||
if: ${{ steps.secret-check.outputs.available == 'true' }}
|
||||
|
||||
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@@ -72,24 +72,26 @@ jobs:
|
||||
backend: [Portaudio, Gr-audio]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# for https://github.com/actions/runner-images/issues/9272
|
||||
sudo chown -R runner:admin /usr/local/
|
||||
brew update
|
||||
brew install airspy boost gnuradio hackrf libbladerf librtlsdr pybind11 six uhd qt@6 || true
|
||||
|
||||
cd /tmp
|
||||
git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git
|
||||
cd gr-osmosdr
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_FLAGS=-Wno-register ..
|
||||
LIBRARY_PATH=/usr/local/opt/icu4c/lib make -j4
|
||||
sudo make install
|
||||
- name: Install conda dependencies
|
||||
id: setup-micromamba
|
||||
uses: mamba-org/setup-micromamba@v2
|
||||
with:
|
||||
environment-name: gqrx
|
||||
create-args: >-
|
||||
c-compiler
|
||||
cxx-compiler
|
||||
cmake
|
||||
make
|
||||
pkg-config
|
||||
gnuradio-core
|
||||
gnuradio-osmosdr
|
||||
libboost-devel
|
||||
qt6-main
|
||||
volk
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
shell: bash -el {0}
|
||||
run: mkdir build && cd build && cmake -DOSX_AUDIO_BACKEND:STRING=${{ matrix.backend }} ..
|
||||
- name: Compile
|
||||
working-directory: build
|
||||
|
||||
@@ -2,8 +2,16 @@
|
||||
|
||||
GQRX_VERSION="$(<build/version.txt)"
|
||||
IDENTITY=Y3GC27WZ4S
|
||||
BREW_PREFIX="$(brew --prefix)"
|
||||
MACDEPLOYQT6="${BREW_PREFIX}"/opt/qt@6/bin/macdeployqt
|
||||
|
||||
echo "CONDA_PREFIX: " $CONDA_PREFIX
|
||||
|
||||
MACDEPLOYQT6=${CONDA_PREFIX}/bin/macdeployqt6
|
||||
echo "macdeployqt6: " ${MACDEPLOYQT6}
|
||||
|
||||
# cleanup and setup
|
||||
if [ -e Gqrx.app ] ;
|
||||
then rm -r Gqrx.app
|
||||
fi
|
||||
|
||||
mkdir -p Gqrx.app/Contents/MacOS
|
||||
mkdir -p Gqrx.app/Contents/Resources
|
||||
@@ -51,20 +59,15 @@ EOM
|
||||
|
||||
cp build/src/gqrx Gqrx.app/Contents/MacOS
|
||||
cp resources/icons/gqrx.icns Gqrx.app/Contents/Resources
|
||||
# NOTE: PlutoSDR is built locally, so it will not in the brew path
|
||||
cp /usr/local/lib/SoapySDR/modules*/libPlutoSDRSupport.so Gqrx.app/Contents/soapy-modules
|
||||
cp "${BREW_PREFIX}"/lib/SoapySDR/modules*/libremoteSupport.so Gqrx.app/Contents/soapy-modules
|
||||
chmod 644 Gqrx.app/Contents/soapy-modules/*
|
||||
cp "$CONDA_PREFIX"/lib/SoapySDR/modules*/* Gqrx.app/Contents/soapy-modules
|
||||
|
||||
dylibbundler -s "${BREW_PREFIX}"/opt/icu4c/lib/ -od -b -x Gqrx.app/Contents/MacOS/gqrx -x Gqrx.app/Contents/soapy-modules/libPlutoSDRSupport.so -x Gqrx.app/Contents/soapy-modules/libremoteSupport.so -d Gqrx.app/Contents/libs/
|
||||
"${MACDEPLOYQT6}" Gqrx.app -no-strip -always-overwrite # TODO: Remove macdeployqt workaround
|
||||
if [ "$1" = "true" ]; then
|
||||
"${MACDEPLOYQT6}" Gqrx.app -no-strip -always-overwrite -sign-for-notarization="${IDENTITY}"
|
||||
"${MACDEPLOYQT6}" Gqrx.app -verbose=1 -no-strip -always-overwrite -sign-for-notarization="${IDENTITY}" -libpath=Gqrx.app/Contents/Frameworks
|
||||
else
|
||||
"${MACDEPLOYQT6}" Gqrx.app -no-strip -always-overwrite
|
||||
"${MACDEPLOYQT6}" Gqrx.app -verbose=1 -no-strip -always-overwrite -libpath=Gqrx.app/Contents/Frameworks
|
||||
fi
|
||||
|
||||
for f in Gqrx.app/Contents/libs/*.dylib Gqrx.app/Contents/soapy-modules/*.so Gqrx.app/Contents/Frameworks/*.framework Gqrx.app/Contents/Frameworks/*.dylib Gqrx.app/Contents/MacOS/gqrx
|
||||
for f in Gqrx.app/Contents/Frameworks/*.dylib Gqrx.app/Contents/soapy-modules/* Gqrx.app/Contents/MacOS/gqrx
|
||||
do
|
||||
if [ "$1" = "true" ]; then
|
||||
codesign --force --verify --verbose --timestamp --options runtime --entitlements /tmp/Entitlements.plist --sign "${IDENTITY}" "$f"
|
||||
|
||||
@@ -67,6 +67,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
qputenv("SOAPY_SDR_PLUGIN_PATH", plugin_path.toUtf8());
|
||||
qputenv("SOAPY_SDR_ROOT", "/invalid");
|
||||
qputenv("CONDA_PREFIX", "/invalid");
|
||||
}
|
||||
|
||||
// setup controlport via environment variables
|
||||
|
||||
Reference in New Issue
Block a user