Skip to content

Commit

Permalink
ci/x86_64: rename appimageubuntu workflow to appimage-x86_64
Browse files Browse the repository at this point in the history
 - the AppImage is compatible with a wider range of distributions beyond just Ubuntu

Signed-off-by: Bindea Cristian <[email protected]>
  • Loading branch information
bindea-cristian committed Jun 12, 2024
1 parent b058151 commit 46aee73
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ubuntu Scopy Appimage Build
name: Scopy1 x86_64 AppImage Build

on: [push, pull_request]

Expand All @@ -8,7 +8,7 @@ env:

jobs:

build_scopy1_ubuntu_appimage:
build_scopy1_x86-64_appimage:
runs-on: ubuntu-20.04

steps:
Expand All @@ -17,29 +17,29 @@ 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
run: echo "commit_sha=$(git rev-parse --short ${{ github.sha }})" >> "$GITHUB_ENV"

- 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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
File renamed without changes.
10 changes: 5 additions & 5 deletions CI/appimage/docker/Dockerfile → CI/x86_64/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
}

Expand Down Expand Up @@ -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
}

Expand All @@ -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

Expand All @@ -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
}

Expand All @@ -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(){
Expand Down

0 comments on commit 46aee73

Please sign in to comment.