From 151f5dd6787a16b16e65500522d7f5ae3bddfb26 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 26 Oct 2025 20:13:53 -0500 Subject: [PATCH] Switch to GitHub Actions for AppImage builds --- .github/workflows/build-appimage.yml | 149 +++++++++++++++++++++++++++ README.md | 2 +- appveyor.yml | 35 ------- 3 files changed, 150 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/build-appimage.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/build-appimage.yml b/.github/workflows/build-appimage.yml new file mode 100644 index 00000000..cd207f3f --- /dev/null +++ b/.github/workflows/build-appimage.yml @@ -0,0 +1,149 @@ +name: Build Linux AppImage + +on: + push: + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: 'recursive' + fetch-depth: 1 + + - name: Setup environment + run: | + wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - + sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.4.313-jammy.list https://packages.lunarg.com/vulkan/1.4.313/lunarg-vulkan-1.4.313-jammy.list + sudo apt update + sudo apt install -y qt6-base-dev qt6-declarative-dev libqt6svg6-dev qml6-module-qtquick-controls qml6-module-qtquick-templates qml6-module-qtquick-layouts \ + qml6-module-qtqml-workerscript qml6-module-qtquick-window qml6-module-qtquick python3-pip nasm libgbm-dev libdrm-dev libfreetype-dev libasound2-dev \ + libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev \ + libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev libxcb-dri3-dev libx11-xcb-dev \ + wayland-protocols libopus-dev libvdpau-dev libgl-dev libpipewire-0.3-dev vulkan-sdk + sudo pip3 install meson + mkdir -p dep_root/{bin,include,lib} + echo "DEP_ROOT=$PWD/dep_root" >> $GITHUB_ENV + echo "$PWD/dep_root/bin" >> $GITHUB_PATH + + - name: Set CI version + run: | + CI_VERSION=`echo $GITHUB_SHA | cut -c1-6` + echo "CI_VERSION=$CI_VERSION" >> $GITHUB_ENV + + - name: Checkout SDL + uses: actions/checkout@v4 + with: + repository: libsdl-org/SDL + ref: 235e4870af091ea7e3814ee2dbdb8e2ec627aaf0 + path: deps/SDL + + - name: Build SDL + working-directory: deps/SDL + run: | + ./autogen.sh + ./configure + make -j$(nproc) + sudo make install + + - name: Checkout SDL_ttf + uses: actions/checkout@v4 + with: + repository: libsdl-org/SDL_ttf + ref: release-2.22.0 + path: deps/SDL_ttf + submodules: 'recursive' + + - name: Build SDL_ttf + working-directory: deps/SDL_ttf + run: | + ./autogen.sh + ./configure + make -j$(nproc) + sudo make install + + - name: Checkout libva + uses: actions/checkout@v4 + with: + repository: intel/libva + ref: 2.22.0 + path: deps/libva + + - name: Build libva + working-directory: deps/libva + run: | + ./autogen.sh + ./configure --enable-x11 + make -j$(nproc) + sudo make install + + - name: Checkout libplacebo + uses: actions/checkout@v4 + with: + repository: haasn/libplacebo + ref: 63a3d64ac32eaaa56aa60b5000d43c02544c6508 + path: deps/libplacebo + submodules: 'recursive' + + - name: Build libplacebo + working-directory: deps/libplacebo + run: | + git apply ../../app/deploy/linux/appimage/*.patch + meson setup build -Dvulkan=enabled -Dopengl=disabled -Ddemos=false + ninja -C build + sudo ninja install -C build + + - name: Build dav1d + working-directory: deps + env: + DAV1D_VER: 1.5.1 + run: | + git clone --branch $DAV1D_VER --depth 1 https://code.videolan.org/videolan/dav1d.git + pushd dav1d + meson setup build -Ddefault_library=static -Dbuildtype=release -Denable_tools=false -Denable_tests=false + ninja -C build + sudo ninja install -C build + popd + + - name: Checkout FFmpeg + uses: actions/checkout@v4 + with: + repository: FFmpeg/FFmpeg + ref: dd00a614e16a15db0b230dfe45790e913e593695 + path: deps/FFmpeg + + - name: Build FFmpeg + working-directory: deps/FFmpeg + run: | + ./configure --enable-pic --disable-static --enable-shared --disable-all --disable-autodetect --enable-avcodec --enable-avformat --enable-swscale \ + --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 \ + --enable-vaapi --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=av1_vaapi \ + --enable-vdpau --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau --enable-hwaccel=av1_vdpau \ + --enable-libdrm --enable-vulkan --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan \ + --enable-libdav1d --enable-decoder=libdav1d + make -j$(nproc) + sudo make install + + - name: Install linuxdeployqt + working-directory: dep_root/bin + run: | + wget -O linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage + chmod a+x linuxdeployqt + + - name: Build Binaries + run: | + sudo ldconfig + scripts/build-appimage.sh + + - name: Upload Binaries + uses: actions/upload-artifact@v4 + with: + name: Moonlight-LinuxAppImage-${{ env.CI_VERSION }} + path: build/installer-release/Moonlight-${{ env.CI_VERSION }}-x86_64.AppImage + compression-level: 0 + if-no-files-found: error \ No newline at end of file diff --git a/README.md b/README.md index 927f7de5..744c43bb 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ Moonlight also has mobile versions for [Android](https://github.com/moonlight-st You can follow development on our [Discord server](https://moonlight-stream.org/discord) and help translate Moonlight into your language on [Weblate](https://hosted.weblate.org/projects/moonlight/moonlight-qt/). [![Windows and macOS CI Builds](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-win-mac.yml/badge.svg?branch=master)](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-win-mac.yml?query=branch%3Amaster) + [![Linux AppImage CI Builds](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-appimage.yml/badge.svg?branch=master)](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-appimage.yml?query=branch%3Amaster) [![Steam Link CI Builds](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-steamlink.yml/badge.svg?branch=master)](https://github.com/moonlight-stream/moonlight-qt/actions/workflows/build-steamlink.yml?query=branch%3Amaster) - [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/glj5cxqwy2w3bglv/branch/master?svg=true)](https://ci.appveyor.com/project/cgutman/moonlight-qt/branch/master) [![Downloads](https://img.shields.io/github/downloads/moonlight-stream/moonlight-qt/total)](https://github.com/moonlight-stream/moonlight-qt/releases) [![Translation Status](https://hosted.weblate.org/widgets/moonlight/-/moonlight-qt/svg-badge.svg)](https://hosted.weblate.org/projects/moonlight/moonlight-qt/) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 2baa535c..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: 0.0.0.{build} - -clone_depth: 1 - -environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - BUILD_TARGET: linux - FFMPEG_CONFIGURE_ARGS: --enable-pic --disable-static --enable-shared --disable-all --enable-avcodec --enable-avformat --enable-swscale --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=av1_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau --enable-hwaccel=av1_vdpau --enable-libdrm --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan --enable-libdav1d --enable-decoder=libdav1d - -install: - - sh: '[ "$BUILD_TARGET" != linux ] || wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -' - - sh: '[ "$BUILD_TARGET" != linux ] || sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.4.313-jammy.list https://packages.lunarg.com/vulkan/1.4.313/lunarg-vulkan-1.4.313-jammy.list' - - sh: '[ "$BUILD_TARGET" != linux ] || sudo apt update || true' - - sh: '[ "$BUILD_TARGET" != linux ] || sudo apt install -y qt6-base-dev qt6-declarative-dev libqt6svg6-dev qml6-module-qtquick-controls qml6-module-qtquick-templates qml6-module-qtquick-layouts qml6-module-qtqml-workerscript qml6-module-qtquick-window qml6-module-qtquick python3-pip nasm libgbm-dev libdrm-dev libfreetype-dev libasound2-dev libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev libxcb-dri3-dev libx11-xcb-dev wayland-protocols libopus-dev libvdpau-dev libgl-dev libpipewire-0.3-dev vulkan-sdk' - - sh: '[ "$BUILD_TARGET" != linux ] || sudo pip3 install meson' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then export SDL2_REV=235e4870af091ea7e3814ee2dbdb8e2ec627aaf0 && git clone https://github.com/libsdl-org/SDL.git SDL2 && cd SDL2 && git checkout $SDL2_REV && ./configure && make -j$(nproc) && sudo make install && cd ..; fi' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then export SDL2_TTF_VER=2.22.0 && wget https://github.com/libsdl-org/SDL_ttf/releases/download/release-$SDL2_TTF_VER/SDL2_ttf-$SDL2_TTF_VER.tar.gz && tar -xf SDL2_ttf-$SDL2_TTF_VER.tar.gz && cd SDL2_ttf-$SDL2_TTF_VER && ./configure && make -j$(nproc) && sudo make install && cd ..; fi' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then export LIBVA_VER=2.22.0 && git clone --branch $LIBVA_VER --depth 1 https://github.com/intel/libva.git && cd libva && ./autogen.sh && ./configure --enable-x11 --enable-wayland && make -j$(nproc) && sudo make install && cd ..; fi' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then export DAV1D_VER=1.5.1 && git clone --branch $DAV1D_VER --depth 1 https://code.videolan.org/videolan/dav1d.git && cd dav1d && meson setup build -Ddefault_library=static -Dbuildtype=release -Denable_tools=false -Denable_tests=false && ninja -C build && sudo ninja install -C build && sudo ldconfig && cd ..; fi' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then export LIBPLACEBO_REV=63a3d64ac32eaaa56aa60b5000d43c02544c6508 && git clone https://code.videolan.org/videolan/libplacebo.git && cd libplacebo && git checkout $LIBPLACEBO_REV && git apply ../app/deploy/linux/appimage/*.patch && git submodule update --init --recursive && meson setup build -Dvulkan=enabled -Dopengl=disabled -Ddemos=false && ninja -C build && sudo ninja install -C build && sudo ldconfig && cd ..; fi' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then export FFMPEG_REV=dd00a614e16a15db0b230dfe45790e913e593695 && git clone https://github.com/FFmpeg/FFmpeg.git FFmpeg && cd FFmpeg && git checkout $FFMPEG_REV && ./configure $FFMPEG_CONFIGURE_ARGS && make -j$(nproc) && sudo make install && sudo ldconfig && cd ..; fi' - - sh: 'if [[ "$BUILD_TARGET" = linux ]]; then mkdir $HOME/bin && wget -O $HOME/bin/linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage && chmod a+x $HOME/bin/linuxdeployqt; fi' - -before_build: - - sh: 'git -c submodule.libs.update=none submodule update --init --recursive' - - sh: 'export CI_VERSION=r$APPVEYOR_BUILD_NUMBER' - -build_script: - - sh: '[ "$BUILD_TARGET" != linux ] || PATH=$PATH:$HOME/bin scripts/build-appimage.sh' - -after_build: - - sh: '[ "$BUILD_TARGET" != linux ] || appveyor PushArtifact build/installer-release/Moonlight-$CI_VERSION-x86_64.AppImage' - -deploy: off