diff --git a/.github/workflows/appimageubuntu.yml b/.github/workflows/appimage-x86_64.yml similarity index 65% rename from .github/workflows/appimageubuntu.yml rename to .github/workflows/appimage-x86_64.yml index 5e7ae506bc..d74df7589e 100644 --- a/.github/workflows/appimageubuntu.yml +++ b/.github/workflows/appimage-x86_64.yml @@ -1,4 +1,4 @@ -name: Ubuntu Scopy Appimage Build +name: Scopy1 x86_64 AppImage Build on: [push, pull_request] @@ -8,7 +8,7 @@ env: jobs: - build_scopy1_ubuntu_appimage: + build_scopy1_x86-64_appimage: runs-on: ubuntu-20.04 steps: @@ -17,23 +17,23 @@ jobs: set-safe-directory: 'true' - name: Pull the Docker Image - run: docker pull cristianbindea/scopy1-ubuntu-appimage:latest + run: docker pull cristianbindea/scopy1-x86_64-appimage:latest - name: Create Scopy AppImage shell: bash run: | export CI_SCRIPT=ON cd $GITHUB_WORKSPACE - ./CI/appimage/ubuntu_appimage_process.sh generate_ci_envs + ./CI/x86_64/x86-64_appimage_process.sh generate_ci_envs docker run \ --mount type=bind,source="$GITHUB_WORKSPACE",target=/home/runner/scopy \ - --env-file $GITHUB_WORKSPACE/CI/appimage/gh-actions.envs \ - cristianbindea/scopy1-ubuntu-appimage:latest \ + --env-file $GITHUB_WORKSPACE/CI/x86_64/gh-actions.envs \ + cristianbindea/scopy1-x86_64-appimage:latest \ /bin/bash -c 'cd $HOME && \ sudo chown -R runner:runner scopy && \ cd $HOME/scopy && \ - ./CI/appimage/ubuntu_appimage_process.sh download_tools build_iio-emu build_scopy create_appdir create_appimage move_appimage + ./CI/x86_64/x86-64_appimage_process.sh download_tools build_iio-emu build_scopy create_appdir create_appimage move_appimage ' - name: Set short git commit SHA shell: bash @@ -41,5 +41,5 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: scopy-ubuntu-x86_64-${{ env.commit_sha }} + name: scopy-linux-x86_64-${{ env.commit_sha }} path: ${{ github.workspace }}/Scopy1-x86_64.AppImage diff --git a/.gitignore b/.gitignore index 5b92e56980..fdbf2bd61f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ android*.sh CI/armhf/staging CI/armhf/scopy.AppDir CI/armhf/scopy.squashfs -CI/appimage/staging -CI/appimage/scopy.AppDir +CI/x86_64/staging +CI/x86_64/scopy.AppDir html/ build_arm64-v8a/ diff --git a/CI/appimage/AppRun b/CI/x86_64/AppRun similarity index 100% rename from CI/appimage/AppRun rename to CI/x86_64/AppRun diff --git a/CI/appimage/docker/Dockerfile b/CI/x86_64/docker/Dockerfile similarity index 78% rename from CI/appimage/docker/Dockerfile rename to CI/x86_64/docker/Dockerfile index d2518b6f70..6758e5d20a 100644 --- a/CI/appimage/docker/Dockerfile +++ b/CI/x86_64/docker/Dockerfile @@ -1,4 +1,4 @@ -#docker build -t cristianbindea/scopy1-ubuntu-appimage . +#docker build -t cristianbindea/scopy1-x86_64-appimage . #DOCKER_BUILDKIT=0 FROM ubuntu:20.04 SHELL ["/bin/bash", "-c"] @@ -23,13 +23,13 @@ RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-$USER && \ USER $USER WORKDIR /home/${USER} -RUN git clone https://github.com/analogdevicesinc/scopy --branch appimage-scopy1 +RUN git clone https://github.com/analogdevicesinc/scopy --branch dev WORKDIR /home/${USER}/scopy -RUN ./CI/appimage/ubuntu_appimage_process.sh install_packages +ENV CI_SCRIPT=ON +RUN ./CI/x86_64/x86-64_appimage_process.sh install_packages RUN sudo pip3 install aqtinstall && sudo python3 -m aqt install-qt --outputdir /opt/Qt linux desktop 5.15.2 -RUN ./CI/appimage/ubuntu_appimage_process.sh clone download_tools build_deps +RUN ./CI/x86_64/x86-64_appimage_process.sh clone download_tools build_deps -# to be set at runtime CI_SCRIPT=ON WORKDIR /home/${USER} # RUN rm -rf scopy diff --git a/CI/appimage/scopy.desktop b/CI/x86_64/scopy.desktop similarity index 100% rename from CI/appimage/scopy.desktop rename to CI/x86_64/scopy.desktop diff --git a/CI/appimage/ubuntu_appimage_process.sh b/CI/x86_64/x86-64_appimage_process.sh similarity index 94% rename from CI/appimage/ubuntu_appimage_process.sh rename to CI/x86_64/x86-64_appimage_process.sh index a767f572b7..c4574f226f 100755 --- a/CI/appimage/ubuntu_appimage_process.sh +++ b/CI/x86_64/x86-64_appimage_process.sh @@ -35,14 +35,14 @@ PYTHON_VERSION=python3.8 QT_LOCATION=/opt/Qt/5.15.2/gcc_64 -STAGING_AREA=$SRC_DIR/CI/appimage/staging +STAGING_AREA=$SRC_DIR/CI/x86_64/staging QMAKE_BIN=$QT_LOCATION/bin/qmake CMAKE_BIN=${STAGING_AREA}/cmake/bin/cmake JOBS=-j14 APP_DIR_NAME=scopy.AppDir -APP_DIR=$SRC_DIR/CI/appimage/$APP_DIR_NAME -APP_IMAGE=$SRC_DIR/CI/appimage/Scopy1-x86_64.AppImage +APP_DIR=$SRC_DIR/CI/x86_64/$APP_DIR_NAME +APP_IMAGE=$SRC_DIR/CI/x86_64/Scopy1-x86_64.AppImage if [ "$USE_STAGING" == "ON" ] then @@ -253,16 +253,24 @@ build_qwt() { pushd $STAGING_AREA/qwt git clean -xdf sed -i 's|/usr/local/qwt-$$QWT_VERSION-ma|/usr/local|g' qwtconfig.pri + + INSTALL=$1 + [ -z $INSTALL ] && INSTALL=ON + if [ "$USE_STAGING" == "ON" ] then $QMAKE_BIN INCLUDEPATH=$STAGING_AREA_DEPS/include LIBS=-L$STAGING_AREA_DEPS/lib qwt.pro make $JOBS - make INSTALL_ROOT=$STAGING_AREA_DEPS install + if [ "$INSTALL" == "ON" ];then + make INSTALL_ROOT=$STAGING_AREA_DEPS install + fi cp -r $STAGING_AREA_DEPS/usr/local/* $STAGING_AREA_DEPS/ else $QMAKE_BIN qwt.pro make $JOBS - sudo make install + if [ "$INSTALL" == "ON" ];then + sudo make install + fi fi popd @@ -273,6 +281,10 @@ build_libsigrokdecode() { pushd $STAGING_AREA/libsigrokdecode git clean -xdf ./autogen.sh + + INSTALL=$1 + [ -z $INSTALL ] && INSTALL=ON + if [ "$USE_STAGING" == "ON" ] then ./configure --prefix $STAGING_AREA_DEPS @@ -281,7 +293,10 @@ build_libsigrokdecode() { ./configure make $JOBS fi - if [ "$USE_STAGING" == "ON" ]; then make install; else sudo make install; fi + + if [ "$INSTALL" == "ON" ];then + if [ "$USE_STAGING" == "ON" ]; then make install; else sudo make install; fi + fi popd } @@ -324,8 +339,8 @@ build_deps(){ build_gnuradio ON build_grscopy ON build_grm2k ON - build_qwt - build_libsigrokdecode + build_qwt ON + build_libsigrokdecode ON build_libtinyiiod ON } @@ -343,8 +358,8 @@ create_appdir(){ ${STAGING_AREA}/linuxdeploy-x86_64.AppImage \ --appdir $APP_DIR \ --executable $SRC_DIR/build/scopy \ - --custom-apprun $SRC_DIR/CI/appimage/AppRun \ - --desktop-file $SRC_DIR/CI/appimage/scopy.desktop \ + --custom-apprun $SRC_DIR/CI/x86_64/AppRun \ + --desktop-file $SRC_DIR/CI/x86_64/scopy.desktop \ --icon-file $SRC_DIR/resources/Scopy.png \ --plugin qt @@ -371,6 +386,7 @@ create_appdir(){ cp /usr/lib/x86_64-linux-gnu/libXdmcp.so* $APP_DIR/usr/lib cp /usr/lib/x86_64-linux-gnu/libbsd.so* $APP_DIR/usr/lib cp /usr/lib/x86_64-linux-gnu/libXau.so* $APP_DIR/usr/lib + cp /usr/lib/x86_64-linux-gnu/libffi.so* $APP_DIR/usr/lib popd } @@ -386,7 +402,7 @@ create_appimage(){ } generate_ci_envs(){ - $GITHUB_WORKSPACE/CI/appveyor/gen_ci_envs.sh > $GITHUB_WORKSPACE/CI/appimage/gh-actions.envs + $GITHUB_WORKSPACE/CI/appveyor/gen_ci_envs.sh > $GITHUB_WORKSPACE/CI/x86_64/gh-actions.envs } move_appimage(){