From fa1ec5c75bf6640074ac9b27f64b139d352465dc Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 4 Jul 2024 12:20:34 +0300 Subject: [PATCH 1/5] Add Linux Qt6/X11 AppImage in deploy.yml --- .github/workflows/deploy.yml | 53 ++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 20098bc9e..97c2d3062 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,54 @@ env: QUCS_MACOS_RESOURCES: ./build/qucs/qucs-s.app/Contents/MacOS/re/qucs-s/ jobs: + build-linux-appimage-qt6: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libglx-dev linguist-qt6 qt6-l10n-tools libqt6svg6-dev libgl1-mesa-dev + sudo apt-get install -y flex bison gperf dos2unix + - 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 -DWITH_QT6=ON + + - 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: | + export QMAKE=/usr/bin/qmake6 + ./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: @@ -274,7 +322,7 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' needs: - #- build-linux + - build-linux-appimage-qt6 - build-mac-intel - build-mac-arm - build-windows @@ -301,9 +349,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 \ From ef57226ecdfe4bf49465ef76a8a581a001c885e1 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 4 Jul 2024 13:06:15 +0300 Subject: [PATCH 2/5] Remove appimage.yml and cmake_qt6.yml --- .github/workflows/appimage.yml | 63 --------------------------------- .github/workflows/cmake_qt6.yml | 46 ------------------------ 2 files changed, 109 deletions(-) delete mode 100644 .github/workflows/appimage.yml delete mode 100644 .github/workflows/cmake_qt6.yml diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml deleted file mode 100644 index 170cab78f..000000000 --- a/.github/workflows/appimage.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: AppImage - -on: - push: - branches: [ "master" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - -jobs: - - - - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - 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 - - diff --git a/.github/workflows/cmake_qt6.yml b/.github/workflows/cmake_qt6.yml deleted file mode 100644 index 9580d3033..000000000 --- a/.github/workflows/cmake_qt6.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: CMake-Qt6 - -on: - push: - branches: [ "master", "current", "release/*" ] - paths: [ "**.cpp", "**.h", "**/CMakeLists.txt" ] - pull_request: - branches: [ "master", "current", "release/*" ] - paths: [ "**.cpp", "**.h", "**/CMakeLists.txt" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - -jobs: - - - - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: InstallQt6 - run: | - sudo apt-get update - sudo apt-get install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libglx-dev linguist-qt6 qt6-l10n-tools libqt6svg6-dev libgl1-mesa-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 -DWITH_QT6=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build -j`nproc` --config ${{env.BUILD_TYPE}} - - #- name: Test - # working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - # run: ctest -C ${{env.BUILD_TYPE}} - From 7fc608b8d4e7e9405b6098955a8407ddee17f1f3 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 4 Jul 2024 13:07:19 +0300 Subject: [PATCH 3/5] Rename job name cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 72f8d9137..b6854d2c1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,4 +1,4 @@ -name: CMake +name: CMake Linux Qt5 on: push: From 9ef2814890c7b1ed75cfa1adb207f688872ca0cd Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 4 Jul 2024 13:56:22 +0300 Subject: [PATCH 4/5] Update release section --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 97c2d3062..4f49095f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -356,6 +356,7 @@ jobs: gh release create continuous_build \ $zip_files \ $dmg_files \ + $appimage_files \ -p \ --repo $GITHUB_REPOSITORY \ --title "Continuous build" \ From 73d5918f0a40d27e950639bde8e0bb500dd6a332 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 4 Jul 2024 14:11:28 +0300 Subject: [PATCH 5/5] Fix typo in QUCS_MACOS_RESOURCES --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4f49095f2..b1a9c869c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ env: BUILD_TYPE: Release QT_VERSION: 6.7.2 QUCS_MACOS_BIN: ./build/qucs/qucs-s.app/Contents/MacOS/bin - QUCS_MACOS_RESOURCES: ./build/qucs/qucs-s.app/Contents/MacOS/re/qucs-s/ + QUCS_MACOS_RESOURCES: ./build/qucs/qucs-s.app/Contents/MacOS/share/qucs-s/ jobs: build-linux-appimage-qt6: