From 78df04cd28ec928b00a3a31b846ecb6865586ccf Mon Sep 17 00:00:00 2001 From: Damglador Date: Sun, 29 Jun 2025 03:32:14 +0200 Subject: [PATCH] Create testing.yml --- .github/workflows/testing.yml | 102 ++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..3288582f --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,102 @@ +name: AppImage Testing + +on: + push: + branches: + - master + +jobs: + build: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: ${{ matrix.shell || 'sh' }} + + strategy: + fail-fast: false + matrix: + include: + - { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, build-type: 'Release', linux: true, werror: true, clang-tidy: false } + steps: + - name: Install Linux dependencies (apt-get) + if: ${{ matrix.linux }} + run: | + sudo apt-get update + sudo apt-get install -y \ + libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \ + libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev libglew-dev qt6-base-dev \ + libasound2-dev + + - uses: actions/checkout@v4 + + - name: Configure (CMake) + run: | + ${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \ + -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ + -DISLE_USE_DX5=${{ !!matrix.dx5 }} \ + -DISLE_BUILD_CONFIG=${{ matrix.config }} \ + -DENABLE_CLANG_TIDY=${{ !!matrix.clang-tidy }} \ + -DISLE_WERROR=${{ !!matrix.werror }} \ + -DISLE_DEBUG=OFF \ + -Werror=dev + + - name: Build (CMake) + run: cmake --build build --verbose + + - name: Package (CPack) + run: | + cd build + cpack . + + - name: Install linuxdeploy + if: ${{ matrix.linux }} + uses: miurahr/install-linuxdeploy-action@v1.8.0 + with: + plugins: qt + + - name: Package (AppImage) + if: ${{ matrix.linux }} + run: | + export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" && NO_STRIP=1 ${{ steps.install-linuxdeploy.outputs.linuxdeploy }} \ + --plugin qt \ + -e build/isle \ + -e build/isle-config \ + -l build/liblego1.so \ + -d build/packaging/linux/org.legoisland.Isle.desktop \ + -i build/icons/@APP_ID@.svg \ + --custom-apprun=/packaging/linux/appimage/AppRun \ + --appdir build/packaging/linux/appimage/AppDir \ + --output "dist/isle-$(uname -m).AppImage" + + - name: Upload Artifact + uses: actions/upload-artifact@main + with: + name: Release-${{ matrix.name }} + path: | + build/dist/isle-* + + release: + name: 'Release' + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download All Artifacts + uses: actions/download-artifact@main + with: + pattern: Release-* + path: Release + merge-multiple: true + + - name: Checkout uploadtool + uses: actions/checkout@v4 + with: + repository: 'probonopd/uploadtool' + path: 'uploadtool' + + - name: Upload Continuous Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ./uploadtool/upload.sh Release/*