From 121243565501a49037505e6f1b2cbdf560da47c2 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 4 Jul 2024 12:20:34 +0300 Subject: [PATCH] Try to deploy appimage --- .github/workflows/deploy.yml | 49 +++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 20098bc9e..b8b830cee 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,52 @@ env: QUCS_MACOS_RESOURCES: ./build/qucs/qucs-s.app/Contents/MacOS/re/qucs-s/ jobs: + build-linux-appimage: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: InstallQt5 + run: | + sudo apt-get update + sudo apt-get install -y qtbase5-dev qttools5-dev qtscript5-dev libqt5svg5-dev flex bison + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr + + - name: Build + # Build your program with the given configuration + run: | + cmake --build ${{github.workspace}}/build -j`nproc` --config ${{env.BUILD_TYPE}} + make -C ${{github.workspace}}/build install DESTDIR=${{github.workspace}}/AppDir + + + - name: Install linuxdeploy + run: | + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + sudo apt-get install fuse libfuse2 + chmod +x linuxdeploy-x86_64.AppImage + chmod +x linuxdeploy-plugin-qt-x86_64.AppImage + + - name: 'Create AppImage' + run: | + ./linuxdeploy-x86_64.AppImage --appdir ${{github.workspace}}/AppDir --desktop-file=${{github.workspace}}/AppDir/usr/share/applications/qucs-s.desktop --icon-file=${{github.workspace}}/AppDir/usr/share/icons/hicolor/256x256/apps/qucs-s.png --plugin=qt --output appimage + rm linuxdeploy-x86_64.AppImage + rm linuxdeploy-plugin-qt-x86_64.AppImage + mv *.AppImage Qucs-S-x86_64-Linux.AppImage + + - name: 'Upload artifact: AppImage' + uses: actions/upload-artifact@v2 + with: + name: Qucs-S-x86_64-Linux.AppImage + path: Qucs-S-x86_64-Linux.AppImage + + build-mac-intel: runs-on: macos-12 strategy: @@ -301,9 +347,10 @@ jobs: # Find existing zip and dmg files zip_files=$(find ~/artifacts -name "*.zip" -print0 | xargs -0 echo) dmg_files=$(find ~/artifacts -name "*.dmg" -print0 | xargs -0 echo) + appimage_files=$(find ~/artifacts -name "*.AppImage" -print0 | xargs -0 echo) # Create release only if there are files to upload - if [ -n "$zip_files" ] || [ -n "$dmg_files" ]; then + if [ -n "$zip_files" ] || [ -n "$dmg_files" ] || [ -n "$appimage_files" ]; then gh release create continuous_build \ $zip_files \ $dmg_files \