From 0b899dbdb3a734450e67dd5fc6a76b35dfed96b3 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Tue, 28 Mar 2023 22:24:29 -0400 Subject: [PATCH] Move scripts to circle-ci Minor updates to build scripts --- .circleci/config.yml | 14 +++++++------- .circleci/scripts/build_cubicsdr.sh | 5 +++++ .../scripts}/build_liquiddsp.sh | 12 +++++------- .circleci/scripts/build_soapysdr.sh | 13 +++++++++++++ .../scripts}/build_wxwidgets.sh | 10 ++++------ travis-ci/build_cubicsdr.sh | 7 ------- travis-ci/build_soapysdr.sh | 16 ---------------- 7 files changed, 34 insertions(+), 43 deletions(-) create mode 100644 .circleci/scripts/build_cubicsdr.sh rename {travis-ci => .circleci/scripts}/build_liquiddsp.sh (55%) create mode 100644 .circleci/scripts/build_soapysdr.sh rename {travis-ci => .circleci/scripts}/build_wxwidgets.sh (90%) delete mode 100644 travis-ci/build_cubicsdr.sh delete mode 100644 travis-ci/build_soapysdr.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 365af37..9dbca3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 jobs: - build: + build_linux: docker: - image: cimg/base:2020.01 environment: @@ -9,7 +9,7 @@ jobs: - checkout - restore_cache: keys: - - cache-{{ checksum "travis-ci/build_wxwidgets.sh" }} + - cache-{{ checksum ".circleci/scripts/build_wxwidgets.sh" }} - run: name: Install Dependencies command: | @@ -17,17 +17,17 @@ jobs: sudo apt-get install -y build-essential cmake libpulse-dev libgtk-3-dev freeglut3 freeglut3-dev libhamlib-dev - run: name: Build wxWidgets - command: bash travis-ci/build_wxwidgets.sh + command: bash .circleci/scripts/build_wxwidgets.sh - run: name: Build LiquidDSP - command: bash travis-ci/build_liquiddsp.sh + command: bash .circleci/scripts/build_liquiddsp.sh - run: name: Build SoapySDR - command: bash travis-ci/build_soapysdr.sh + command: bash .circleci/scripts/build_soapysdr.sh - run: name: Build CubicSDR - command: bash travis-ci/build_cubicsdr.sh + command: bash .circleci/scripts/build_cubicsdr.sh - save_cache: - key: cache-{{ checksum "travis-ci/build_wxwidgets.sh" }} + key: cache-{{ checksum ".circleci/scripts/build_wxwidgets.sh" }} paths: - ~/build/wxWidgets/staticlib diff --git a/.circleci/scripts/build_cubicsdr.sh b/.circleci/scripts/build_cubicsdr.sh new file mode 100644 index 0000000..138a470 --- /dev/null +++ b/.circleci/scripts/build_cubicsdr.sh @@ -0,0 +1,5 @@ +# CubicSDR +mkdir -p $HOME/build/cjcliffe/CubicSDR-build +cd $HOME/build/cjcliffe/CubicSDR-build +cmake ~/project -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=$HOME/build/wxWidgets/staticlib/bin/wx-config -DUSE_HAMLIB=1 -DENABLE_DIGITAL_LAB=1 +make -j$(nproc) diff --git a/travis-ci/build_liquiddsp.sh b/.circleci/scripts/build_liquiddsp.sh similarity index 55% rename from travis-ci/build_liquiddsp.sh rename to .circleci/scripts/build_liquiddsp.sh index 12d9ef2..470ccd8 100644 --- a/travis-ci/build_liquiddsp.sh +++ b/.circleci/scripts/build_liquiddsp.sh @@ -1,16 +1,14 @@ # Liquid-DSP -cd $HOME/build - -mkdir jgaeddert/ -cd jgaeddert/ +mkdir -p $HOME/build/jgaeddert +cd $HOME/build/jgaeddert git clone https://github.com/jgaeddert/liquid-dsp.git -cd liquid-dsp/ +cd $HOME/build/jgaeddert/liquid-dsp ./bootstrap.sh echo "Configuring liquid-dsp.." ./configure > /dev/null echo "Building liquid-dsp.." -make -j2 > /dev/null -sudo make install \ No newline at end of file +make -j$(nproc) > /dev/null +sudo make install diff --git a/.circleci/scripts/build_soapysdr.sh b/.circleci/scripts/build_soapysdr.sh new file mode 100644 index 0000000..1901337 --- /dev/null +++ b/.circleci/scripts/build_soapysdr.sh @@ -0,0 +1,13 @@ +# Soapy SDR +mkdir -p $HOME/build/pothosware/SoapySDR-build + +cd $HOME/build/pothosware +git clone https://github.com/pothosware/SoapySDR.git + +cd $HOME/build/pothosware/SoapySDR-build +cmake $HOME/build/pothosware/SoapySDR -DCMAKE_BUILD_TYPE=Release + +echo "Building SoapySDR.." +make -j$(nproc) > /dev/null + +sudo make install diff --git a/travis-ci/build_wxwidgets.sh b/.circleci/scripts/build_wxwidgets.sh similarity index 90% rename from travis-ci/build_wxwidgets.sh rename to .circleci/scripts/build_wxwidgets.sh index aa5b065..0c6a74c 100644 --- a/travis-ci/build_wxwidgets.sh +++ b/.circleci/scripts/build_wxwidgets.sh @@ -8,9 +8,8 @@ fi echo "Fetch wxWidgets.." -cd $HOME/build mkdir -p $HOME/build/wxWidgets/staticlib -cd wxWidgets +cd $HOME/build/wxWidgets wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2 > /dev/null echo "Unpacking wxWidgets.." @@ -18,15 +17,14 @@ tar -xvjf wxWidgets-3.2.1.tar.bz2 > /dev/null cd wxWidgets-3.2.1/ ./autogen.sh -if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then +if [[ "$CIRCLE_JOB" == "build_linux" ]]; then ./configure --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webview --disable-webviewwebkit --prefix=`echo $HOME/build/wxWidgets/staticlib` CXXFLAGS="-std=c++0x" fi -if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then +if [[ "$CIRCLE_JOB" == "build_mac" ]]; then ./configure --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --with-mac --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo $HOME/build/wxWidgets/staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr fi echo "Building wxWidgets.." -make -j2 +make -j$(nproc) make install - diff --git a/travis-ci/build_cubicsdr.sh b/travis-ci/build_cubicsdr.sh deleted file mode 100644 index bbdbc2d..0000000 --- a/travis-ci/build_cubicsdr.sh +++ /dev/null @@ -1,7 +0,0 @@ -# CubicSDR -cd $HOME/build -mkdir cjcliffe/CubicSDR-build -cd cjcliffe/CubicSDR-build -cmake ../CubicSDR -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=$HOME/build/wxWidgets/staticlib/bin/wx-config -DUSE_HAMLIB=1 -DENABLE_DIGITAL_LAB=1 -make -j2 - diff --git a/travis-ci/build_soapysdr.sh b/travis-ci/build_soapysdr.sh deleted file mode 100644 index 0f8b8a1..0000000 --- a/travis-ci/build_soapysdr.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Soapy SDR -cd $HOME/build - -mkdir pothosware/ -cd pothosware/ -git clone https://github.com/pothosware/SoapySDR.git - -mkdir SoapySDR-build -cd SoapySDR-build - -cmake ../SoapySDR -DCMAKE_BUILD_TYPE=Release - -echo "Building SoapySDR.." -make -j2 > /dev/null - -sudo make install \ No newline at end of file