Update linux.yml #52
Workflow file for this run
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: Compile and Deploy for Linux | |
| on: push | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| SOURCE_DIR: ${{ github.workspace }} | |
| QT_VERSION: 6.8.0 | |
| ARTIFACT: Cryptographer-Linux-x86_64.AppImage | |
| jobs: | |
| build: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: ${{ env.QT_VERSION }} | |
| host: linux | |
| target: desktop | |
| arch: linux_gcc_64 | |
| dir: ${{ env.SOURCE_DIR }}/qt | |
| setup-python: false | |
| - name: Create build directory | |
| run: mkdir ${{ env.SOURCE_DIR }}/build | |
| - name: Build | |
| working-directory: ${{ env.SOURCE_DIR }}/build | |
| run: | | |
| qmake -r ${{ env.SOURCE_DIR }}/Cryptographer.pro -o Makefile | |
| make | |
| - name: AppImage | |
| working-directory: ${{ env.SOURCE_DIR }}/build | |
| run: | | |
| sudo add-apt-repository universe | |
| sudo apt install libfuse2 | |
| sudo apt-get install libicu-dev | |
| sudo apt-get install libxcb-cursor-dev | |
| 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" | |
| wget -c "https://github.com/darealshinji/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt.sh" | |
| wget -c "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage" | |
| chmod a+x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-checkrt.sh linuxdeploy-plugin-qt-x86_64.AppImage linuxdeploy-plugin-appimage-x86_64.AppImage | |
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ github.workspace }}/Qt/6.8.0/gcc_64/lib/ | |
| ./linuxdeploy-x86_64.AppImage --appdir AppDir --executable Cryptographer --create-desktop-file --icon-file ${{ env.SOURCE_DIR }}/Cryptographer.svg --plugin qt --plugin checkrt --output appimage | |
| mv Cryptographer*.AppImage ${{ env.ARTIFACT }} | |
| - name: Linux artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ARTIFACT }} | |
| path: ${{ env.SOURCE_DIR }}/build/${{ env.ARTIFACT }} |