1
0
Fork 0
forked from suyu/suyu

Merge branch 'dev' into dev-fork

This commit is contained in:
RadsammyT 2024-03-25 05:34:28 +01:00
commit 4b06697954
5 changed files with 22 additions and 20 deletions

View file

@ -1,19 +1,22 @@
#!/bin/bash -ex #!/bin/bash -ex
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project # SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
# Exit on error, rather than continuing with the rest of the script. # Exit on error, rather than continuing with the rest of the script.
set -e set -e
ccache -s ccache -sv
mkdir build || true && cd build mkdir build || true && cd build
cmake .. \ cmake .. \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \ -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \ -DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION=$1 \ -DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
@ -22,11 +25,12 @@ cmake .. \
-DSUYU_CRASH_DUMPS=ON \ -DSUYU_CRASH_DUMPS=ON \
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \ -DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DSUYU_USE_BUNDLED_FFMPEG=ON \ -DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_USE_FASTER_LD=ON \
-GNinja -GNinja
ninja ninja
ccache -s ccache -sv
ctest -VV -C Release ctest -VV -C Release

View file

@ -6,7 +6,7 @@
# Exit on error, rather than continuing with the rest of the script. # Exit on error, rather than continuing with the rest of the script.
set -e set -e
ccache -s ccache -sv
mkdir build || true && cd build mkdir build || true && cd build
cmake .. \ cmake .. \
@ -15,8 +15,8 @@ cmake .. \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \ -DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \ -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \ -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \ -DCMAKE_C_COMPILER=/usr/local/bin/gcc \
-DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION=$1 \ -DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
@ -24,14 +24,14 @@ cmake .. \
-DUSE_DISCORD_PRESENCE=ON \ -DUSE_DISCORD_PRESENCE=ON \
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \ -DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DSUYU_USE_BUNDLED_FFMPEG=ON \ -DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_ENABLE_LTO=ON \ -DSUYU_ENABLE_LTO=OFF \
-DSUYU_CRASH_DUMPS=ON \ -DSUYU_CRASH_DUMPS=ON \
-DSUYU_USE_FASTER_LD=ON \ -DSUYU_USE_FASTER_LD=ON \
-GNinja -GNinja
ninja ninja
ccache -s ccache -sv
ctest -VV -C Release ctest -VV -C Release

View file

@ -33,7 +33,6 @@ on:
env: env:
PR_NUMBER: pr${{ github.event.number }} PR_NUMBER: pr${{ github.event.number }}
CCACHE_DIR: '.ccache'
jobs: jobs:
format: format:
@ -77,13 +76,13 @@ jobs:
uses: https://code.forgejo.org/actions/cache@v3 uses: https://code.forgejo.org/actions/cache@v3
id: ccache-restore id: ccache-restore
with: with:
path: .ccache path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }} key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ matrix.type }}- ${{ runner.os }}-${{ matrix.type }}-
- name: Create ccache directory - name: Create ccache directory
if: steps.ccache-restore.outputs.cache-hit != 'true' if: steps.ccache-restore.outputs.cache-hit != 'true'
run: mkdir -p .ccache run: mkdir -p ~/.ccache
- name: Build - name: Build
run: ./.ci/scripts/${{ matrix.type }}/docker.sh run: ./.ci/scripts/${{ matrix.type }}/docker.sh
env: env:

View file

@ -132,7 +132,7 @@ if (SUYU_USE_BUNDLED_VCPKG)
set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads) set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads)
set(NASM_VERSION "2.16.01") set(NASM_VERSION "2.16.01")
set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip) set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip)
set(NASM_DOWNLOAD_URL "https://gitlab.com/suyu-emu/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip") set(NASM_DOWNLOAD_URL "https://git.suyu.dev/suyu/ext-windows-bin/raw/branch/master/nasm/nasm-${NASM_VERSION}-win64.zip")
if (NOT EXISTS ${NASM_DESTINATION_PATH}) if (NOT EXISTS ${NASM_DESTINATION_PATH})
file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS) file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS)
@ -374,8 +374,6 @@ if(ENABLE_QT6 AND Qt6_LOCATION)
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}") list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
endif() endif()
# QT6 searches for Vulkan::Headers, too, so we have to define it before QT6 has a chance to do it.
add_subdirectory(externals)
function(set_suyu_qt_components) function(set_suyu_qt_components)
# Best practice is to ask for all components at once, so they are from the same version # Best practice is to ask for all components at once, so they are from the same version
@ -632,7 +630,7 @@ if (NOT CLANG_FORMAT)
message(STATUS "Clang format not found! Downloading...") message(STATUS "Clang format not found! Downloading...")
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe") set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
file(DOWNLOAD file(DOWNLOAD
https://gitlab.com/suyu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe https://git.suyu.dev/suyu/ext-windows-bin/raw/branch/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
"${CLANG_FORMAT}" SHOW_PROGRESS "${CLANG_FORMAT}" SHOW_PROGRESS
STATUS DOWNLOAD_SUCCESS) STATUS DOWNLOAD_SUCCESS)
if (NOT DOWNLOAD_SUCCESS EQUAL 0) if (NOT DOWNLOAD_SUCCESS EQUAL 0)
@ -712,6 +710,7 @@ if (SUYU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif() endif()
endif() endif()
add_subdirectory(externals)
add_subdirectory(src) add_subdirectory(src)
# Set suyu project or suyu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not # Set suyu project or suyu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not

View file

@ -7,21 +7,21 @@
# prefix_var: name of a variable which will be set with the path to the extracted contents # prefix_var: name of a variable which will be set with the path to the extracted contents
function(download_bundled_external remote_path lib_name prefix_var) function(download_bundled_external remote_path lib_name prefix_var)
set(package_base_url "https://git.suyu.dev/suyu") set(package_base_url "https://git.suyu.dev/suyu/")
set(package_repo "no_platform") set(package_repo "no_platform")
set(package_extension "no_platform") set(package_extension "no_platform")
set(package_head "?ref_type=heads") set(package_head "?ref_type=heads")
if (WIN32) if (WIN32)
set(package_repo "ext-windows-bin/-/raw/master/") set(package_repo "ext-windows-bin/raw/branch/master/")
set(package_extension ".7z") set(package_extension ".7z")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(package_repo "ext-linux-bin/-/raw/main/") set(package_repo "ext-linux-bin/raw/branch/main/")
set(package_extension ".tar.xz") set(package_extension ".tar.xz")
# elseif (APPLE) # elseif (APPLE)
# set(package_repo "ext-osx-bin/-/raw/main/") # set(package_repo "ext-osx-bin/-/raw/main/")
# set(package_extension ".dmg") # set(package_extension ".dmg")
elseif (ANDROID) elseif (ANDROID)
set(package_repo "ext-android-bin/-/raw/main/") set(package_repo "ext-android-bin/raw/branch/main/")
set(package_extension ".tar.xz") set(package_extension ".tar.xz")
else() else()
message(FATAL_ERROR "No package available for this platform") message(FATAL_ERROR "No package available for this platform")