Skip to content

Commit

Permalink
Merge branch 'analogdevicesinc:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
tktf50 authored Mar 15, 2022
2 parents 15f08e3 + fbe13db commit ecd30a5
Show file tree
Hide file tree
Showing 319 changed files with 11,915 additions and 3,208 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/androidbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: android-apk build

on: [push, pull_request]

jobs:

make-apk:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Pull the Docker Image
run: docker pull analogdevices/scopy-build:android
- name: Run Docker Image
run: |
docker run --privileged --net=host \
-v `pwd`:$GITHUB_WORKSPACE:rw \
-e "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" \
-e "BRANCH=${GITHUB_REF#refs/heads/}" \
analogdevices/scopy-build:android /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/build_scopy_apk.sh
- uses: actions/upload-artifact@v2
with:
name: scopy-android
path: |
${{ github.workspace }}/android-build-debug.apk
${{ github.workspace }}/android-build-debug.aab
${{ github.workspace }}/android-build-release.aab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI
name: linux-flatpak build

on: [push, pull_request]

Expand All @@ -10,13 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Pull the Docker Image
run: docker pull adisuciu/scopy-flatpak-ubuntu20:latest
run: docker pull analogdevices/scopy-build:flatpak
- name: Run Docker Image
run: |
docker run --privileged \
-v `pwd`:$GITHUB_WORKSPACE:rw \
-e "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" \
adisuciu/scopy-flatpak-ubuntu20:latest /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/inside_flatpak_docker.sh
analogdevices/scopy-build:flatpak /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/inside_flatpak_docker.sh
- uses: actions/upload-artifact@v2
with:
name: Scopy.flatpak
Expand All @@ -29,4 +29,3 @@ jobs:
ghr_v0.13.0_linux_amd64/ghr -u ${{ github.repository_owner }} -r scopy -name "Continuous build" -b "Latest succesful master build " -prerelease -debug -replace continous ${{ github.workspace }}/Scopy.flatpak
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

57 changes: 57 additions & 0 deletions .github/workflows/mingwbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: windows-mingw build

on: [push, pull_request]

jobs:

make-exe-64:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- name: Pull the Docker Image
run: docker pull analogdevices/scopy-build:mingw64

- name: Run Docker Image
shell: cmd
run: |
mkdir %GITHUB_WORKSPACE%\artifacts & echo %GITHUB_WORKSPACE% & docker run -v %cd%:C:\msys64\home\docker\scopy:rw -v %GITHUB_WORKSPACE%\artifacts:C:\msys64\home\docker\artifact_x86_64:rw -e GITHUB_WORKSPACE=%GITHUB_WORKSPACE% analogdevices/scopy-build:mingw64 C:\msys64\usr\bin\bash.exe -c '/home/docker/scopy/CI/appveyor/inside_mingw_docker.sh'
- uses: actions/upload-artifact@v2
with:
name: scopy-x86_64.zip
path: ${{ github.workspace }}\artifacts\scopy-x86_64.zip

- uses: actions/upload-artifact@v2
with:
name: debug-x86_64.zip
path: ${{ github.workspace }}\artifacts\debug-x86_64.zip
- uses: actions/upload-artifact@v2
with:
name: scopy-x86_64-setup.exe
path: ${{ github.workspace }}\artifacts\scopy-64-setup.exe

# make-exe-32:
# runs-on: windows-latest
#
# steps:
## - uses: actions/checkout@v2
# - name: Pull the Docker Image
# run: docker pull analogdevices/scopy-build:mingw32
#
# - name: Run Docker Image
# shell: cmd
# run: |
# mkdir %GITHUB_WORKSPACE%\artifacts & echo %GITHUB_WORKSPACE% & #docker run -v %cd%:C:\msys64\home\docker\scopy:rw -v #%GITHUB_WORKSPACE%\artifacts:C:\msys64\home\docker\artifact_i686:rw #-e GITHUB_WORKSPACE=%GITHUB_WORKSPACE% analogdevices/#scopy-build:mingw32 C:\msys64\usr\bin\bash.exe -c '/home/docker/#scopy/CI/appveyor/inside_mingw_docker.sh'
# - uses: actions/upload-artifact@v2
# with:
# name: scopy-i686.zip
# path: ${{ github.workspace }}\artifacts\scopy-i686.zip
#
# - uses: actions/upload-artifact@v2
# with:
# name: debug-i686.zip
# path: ${{ github.workspace }}\artifacts\debug-i686.zip
# - uses: actions/upload-artifact@v2
# with:
# name: scopy-i686-setup.exe
# path: ${{ github.workspace }}\artifacts\scopy-32-setup.exe
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ Makefile
moc_*.cpp
*_automoc.cpp
ui_*.h
build
build*
deps
scopy
android/assets/libsigrokdecode/*
android/assets/python3.*/*
resources/stylesheets/default.qss
resources/stylesheets/light.qss
!android/src/org/adi/scopy
*.swp
html/
build_arm64-v8a/
android_cmake.sh
android_deploy_qt.sh
89 changes: 89 additions & 0 deletions CI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

This file contains dependency information for different platforms

**Windows (x86_64)** -
https://github.com/analogdevicesinc/scopy-mingw-build-deps
builds the docker image - `docker pull analogdevices/scopy-build:mingw64`
Github Actions workflow:
https://github.com/analogdevicesinc/scopy/blob/master/.github/workflows/mingwbuild.yml

**Linux (flatpak - x86_64)**
https://github.com/analogdevicesinc/scopy-flatpak
docker pull analogdevices/scopy-build:flatpak

ARCH=x86_64 make

Github Actions workflow - https://github.com/analogdevicesinc/scopy/blob/master/.github/workflows/linuxflatpakbuild.yml

**Linux (flatpak - arm)**
https://github.com/analogdevicesinc/scopy-flatpak
Run locally on arm machine (raspberry pi)

ARCH=arm make
Not build in CI

**Linux (ubuntu - x86_64) - development**
Built on appveyor - https://github.com/analogdevicesinc/scopy/blob/master/appveyor.yml
**macOS (x86_64)**
Built on appveyor - https://github.com/analogdevicesinc/scopy/blob/master/appveyor.yml

**Android (aarch64)**
https://github.com/analogdevicesinc/scopy-android-deps - `docker pull analogdevices/scopy-build:android`
Github Actions workflow - https://github.com/analogdevicesinc/scopy/blob/master/.github/workflows/androidbuild.yml

Dependency versions (links used in source builds)

- Qt: 5.15.12
- Qwt - https://github.com/cseci/qwt - qwt-multiaxes
- libiio - https://github.com/analogdevicesinc/libiio - https://github.com/analogdevicesinc/libiio/tree/cad83146837971acdac28beaeb8156b9da33ba6b - v0.24
- libxml2 - https://github.com/GNOME/libxml2
- iconv (only on Android from src)
- libffi (only on Android from src)
- libgettext (only on Android from src)
- libusb - https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2
- Android specific libusb: https://github.com/xloem/libusb/tree/d1856aa8c246f9e56cf00a0765462b67fc5a4871
- libm2k- https://github.com/analogdevicesinc/libm2k - master
- glog - https://github.com/google/glog
- boost -
- gnuradio - https://github.com/analogdevicesinc/gnuradio - scopy / scopy-android-2(for Android)
- volk
- log4cpp - https://github.com/cseci/log4cpp
- fftw3
- libgmp
- gr-iio https://github.com/analogdevicesinc/gr-iio - upgrade3.8
- libad9361 - https://github.com/analogdevicesinc/ad9361
- gr-m2k - https://github.com/analogdevicesinc/gr-m2k - master
- gr-scopy - https://github.com/analogdevicesinc/gr-scopy - master
- libsigrokdecode - https://github.com/sigrokproject/libsigrokdecode - master
- glib
- glibmm
- sigcpp
- python
- libtinyiiod - https://github.com/analogdevicesinc/libtinyiiod - master

How to install Qt from qt.io : https://github.com/analogdevicesinc/scopy-android-deps/blob/master/docker/Dockerfile#L43-L49


| Dependency | Windows | Linux Flatpak | Linux Ubuntu(development) | Linux ARM | macOS | Android |
| --- | --- | --- | --- | --- | --- | --- |
| Qt | pacman | org.kde.Sdk (v5.15)| Qt.io |org.kde.Sdk (v5.14) | brew | Qt.io |
| qwt | src | src | src | src | src | src |
| libxml2 | pacman | src | apt | src | brew | src |
| libusb | pacman | src | apt | src | brew | src - android branch/commit |
| libiio | src | src | src | src | src | src|
| glog | src | src | src | src | brew | src |
| libm2k | src | src | src | src | src | src |
| volk | src | with GR | with GR | src | with GR | src |
| fftw3 | pacman| src | apt | src | brew| src|
| libgmp | pacman | src | apt | src | brew | src |
| boost | 1.75 | 1.72 | apt/src | 1.72 | brew | Boost-for-Android |
| gnuradio | src | src | apt/src | src | src | src |
| gr-iio | src | src | src | src | src | src |
| gr-m2k | src | src | src | src | src | src |
| gr-scopy | src | src | src | src | src | src |
| glib | pacman | src | apt | src | brew | src |
| glibmm | pacman | src | apt | src | src | src |
| sigcpp | pacman | src | apt | src | src | src |
| python | pacman | src | apt | src | brew | src |
| libsigrokdecode | src | src | src | src | src | src |
| libtinyiiod | src | src | src | src | src | src|
120 changes: 27 additions & 93 deletions CI/appveyor/before_install_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,26 @@ __cmake() {
mkdir -p build
pushd build # build

if [ "$APPVEYOR" == "true" ] ; then
cmake $args ..
make -j${NUM_JOBS}
sudo make install
else
cmake -DCMAKE_PREFIX_PATH="$STAGINGDIR" -DCMAKE_INSTALL_PREFIX="$STAGINGDIR" \
-DCMAKE_EXE_LINKER_FLAGS="-L${STAGINGDIR}/lib" \
$args .. $SILENCED
CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib make -j${NUM_JOBS} $SILENCED
make install
fi

cmake -DCMAKE_PREFIX_PATH="$STAGINGDIR" -DCMAKE_INSTALL_PREFIX="$STAGINGDIR" \
-DCMAKE_EXE_LINKER_FLAGS="-L${STAGINGDIR}/lib" \
$args .. $SILENCED
CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib make -j${NUM_JOBS} $SILENCED
make -j${NUM_JOBS}
sudo make install
popd
}

__make() {
$preconfigure
if [ "$APPVEYOR" == "true" ] ; then
$configure
$make -j${NUM_JOBS}
sudo $make install
else
$configure --prefix="$STAGINGDIR" $SILENCED
CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib $make -j${NUM_JOBS} $SILENCED
$SUDO $make install
fi
$configure --prefix="$STAGINGDIR"
$make -j${NUM_JOBS}
sudo $make install
}

__qmake() {
if [ "$APPVEYOR" == "true" ] ; then
$QMAKE $qtarget
make -j${NUM_JOBS}
sudo make install
else
$QMAKE "$qtarget" $SILENCED
QMAKE=$QMAKE CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib \
make -j${NUM_JOBS} $SILENCED
$SUDO make install
fi
$QMAKE $qtarget
make -j${NUM_JOBS}
sudo make install
}

__build_common() {
Expand Down Expand Up @@ -162,7 +143,6 @@ qmake_build_local() {
local dir="$1"
local qtarget="$2"
local patchfunc="$3"

[ ! -d "$WORKDIR/$dir" ] || {
[ -z "$patchfunc" ] || {
pushd $WORKDIR/$dir
Expand All @@ -181,30 +161,21 @@ patch_qwt() {
QWT_INSTALL_PREFIX = \$\$[QT_INSTALL_PREFIX]
unix {
- QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-svn
- QWT_INSTALL_PREFIX = /usr/local
+ QWT_INSTALL_PREFIX = $STAGINGDIR
# QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-svn-qt-\$\$QT_VERSION
# QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-ma-qt-\$\$QT_VERSION
}
@@ -107,7 +107,7 @@
# Otherwise you have to build it from the designer directory.
######################################################################
-QWT_CONFIG += QwtDesigner
+#QWT_CONFIG += QwtDesigner
######################################################################
# Compile all Qwt classes into the designer plugin instead
@@ -148,7 +148,7 @@
# Otherwise you have to build them from the tests directory.
@@ -42,7 +42,7 @@ QWT_INSTALL_LIBS = \$\${QWT_INSTALL_PREFIX}/lib
# runtime environment of designer/creator.
######################################################################
-QWT_CONFIG += QwtTests
+#QWT_CONFIG += QwtTests
-QWT_INSTALL_PLUGINS = \$\${QWT_INSTALL_PREFIX}/plugins/designer
+#QWT_INSTALL_PLUGINS = \$\${QWT_INSTALL_PREFIX}/plugins/designer
######################################################################
# When Qt has been built as framework qmake wants
@@ -157,7 +157,7 @@
# linux distributors often organize the Qt installation
# their way and QT_INSTALL_PREFIX doesn't offer a good
@@ -163,7 +163,7 @@ QWT_CONFIG += QwtOpenGL
macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) {
Expand All @@ -215,49 +186,12 @@ patch_qwt() {
######################################################################
--- a/src/src.pro
+++ b/src/src.pro
@@ -30,7 +30,8 @@ contains(QWT_CONFIG, QwtDll) {
# we increase the SONAME for every minor number
- QWT_SONAME=libqwt.so.\$\${VER_MAJ}.\$\${VER_MIN}
+ !macx: QWT_SONAME=libqwt.so.\$\${VER_MAJ}.\$\${VER_MIN}
+ macx: QWT_SONAME=\$\${QWT_INSTALL_LIBS}/libqwt.dylib
QMAKE_LFLAGS *= \$\${QMAKE_LFLAGS_SONAME}\$\${QWT_SONAME}
QMAKE_LFLAGS_SONAME=
@@ -36,6 +36,7 @@ contains(QWT_CONFIG, QwtDll) {
QMAKE_LFLAGS_SONAME=
}
}
EOF
}

patch_qwtpolar() {
patch -p1 < ${WORKDIR}/projects/scopy/CI/appveyor/patches/qwtpolar-qwt-qt-compat.patch

patch -p1 <<-EOF
--- a/qwtpolarconfig.pri
+++ b/qwtpolarconfig.pri
@@ -70,14 +72,14 @@ QWT_POLAR_INSTALL_FEATURES = \$\${QWT_POLAR_INSTALL_PREFIX}/features
# Otherwise you have to build it from the designer directory.
######################################################################
-QWT_POLAR_CONFIG += QwtPolarDesigner
+#QWT_POLAR_CONFIG += QwtPolarDesigner
######################################################################
# If you want to auto build the examples, enable the line below
# Otherwise you have to build them from the examples directory.
######################################################################
-QWT_POLAR_CONFIG += QwtPolarExamples
+#QWT_POLAR_CONFIG += QwtPolarExamples
######################################################################
# When Qt has been built as framework qmake wants
@@ -86,6 +88,6 @@ QWT_POLAR_CONFIG += QwtPolarExamples
macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
- QWT_POLAR_CONFIG += QwtPolarFramework
+ #QWT_POLAR_CONFIG += QwtPolarFramework
+ macx: QWT_SONAME=\$\${QWT_INSTALL_LIBS}/libqwt.dylib
}
EOF
}

Loading

0 comments on commit ecd30a5

Please sign in to comment.