feat: ad for QuickDesk #514
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: Ubuntu | |
| on: | |
| push: | |
| paths: | |
| - 'QtScrcpy/**' | |
| - '!QtScrcpy/res/**' | |
| - '.github/workflows/ubuntu.yml' | |
| - 'ci/linux/**' | |
| pull_request: | |
| paths: | |
| - 'QtScrcpy/**' | |
| - '!QtScrcpy/res/**' | |
| - '.github/workflows/ubuntu.yml' | |
| - 'ci/linux/**' | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: ubuntu:20.04 | |
| options: --privileged | |
| strategy: | |
| matrix: | |
| qt-ver: [5.15.2] | |
| qt-arch-install: [gcc_64] | |
| gcc-arch: [x64] | |
| env: | |
| target-name: QtScrcpy | |
| qt-install-path: ${{ github.workspace }}/Qt/${{ matrix.qt-ver }} | |
| plantform-des: ubuntu | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - name: Install Git and basic dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y git ca-certificates sudo | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| submodules: 'true' | |
| ssh-key: ${{ secrets.BOT_SSH_KEY }} | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| libglew-dev \ | |
| libglfw3-dev \ | |
| imagemagick \ | |
| wget \ | |
| patchelf \ | |
| zip \ | |
| libxcb1-dev \ | |
| libxkbcommon-dev \ | |
| libxkbcommon-x11-dev \ | |
| libx11-dev \ | |
| libx11-xcb-dev \ | |
| libfontconfig1-dev \ | |
| libfreetype6-dev \ | |
| libxrender-dev \ | |
| libxext-dev \ | |
| gnupg \ | |
| lsb-release \ | |
| python3 \ | |
| python3-pip \ | |
| fuse \ | |
| libasound2-dev | |
| - name: Setup FUSE | |
| run: | | |
| apt-get install -y fuse | |
| if [ ! -e /dev/fuse ]; then | |
| mknod /dev/fuse c 10 229 || true | |
| chmod 666 /dev/fuse || true | |
| fi | |
| export APPIMAGE_EXTRACT_AND_RUN=1 | |
| - name: Install CMake 3.19+ | |
| run: | | |
| apt-get install -y software-properties-common | |
| apt-get update | |
| apt-get install -y cmake=3.19.* || { | |
| wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - | |
| apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' | |
| apt-get update | |
| apt-get install -y cmake | |
| } | |
| - name: Cache Qt | |
| id: cache-qt | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.qt-install-path }}/${{ matrix.qt-arch-install }} | |
| key: ubuntu-20.04/${{ matrix.qt-ver }}/${{ matrix.qt-arch-install }} | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4.1.1 | |
| with: | |
| version: ${{ matrix.qt-ver }} | |
| cache: ${{ steps.cache-qt.outputs.cache-hit }} | |
| setup-python: false | |
| - name: Build Release | |
| shell: bash | |
| env: | |
| ENV_QT_PATH: ${{ github.workspace }}/Qt/${{ matrix.qt-ver }} | |
| run: | | |
| python3 ci/generate-version.py | |
| ci/linux/build_for_linux.sh "Release" | |
| - name: Get the version | |
| shell: bash | |
| id: get-version | |
| run: echo ::set-output name=version::${GITHUB_REF##*/} | |
| - name: Package AppImage | |
| shell: bash | |
| env: | |
| ENV_QT_PATH: ${{ github.workspace }}/Qt/${{ matrix.qt-ver }} | |
| run: | | |
| chmod +x ci/linux/package_appimage.sh | |
| ci/linux/package_appimage.sh "Release" | |
| - name: Upload AppImage Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}-AppImage | |
| path: output/appimage/*.AppImage | |
| if-no-files-found: error | |
| - name: Prepare AppImage for Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| APPIMAGE_FILE=$(find output/appimage -name "QtScrcpy-*.AppImage" -type f | head -n 1) | |
| if [ -z "$APPIMAGE_FILE" ] || [ ! -f "$APPIMAGE_FILE" ]; then | |
| echo "Error: AppImage file not found" | |
| exit 1 | |
| fi | |
| FINAL_NAME="${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}.AppImage" | |
| cp "$APPIMAGE_FILE" "$FINAL_NAME" | |
| - name: Upload AppImage to Releases | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: svenstaro/upload-release-action@2.3.0 | |
| with: | |
| file: ${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}.AppImage | |
| asset_name: ${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}.AppImage | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref }} | |
| overwrite: true |