Skip to content

Commit

Permalink
test ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
bindea-cristian committed Sep 25, 2023
1 parent b8c63a6 commit 589dcae
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu20build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build Scopy
run: /bin/bash -c "source $GITHUB_WORKSPACE/ci/ubuntu/install_ubuntu_20_deps.sh && build_scopy"
run: /bin/bash -c "export CI_SCRIPT=ON && source $GITHUB_WORKSPACE/ci/ubuntu/install_ubuntu_20_deps.sh && build_scopy"
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu22build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- name: Build Scopy
run: |
/bin/bash -c "source $GITHUB_WORKSPACE/ci/ubuntu/install_ubuntu_22_deps.sh && build_scopy"
/bin/bash -c "export CI_SCRIPT=ON && source $GITHUB_WORKSPACE/ci/ubuntu/install_ubuntu_22_deps.sh && build_scopy"
- name: Run Tests
run: |
Expand Down
72 changes: 43 additions & 29 deletions ci/ubuntu/install_ubuntu_20_deps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash
set -xe
if [ "$CI_SCRIPT" == "ON" ]
then
set -ex
SRC_DIR=$GITHUB_WORKSPACE
git config --global --add safe.directory '*'
QT=/home/runner/Qt/5.15.2/gcc_64 # this is used to force the use of Qt5.15 for qt_add_resources
else
set -x
SRC_DIR=$(git rev-parse --show-toplevel)
QT=/opt/Qt/5.15.2/gcc_64
fi

USE_STAGING=$1

Expand All @@ -17,20 +27,16 @@ LIBSIGROKDECODE_BRANCH=master
QWT_BRANCH=qwt-multiaxes
LIBTINYIIOD_BRANCH=master

SRC_DIR=$GITHUB_WORKSPACE
STAGING_AREA=$PWD/staging
STAGING_AREA_DEPS=$STAGING_AREA/dependencies
QT=/home/runner/Qt/5.15.2/gcc_64 # this is used to force the use of Qt5.15 for qt_add_resources
#QT=/opt/Qt/5.15.2/gcc_64
QMAKE_BIN=$QT/bin/qmake
CMAKE_BIN=/bin/cmake
JOBS=-j8
ARCH=x86_64


if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ]
then
echo -- USING STAGING
STAGING_AREA=$PWD/staging
STAGING_AREA_DEPS=$STAGING_AREA/dependencies
mkdir -p $STAGING_AREA_DEPS
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STAGING_AREA_DEPS/lib:$QT/lib
CMAKE_OPTS=(\
Expand Down Expand Up @@ -88,8 +94,13 @@ build_with_cmake() {
cd $BUILD_FOLDER
$CMAKE $CURRENT_BUILD_CMAKE_OPTS ../
make $JOBS
sudo make $JOBS install
sudo ldconfig
if [ $INSTALL = "ON" ]
then
sudo make $JOBS install
sudo ldconfig
fi
INSTALL=""
CURRENT_BUILD_CMAKE_OPTS=""
}

update(){
Expand Down Expand Up @@ -124,21 +135,24 @@ build_libiio() {
-DENABLE_IPV6:BOOL=OFF \
-DINSTALL_UDEV_RULE:BOOL=OFF
"
build_with_cmake
INSTALL="ON"
build_with_cmake
popd
}

build_glog() {
echo "### Building glog - branch $GLOG_BRANCH"
pushd $STAGING_AREA/glog
CURRENT_BUILD_CMAKE_OPTS="-DWITH_GFLAGS=OFF"
INSTALL="ON"
build_with_cmake
popd
}

build_libad9361() {
echo "### Building libad9361 - branch $LIBAD9361_BRANCH"
pushd $STAGING_AREA/libad9361
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -154,23 +168,26 @@ build_libm2k() {
-DINSTALL_UDEV_RULES=OFF \
-DENABLE_LOG=ON
"
build_with_cmake
INSTALL="ON"
build_with_cmake
popd
}

build_spdlog() {
echo "### Building spdlog - branch $SPDLOG_BRANCH"
pushd $STAGING_AREA/spdlog
CURRENT_BUILD_CMAKE_OPTS="-DSPDLOG_BUILD_SHARED=ON"
build_with_cmake
INSTALL="ON"
build_with_cmake
popd
}

build_volk() {
echo "### Building volk - branch $VOLK_BRANCH"
pushd $STAGING_AREA/volk
CURRENT_BUILD_CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3"
build_with_cmake \
INSTALL="ON"
build_with_cmake
popd
}

Expand All @@ -188,7 +205,8 @@ build_gnuradio() {
-DENABLE_GR_IIO=ON \
-DENABLE_POSTINSTALL=OFF
"
build_with_cmake
INSTALL="ON"
build_with_cmake
popd
}

Expand All @@ -199,13 +217,15 @@ build_grm2k() {
-DENABLE_PYTHON=OFF \
-DDIGITAL=OFF
"
INSTALL="ON"
build_with_cmake
popd
}

build_grscopy() {
echo "### Building gr-scopy - branch $GRSCOPY_BRANCH"
pushd $STAGING_AREA/gr-scopy
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -218,9 +238,10 @@ build_libsigrokdecode() {
then
./configure --prefix $STAGING_AREA_DEPS
else
./configure``
./configure
fi
sudo make $JOBS install
make $JOBS
sudo make install
sudo ldconfig
popd
}
Expand Down Expand Up @@ -249,27 +270,20 @@ build_libtinyiiod() {
echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH"
pushd $STAGING_AREA/libtinyiiod
CURRENT_BUILD_CMAKE_OPTS="-DBUILD_EXAMPLES=OFF"
build_with_cmake
build_with_cmake
popd
}

build_scopy() {
echo "### Building scopy"
ls -la $SRC_DIR
pushd $SRC_DIR
rm -rf $SRC_DIR/build-$ARCH
mkdir -p $SRC_DIR/build-$ARCH
cd $SRC_DIR/build-$ARCH
$CMAKE \
-DCMAKE_LIBRARY_PATH=$STAGING_AREA_DEPS \
-DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS \
-DCMAKE_PREFIX_PATH=$STAGING_AREA_DEPS\;$QT \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
CURRENT_BUILD_CMAKE_OPTS="\
-DENABLE_PLUGIN_TEST=ON \
-DENABLE_TESTING=ON \
../
make $JOBS
-DENABLE_TESTING=ON
"
INSTALL="OFF"
build_with_cmake
popd
}

Expand Down
60 changes: 38 additions & 22 deletions ci/ubuntu/install_ubuntu_22_deps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash
set -xe
if [ "$CI_SCRIPT" == "ON" ]
then
set -ex
SRC_DIR=$GITHUB_WORKSPACE
git config --global --add safe.directory '*'
QT=/home/runner/5.15.2/gcc_64 # this is used to force the use of Qt5.15 for qt_add_resources
else
set -x
SRC_DIR=$(git rev-parse --show-toplevel)
QT=/opt/Qt/5.15.2/gcc_64
fi

USE_STAGING=$1

Expand All @@ -17,10 +27,6 @@ LIBSIGROKDECODE_BRANCH=master
QWT_BRANCH=qwt-multiaxes
LIBTINYIIOD_BRANCH=master

SRC_DIR=$GITHUB_WORKSPACE
STAGING_AREA=$PWD/staging
STAGING_AREA_DEPS=$STAGING_AREA/dependencies
QT=/home/runner/5.15.2/gcc_64 # this is used to force the use of Qt5.15 for qt_add_resources
QMAKE_BIN=$QT/bin/qmake
CMAKE_BIN=/bin/cmake
JOBS=-j8
Expand All @@ -29,6 +35,8 @@ ARCH=x86_64
if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ]
then
echo -- USING STAGING
STAGING_AREA=$PWD/staging
STAGING_AREA_DEPS=$STAGING_AREA/dependencies
mkdir -p $STAGING_AREA_DEPS
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STAGING_AREA_DEPS/lib:$QT/lib
CMAKE_OPTS=(\
Expand Down Expand Up @@ -86,8 +94,13 @@ build_with_cmake() {
cd $BUILD_FOLDER
$CMAKE $CURRENT_BUILD_CMAKE_OPTS ../
make $JOBS
sudo make $JOBS install
sudo ldconfig
if [ $INSTALL = "ON" ]
then
sudo make $JOBS install
sudo ldconfig
fi
INSTALL=""
CURRENT_BUILD_CMAKE_OPTS=""
}

update(){
Expand Down Expand Up @@ -121,6 +134,7 @@ build_libiio() {
-DENABLE_IPV6:BOOL=OFF \
-DINSTALL_UDEV_RULE:BOOL=OFF
"
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -129,13 +143,15 @@ build_glog() {
echo "### Building glog - branch $GLOG_BRANCH"
pushd $STAGING_AREA/glog
CURRENT_BUILD_CMAKE_OPTS="-DWITH_GFLAGS=OFF"
INSTALL="ON"
build_with_cmake
popd
}

build_libad9361() {
echo "### Building libad9361 - branch $LIBAD9361_BRANCH"
pushd $STAGING_AREA/libad9361
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -151,6 +167,7 @@ build_libm2k() {
-DINSTALL_UDEV_RULES=OFF \
-DENABLE_LOG=ON
"
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -159,6 +176,7 @@ build_spdlog() {
echo "### Building spdlog - branch $SPDLOG_BRANCH"
pushd $STAGING_AREA/spdlog
CURRENT_BUILD_CMAKE_OPTS="-DSPDLOG_BUILD_SHARED=ON"
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -167,7 +185,8 @@ build_volk() {
echo "### Building volk - branch $VOLK_BRANCH"
pushd $STAGING_AREA/volk
CURRENT_BUILD_CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3"
build_with_cmake \
INSTALL="ON"
build_with_cmake
popd
}

Expand All @@ -185,6 +204,7 @@ build_gnuradio() {
-DENABLE_GR_IIO=ON \
-DENABLE_POSTINSTALL=OFF
"
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -196,13 +216,15 @@ build_grm2k() {
-DENABLE_PYTHON=OFF \
-DDIGITAL=OFF
"
INSTALL="ON"
build_with_cmake
popd
}

build_grscopy() {
echo "### Building gr-scopy - branch $GRSCOPY_BRANCH"
pushd $STAGING_AREA/gr-scopy
INSTALL="ON"
build_with_cmake
popd
}
Expand All @@ -215,9 +237,10 @@ build_libsigrokdecode() {
then
./configure --prefix $STAGING_AREA_DEPS
else
./configure``
./configure
fi
sudo make $JOBS install
make $JOBS
sudo make install
sudo ldconfig
popd
}
Expand Down Expand Up @@ -254,19 +277,12 @@ build_scopy() {
echo "### Building scopy"
ls -la $SRC_DIR
pushd $SRC_DIR
rm -rf $SRC_DIR/build-$ARCH
mkdir -p $SRC_DIR/build-$ARCH
cd $SRC_DIR/build-$ARCH
$CMAKE \
-DCMAKE_LIBRARY_PATH=$STAGING_AREA_DEPS \
-DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS \
-DCMAKE_PREFIX_PATH=$STAGING_AREA_DEPS\;$QT \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
CURRENT_BUILD_CMAKE_OPTS="\
-DENABLE_PLUGIN_TEST=ON \
-DENABLE_TESTING=ON \
../
make $JOBS
-DENABLE_TESTING=ON
"
INSTALL="OFF"
build_with_cmake
popd
}

Expand Down

0 comments on commit 589dcae

Please sign in to comment.