1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 09:18:54 -05:00
sdrangel/.github/workflows/mac.yml

124 lines
5.2 KiB
YAML
Raw Normal View History

2024-10-31 09:53:45 -04:00
name: SDRangel Mac release build
on:
push:
branches:
- mac_ci
tags:
- 'v*'
jobs:
2024-11-01 04:08:19 -04:00
build_mac_x64:
2024-11-10 05:04:51 -05:00
runs-on: macos-12
2024-11-01 04:08:19 -04:00
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
2024-11-01 05:08:25 -04:00
- name: Install SDRplay API
run: |
wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg
2024-11-01 05:11:32 -04:00
sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target /
2024-11-01 09:30:36 -04:00
- 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 /
2024-11-01 04:08:19 -04:00
- name: Install python packages for UHD
run: |
2024-11-01 09:30:36 -04:00
/usr/local/bin/python3.12 -m pip install numpy mako requests Cheetah3 setuptools
2024-11-01 04:08:19 -04:00
- 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: |
mkdir build && cd build
2024-11-01 09:30:36 -04:00
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
2024-11-01 04:08:19 -04:00
- name: Build SDRangel on Mac
run: |
cd build
make -j4 package
- name: Get version
id: get_version
run: |
if [[ "${{github.ref_name}}" == "mac_ci" ]]; then
2024-11-01 17:33:38 -04:00
echo "version=$(echo ${{github.sha}} | cut -c1-7)" >> $GITHUB_OUTPUT
2024-11-01 04:08:19 -04:00
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@v4
2024-11-01 04:08:19 -04:00
with:
name: sdrangel-${{ steps.get_version.outputs.version }}-macx64.dmg
path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg
2024-11-01 08:49:39 -04:00
- 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
2024-11-01 04:08:19 -04:00
2024-11-01 08:49:39 -04:00
build_mac_arm64:
2024-10-31 09:53:45 -04:00
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Update brew
run: brew update
- name: Install brew packages
2024-10-31 12:41:05 -04:00
run: brew install nasm subversion
2024-11-01 05:08:25 -04:00
- name: Install SDRplay API
run: |
wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg
2024-11-01 05:11:32 -04:00
sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target /
2024-11-01 09:30:36 -04:00
- 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 /
2024-10-31 11:33:00 -04:00
- name: Install python packages for UHD
2024-10-31 12:41:05 -04:00
run: |
2024-11-01 09:30:36 -04:00
/usr/local/bin/python3.12 -m pip install numpy mako requests Cheetah3 setuptools
2024-10-31 10:03:21 -04:00
- 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'
2024-10-31 09:53:45 -04:00
- name: Configure SDRangel
run: |
mkdir build && cd build
2024-11-01 09:30:36 -04:00
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
2024-10-31 09:53:45 -04:00
- name: Build SDRangel on Mac
run: |
cd build
2024-10-31 17:12:36 -04:00
make -j3 package
2024-10-31 09:53:45 -04:00
- name: Get version
id: get_version
2024-10-31 17:16:19 -04:00
run: |
if [[ "${{github.ref_name}}" == "mac_ci" ]]; then
2024-11-01 17:33:38 -04:00
echo "version=$(echo ${{github.sha}} | cut -c1-7)" >> $GITHUB_OUTPUT
2024-10-31 17:16:19 -04:00
else
echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT
fi
2024-10-31 09:53:45 -04:00
- 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@v4
2024-10-31 09:53:45 -04:00
with:
2024-11-01 04:08:19 -04:00
name: sdrangel-${{ steps.get_version.outputs.version }}-macarm64.dmg
2024-10-31 09:53:45 -04:00
path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg
2024-11-01 08:49:39 -04:00
- 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