test-linux-apt-appimage #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-linux-apt-appimage | |
| on: | |
| workflow_dispatch: | |
| # env: | |
| # REF_TAG: v0.0.0 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| BUILD_TYPE: Release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| repository: ctlcltd/e2-sat-editor | |
| # ref: ${{ env.REF_TAG }} | |
| path: e2-sat-editor | |
| - name: Setup Aptitude | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install curl libcurl4-openssl-dev | |
| sudo apt-get install qt6-base-dev qt6-translations-l10n | |
| #sudo apt-get install libqt6waylandclient6 libqt6wlshellintegration6 qt6-xdgdesktopportal-platformtheme | |
| sudo apt-get install libgl1-mesa-dev libglvnd-dev libxcb-xkb-dev libxkbcommon-x11-dev libvulkan-dev | |
| sudo apt-get install libcups2-dev | |
| sudo apt-get install cmake ninja-build | |
| - name: Download deploy tools | |
| run: | | |
| sudo apt-get install fuse wget | |
| 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 | |
| wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage | |
| chmod +x linuxdeploy-x86_64.AppImage | |
| chmod +x linuxdeploy-plugin-qt-x86_64.AppImage | |
| chmod +x appimagetool-x86_64.AppImage | |
| mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy | |
| mv linuxdeploy-plugin-qt-x86_64.AppImage /usr/local/bin/linuxdeploy-plugin-qt | |
| mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool | |
| - name: Configure CMake | |
| working-directory: ${{github.workspace}}/e2-sat-editor/src | |
| run: | | |
| cmake \ | |
| -G Ninja \ | |
| -B build \ | |
| -DCMAKE_INSTALL_PREFIX=/usr \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DRELEASE_MEDIUM=github \ | |
| -DWITHOUT_CLI=ON \ | |
| -DDOWNLOAD_CURL_CABUNDLE=ON | |
| - name: Build | |
| working-directory: ${{github.workspace}}/e2-sat-editor/src | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} | |
| - name: Deploy artifact | |
| working-directory: ${{github.workspace}}/e2-sat-editor/src | |
| continue-on-error: true | |
| run: | | |
| DESTDIR=../AppDir ninja -C build install | |
| # translations | |
| mkdir -p AppDir/usr/share/qt/translations | |
| cp /usr/share/qt6/translations/qt_*.qm AppDir/usr/share/qt/translations | |
| cp /usr/share/qt6/translations/qtbase_*.qm AppDir/usr/share/qt/translations | |
| rm -R AppDir/usr/share/qt/translations/qt_help_*.qm | |
| # usr-share | |
| mv AppDir/usr/share/applications/e2-sat-editor.desktop AppDir/usr/share/applications/io.github.ctlcltd.e2se.desktop | |
| mv AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.metainfo.xml AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.appdata.xml | |
| mkdir -p AppDir/usr/share/doc/e2-sat-editor | |
| mv AppDir/usr/share/e2-sat-editor/Readme.txt AppDir/usr/share/doc/e2-sat-editor/readme | |
| mv AppDir/usr/share/e2-sat-editor/License.txt AppDir/usr/share/doc/e2-sat-editor/copyright | |
| mv AppDir/usr/share/e2-sat-editor/Third-Party.txt AppDir/usr/share/doc/e2-sat-editor/third-party | |
| # run linuxdeploy | |
| export QMAKE=qmake6 | |
| export DISABLE_COPYRIGHT_FILES_DEPLOYMENT=1 | |
| #export EXTRA_QT_MODULES="eglfsdeviceintegration;eglfskmssupport;xcbqpa" | |
| #export EXTRA_PLATFORM_PLUGINS="libqeglfs.so;libqlinuxfb.so;libqminimal.so;libqminimalegl.so;libqoffscreen.so;libqvkkhrdisplay.so;libqvnc.so;libqwayland.so;libqxcb.so" | |
| linuxdeploy --appdir AppDir --plugin qt --output appimage | |
| # package | |
| mv e2_SAT_Editor-x86_64.AppImage ../artifact | |
| - name: Fix artifact | |
| working-directory: ${{github.workspace}}/e2-sat-editor/artifact | |
| continue-on-error: true | |
| run: | | |
| wget https://github.com/e2se/apprunqtlinux/archive/refs/heads/main.tar.gz | |
| tar -zxf main.tar.gz | |
| cd apprunqtlinux-main | |
| cmake -B . -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . --config Release | |
| cd .. | |
| ./e2_SAT_Editor-x86_64.AppImage --appimage-extract | |
| mv squashfs-root/AppRun squashfs-root/AppRun.wrapped | |
| cp apprunqtlinux-main/AppRun squashfs-root/AppRun | |
| chmod +x squashfs-root/AppRun | |
| mv e2_SAT_Editor-x86_64.AppImage e2_SAT_Editor-x86_64.AppImage.bak | |
| appimagetool squashfs-root e2_SAT_Editor-x86_64.AppImage | |
| rm -R {apprunqtlinux-main,squashfs-root} | |
| rm main.tar.gz | |
| #rm e2_SAT_Editor-x86_64.AppImage.bak | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ${{github.workspace}}/e2-sat-editor/artifact |