From 734256c1a1a5b8b0375c1662b344b4e2cd9b3244 Mon Sep 17 00:00:00 2001 From: Eyal Gal Date: Sat, 25 Dec 2021 21:01:42 +0200 Subject: [PATCH 1/2] Create cmake.yml updating apt-get command remove '\' from apt-get fix the mkdir command change cat to ls add fixing up of pkgconfig installed files print the pkconfig after the change --- .github/workflows/cmake.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 00000000..63aefebb --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,48 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + BUILD_TYPE: Release + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Container + run: sudo apt-get update && sudo apt-get install -y git-core build-essential cmake autoconf automake libtool pkg-config libglib2.0-dev libzip-dev libudev-dev libusb-1.0-0-dev python3-dev qt5-default libboost-dev libboost-test-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev check libfftw3-dev wget + + - name: make staging area + run: mkdir -p ${{github.workspace}}/staging/AppDir + + - name: build libsigrok4DSL + run: cd libsigrok4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. + + - name: build libsigrokdecode4DSL + run: cd libsigrokdecode4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. + + - name: fix AppImage pkgconfig files + run: find ${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig/*pc|xargs sed -i "s#/usr/local#${{github.workspace}}/staging/AppDir/usr/local#g" + + - name: build DSView + run: cd DSView && PKG_CONFIG_PATH="${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig" cmake . -DCMAKE_INSTALL_PREFIX=/usr && make && make install DESTDIR="${{github.workspace}}/staging/AppDir" + + - name: get AppImage util + run: cd ${{github.workspace}}/staging && wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage + + - name: create AppImage + run: cd ${{github.workspace}}/staging && LD_LIBRARY_PATH="${{github.workspace}}/staging/AppDir/usr/local/lib" ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage || ls -l + + - name: Upload Artifact (AppImage) + uses: actions/upload-artifact@v4 + with: + name: DSView.AppImage + path: ${{github.workspace}}/staging/*.AppImage + From db671577aaa0d77df934961a52583e6e960a6720 Mon Sep 17 00:00:00 2001 From: Eyal Gal Date: Mon, 21 Jul 2025 22:04:17 +0300 Subject: [PATCH 2/2] fixing the github workflow to suite the bre 22.04 --- .github/workflows/cmake.yml | 81 ++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 63aefebb..0e30538f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,48 +1,57 @@ -name: CMake +name: Build DSView AppImage on: + workflow_dispatch: push: branches: [ master ] pull_request: - branches: [ master ] - -env: - BUILD_TYPE: Release jobs: - build: - runs-on: ubuntu-latest + build-appimage: + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - - name: Setup Container - run: sudo apt-get update && sudo apt-get install -y git-core build-essential cmake autoconf automake libtool pkg-config libglib2.0-dev libzip-dev libudev-dev libusb-1.0-0-dev python3-dev qt5-default libboost-dev libboost-test-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev check libfftw3-dev wget - - - name: make staging area - run: mkdir -p ${{github.workspace}}/staging/AppDir - - - name: build libsigrok4DSL - run: cd libsigrok4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. - - - name: build libsigrokdecode4DSL - run: cd libsigrokdecode4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. - - - name: fix AppImage pkgconfig files - run: find ${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig/*pc|xargs sed -i "s#/usr/local#${{github.workspace}}/staging/AppDir/usr/local#g" - - - name: build DSView - run: cd DSView && PKG_CONFIG_PATH="${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig" cmake . -DCMAKE_INSTALL_PREFIX=/usr && make && make install DESTDIR="${{github.workspace}}/staging/AppDir" - - - name: get AppImage util - run: cd ${{github.workspace}}/staging && wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage - - - name: create AppImage - run: cd ${{github.workspace}}/staging && LD_LIBRARY_PATH="${{github.workspace}}/staging/AppDir/usr/local/lib" ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage || ls -l - - - name: Upload Artifact (AppImage) + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + git gcc g++ make cmake qtbase5-dev qt5-qmake qtbase5-dev-tools \ + libglib2.0-dev zlib1g-dev libusb-1.0-0-dev libboost-dev \ + libfftw3-dev python3-dev libudev-dev pkg-config patchelf wget file + + - name: Clone DSView + run: | + git clone https://github.com/DreamSourceLab/DSView.git + + - name: Build and install DSView + run: | + cd DSView + mkdir build && cd build + cmake .. -DCMAKE_INSTALL_PREFIX=/usr + make -j$(nproc) + make DESTDIR=$PWD/AppDir install + + - name: Download linuxdeploy and plugins + run: | + mkdir -p $HOME/linuxdeploy + cd $HOME/linuxdeploy + wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + wget -c https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + chmod +x linuxdeploy-*.AppImage + + - name: Build AppImage + run: | + cd DSView/build + export VERSION="$(git describe --tags --always)" + export APPIMAGE_EXTRACT_AND_RUN=1 + + $HOME/linuxdeploy/linuxdeploy-x86_64.AppImage --appdir AppDir \ + --output appimage \ + --plugin qt + + - name: Upload AppImage artifact uses: actions/upload-artifact@v4 with: - name: DSView.AppImage - path: ${{github.workspace}}/staging/*.AppImage + name: DSView-AppImage + path: DSView/build/*.AppImage