diff --git a/.github/broken_workflows/linux.yml b/.github/broken_workflows/linux.yml deleted file mode 100644 index e6b79dcf..00000000 --- a/.github/broken_workflows/linux.yml +++ /dev/null @@ -1,43 +0,0 @@ -# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project -# SPDX-License-Identifier: GPL-2.0-or-later - -name: Linux - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Install dev packages - run: | - sudo apt install libxext-dev doxygen libgl-dev - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel `nproc` - - name: Upload a Build Artifact - uses: actions/upload-artifact@v3.1.2 - with: - name: shadps4-ubuntu64 - # A file, directory or wildcard pattern that describes what to upload - path: | - ${{github.workspace}}/build/shadps4 - ${{github.workspace}}/build/libSDL3.so.0.0.0 diff --git a/.github/linux-appimage-sdl.sh b/.github/linux-appimage-sdl.sh new file mode 100755 index 00000000..cc0e9f5f --- /dev/null +++ b/.github/linux-appimage-sdl.sh @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project +# SPDX-License-Identifier: GPL-2.0-or-later + +#!/bin/bash + +if [[ -z $GITHUB_WORKSPACE ]]; then + GITHUB_WORKSPACE="${PWD%/*}" +fi + +# Prepare Tools for building the AppImage +wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage +wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh + +chmod a+x linuxdeploy-x86_64.AppImage +chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh + +# Build AppImage +./linuxdeploy-x86_64.AppImage --appdir AppDir +./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir +./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --output appimage +mv Shadps4-x86_64.AppImage Shadps4-sdl.AppImage diff --git a/.github/shadps4.desktop b/.github/shadps4.desktop new file mode 100644 index 00000000..72efea21 --- /dev/null +++ b/.github/shadps4.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Shadps4 +Exec=shadps4 +Terminal=false +Type=Application +Icon=shadps4 +Comment=gui for shadps4 +Categories=Game; +StartupWMClass=shadps4; diff --git a/.github/shadps4.png b/.github/shadps4.png new file mode 100644 index 00000000..8aee44ab Binary files /dev/null and b/.github/shadps4.png differ diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000..9ebcb263 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project +# SPDX-License-Identifier: GPL-2.0-or-later + +name: Linux + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + CLANG_VER: 17 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install misc packages + run: > + sudo apt-get update && sudo apt install libx11-dev libgl1-mesa-glx mesa-common-dev libfuse2 libwayland-dev libxxhash-dev libvulkan-dev + + - name: Install newer Clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x ./llvm.sh + sudo ./llvm.sh ${{env.CLANG_VER}} + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-${{env.CLANG_VER}} -DCMAKE_CXX_COMPILER=clang++-${{env.CLANG_VER}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel + + - name: Upload executable + uses: actions/upload-artifact@v4 + with: + name: shadps4-ubuntu64 + path: | + ${{github.workspace}}/build/shadps4 + ${{github.workspace}}/build/libSDL3.so.0.0.0 + + - name: Run AppImage packaging script + run: ./.github/linux-appimage-sdl.sh + + - name: Upload executable + uses: actions/upload-artifact@v4 + with: + name: shadps4-sdl-appimage + path: Shadps4-sdl.AppImage diff --git a/.reuse/dep5 b/.reuse/dep5 index 11f4aae4..d03c7c1f 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -6,5 +6,7 @@ Files: CMakeSettings.json scripts/ps4_names.txt documents/changelog.txt documents/readme.txt + .github/shadps4.desktop + .github/shadps4.png Copyright: shadPS4 Emulator Project -License: GPL-2.0-or-later \ No newline at end of file +License: GPL-2.0-or-later