sdrangel/.github/workflows/sdrangel.yml

136 wiersze
5.1 KiB
YAML
Czysty Zwykły widok Historia

2021-10-13 20:03:12 +00:00
# https://stackoverflow.com/questions/69126323/github-actions-creating-releases-for-multiple-branches-in-a-single-workflow
# https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
2021-10-15 12:25:22 +00:00
name: SDRangel CI/CD
2021-10-13 20:03:12 +00:00
on:
push:
branches:
- master
2023-09-23 09:54:24 +00:00
- mac_ci
tags:
- 'v*'
pull_request:
2021-10-13 20:03:12 +00:00
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows-x64",
WIN_ARCH: "x64",
os: windows-latest,
QT_INST_DIR: "C:/",
QTDIR: "C:/Qt/5.15.2/msvc2019_64",
QT_ARCH: win64_msvc2019_64,
2021-10-14 08:15:15 +00:00
boost_dl: "${{ github.workspace }}\\downloads\\boost",
lib_dir: "C:\\Libraries",
generators: Ninja
2021-10-13 20:03:12 +00:00
}
steps:
2022-12-19 22:16:19 +00:00
- uses: actions/checkout@v3
2021-10-13 20:03:12 +00:00
with:
submodules: true
2021-10-15 12:25:22 +00:00
fetch-depth: 0
2021-10-13 20:03:12 +00:00
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
echo github.ref: ${{ github.ref }}
2021-10-15 12:25:22 +00:00
echo github.workspace: ${{ github.workspace }}
2021-10-13 20:03:12 +00:00
- name: Install basic dependencies on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
choco install ninja cmake
ninja --version
cmake --version
2021-10-14 08:15:15 +00:00
- name: Install MSVC on Windows
if: startsWith(matrix.config.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Boost
env:
BOOST_ROOT: ${{ matrix.config.boost_dl }}
BOOST_DEST: ${{ matrix.config.lib_dir }}
BOOST_URL: https://archives.boost.io/release/1.73.0/source/boost_1_73_0.tar.bz2
2021-10-14 08:15:15 +00:00
run: |
mkdir -p $BOOST_ROOT
mkdir -p $BOOST_DEST
curl --progress-bar --location --output $BOOST_ROOT/download.tar.bz2 $BOOST_URL
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar.bz2 -y -bd
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar -y -bd
cd $BOOST_ROOT && cp -r boost_* $BOOST_DEST
ls -l $BOOST_DEST
ls -l "C:\\"
rm -rf boost_*/* download.tar.bz2 download.tar
shell: bash
2021-10-13 20:03:12 +00:00
- name: Install Qt
2022-12-19 22:16:19 +00:00
uses: jurplel/install-qt-action@v3
2021-10-13 20:03:12 +00:00
with:
2021-10-14 08:15:15 +00:00
dir: ${{matrix.config.QT_INST_DIR}}
arch: ${{matrix.config.QT_ARCH}}
setup-python: false
2022-02-05 21:33:39 +00:00
modules: 'qtcharts qtwebengine'
2021-10-13 20:03:12 +00:00
- name: build sdrangel on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
2021-10-14 08:15:15 +00:00
cmd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
2021-10-13 20:03:12 +00:00
choco install patch
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"
2021-10-14 08:15:15 +00:00
cmake --build . --config Release --target package
2023-09-24 20:42:08 +00:00
- name: Check disk space
2023-09-24 19:10:33 +00:00
run: Get-PSDrive
2023-09-24 14:14:31 +00:00
- name: Get version
id: get_version
run: echo "version=$(grep sdrangel_VERSION build/CMakeCache.txt | cut -d "=" -f2)" >> $env:GITHUB_OUTPUT
2021-10-15 12:25:22 +00:00
- name: Upload artifact
2022-12-19 22:16:19 +00:00
uses: actions/upload-artifact@v3
2021-10-15 12:25:22 +00:00
with:
name: sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
path: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
- name: Upload release
if: startsWith(github.ref, 'refs/tags/')
2022-12-19 18:58:49 +00:00
uses: softprops/action-gh-release@v0.1.13
with:
files: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
2023-09-24 07:34:04 +00:00
build_mac:
2023-11-02 20:25:27 +00:00
runs-on: macos-13
2023-09-24 07:34:04 +00:00
steps:
- uses: actions/checkout@v3
2023-09-24 09:04:54 +00:00
with:
submodules: true
fetch-depth: 0
2023-09-24 14:14:31 +00:00
- name: Update brew
run: brew update
2023-11-02 17:01:02 +00:00
- name: Install brew uhd package
run: |
2023-11-02 18:08:00 +00:00
rm -f /usr/local/bin/2to3*
2023-12-05 12:48:14 +00:00
rm -f /usr/local/bin/idle3*
rm -f /usr/local/bin/pydoc3*
rm -f /usr/local/bin/python3*
2023-11-02 18:53:47 +00:00
rm -f /usr/local/bin/python3-config
2023-11-02 17:01:02 +00:00
brew install uhd
2023-10-30 14:46:30 +00:00
- name: Install brew opencv package
run: |
rm -f /usr/local/bin/2to3
brew install opencv
- name: Install brew packages
run: brew install nasm boost hidapi libusb fftw ffmpeg faad2 zlib airspy airspyhf hackrf rtl-sdr libbladerf soapysdr qt
2023-09-24 16:13:41 +00:00
- name: Configure SDRangel
2023-09-24 14:14:31 +00:00
run: |
mkdir build && cd build
2023-09-24 16:13:41 +00:00
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
2023-12-06 13:08:09 +00:00
run: |
cd build
make -j3