From 0c2bdc6f61cb9016ebcfad0cef1560631c213462 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sun, 24 Mar 2024 22:25:08 -0300 Subject: [PATCH 1/2] Fix wrong URL on DownloadExternals. Change Clang and GCC executables on CI scripts --- .ci/scripts/clang/docker.sh | 12 ++++++++---- .ci/scripts/linux/docker.sh | 6 +++--- CMakeLists.txt | 4 ++-- CMakeModules/DownloadExternals.cmake | 8 ++++---- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.ci/scripts/clang/docker.sh b/.ci/scripts/clang/docker.sh index 7b5c6ec4df..57fbb97544 100755 --- a/.ci/scripts/clang/docker.sh +++ b/.ci/scripts/clang/docker.sh @@ -1,19 +1,22 @@ #!/bin/bash -ex # SPDX-FileCopyrightText: 2021 yuzu Emulator Project +# SPDX-FileCopyrightText: 2024 suyu Emulator Project # SPDX-License-Identifier: GPL-2.0-or-later # Exit on error, rather than continuing with the rest of the script. set -e -ccache -s +ccache -sv mkdir build || true && cd build cmake .. \ -DCMAKE_BUILD_TYPE=Release \ + -DSUYU_USE_PRECOMPILED_HEADERS=OFF \ + -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ - -DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \ - -DCMAKE_C_COMPILER=/usr/lib/ccache/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DDISPLAY_VERSION=$1 \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ @@ -22,11 +25,12 @@ cmake .. \ -DSUYU_CRASH_DUMPS=ON \ -DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \ -DSUYU_USE_BUNDLED_FFMPEG=ON \ + -DSUYU_USE_FASTER_LD=ON \ -GNinja ninja -ccache -s +ccache -sv ctest -VV -C Release diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh index b6b8efeea4..a7a0eb0b00 100755 --- a/.ci/scripts/linux/docker.sh +++ b/.ci/scripts/linux/docker.sh @@ -15,8 +15,8 @@ cmake .. \ -DSUYU_USE_PRECOMPILED_HEADERS=OFF \ -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ - -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \ - -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \ + -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ + -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DDISPLAY_VERSION=$1 \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \ @@ -24,7 +24,7 @@ cmake .. \ -DUSE_DISCORD_PRESENCE=ON \ -DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \ -DSUYU_USE_BUNDLED_FFMPEG=ON \ - -DSUYU_ENABLE_LTO=ON \ + -DSUYU_ENABLE_LTO=OFF \ -DSUYU_CRASH_DUMPS=ON \ -DSUYU_USE_FASTER_LD=ON \ -GNinja diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fec995c6d..84132e47d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,7 @@ if (SUYU_USE_BUNDLED_VCPKG) set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads) set(NASM_VERSION "2.16.01") 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}) file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS) @@ -632,7 +632,7 @@ if (NOT CLANG_FORMAT) message(STATUS "Clang format not found! Downloading...") set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe") 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 STATUS DOWNLOAD_SUCCESS) if (NOT DOWNLOAD_SUCCESS EQUAL 0) diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index 2498773e61..858bce8771 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -7,21 +7,21 @@ # 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) -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_extension "no_platform") set(package_head "?ref_type=heads") if (WIN32) - set(package_repo "ext-windows-bin/-/raw/master/") + set(package_repo "ext-windows-bin/raw/branch/master/") set(package_extension ".7z") 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") # elseif (APPLE) # set(package_repo "ext-osx-bin/-/raw/main/") # set(package_extension ".dmg") elseif (ANDROID) - set(package_repo "ext-android-bin/-/raw/main/") + set(package_repo "ext-android-bin/raw/branch/main/") set(package_extension ".tar.xz") else() message(FATAL_ERROR "No package available for this platform") From d4375a21ef2114ca5689e277ca1e53eb406c5f8f Mon Sep 17 00:00:00 2001 From: Fijxu Date: Mon, 25 Mar 2024 00:11:11 -0300 Subject: [PATCH 2/2] Revert a9312c837e . Use proper GCC binary location and CCACHE changes in the CI --- .ci/scripts/linux/docker.sh | 8 ++++---- .forgejo/workflows/verify.yml | 5 ++--- CMakeLists.txt | 3 +-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh index a7a0eb0b00..82432bd835 100755 --- a/.ci/scripts/linux/docker.sh +++ b/.ci/scripts/linux/docker.sh @@ -6,7 +6,7 @@ # Exit on error, rather than continuing with the rest of the script. set -e -ccache -s +ccache -sv mkdir build || true && cd build cmake .. \ @@ -15,8 +15,8 @@ cmake .. \ -DSUYU_USE_PRECOMPILED_HEADERS=OFF \ -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ - -DCMAKE_C_COMPILER=/usr/bin/gcc \ + -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \ + -DCMAKE_C_COMPILER=/usr/local/bin/gcc \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DDISPLAY_VERSION=$1 \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \ @@ -31,7 +31,7 @@ cmake .. \ ninja -ccache -s +ccache -sv ctest -VV -C Release diff --git a/.forgejo/workflows/verify.yml b/.forgejo/workflows/verify.yml index d250c136b7..1d17c43a2b 100644 --- a/.forgejo/workflows/verify.yml +++ b/.forgejo/workflows/verify.yml @@ -33,7 +33,6 @@ on: env: PR_NUMBER: pr${{ github.event.number }} - CCACHE_DIR: '.ccache' jobs: format: @@ -77,13 +76,13 @@ jobs: uses: https://code.forgejo.org/actions/cache@v3 id: ccache-restore with: - path: .ccache + path: ~/.ccache key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }} restore-keys: | ${{ runner.os }}-${{ matrix.type }}- - name: Create ccache directory if: steps.ccache-restore.outputs.cache-hit != 'true' - run: mkdir -p .ccache + run: mkdir -p ~/.ccache - name: Build run: ./.ci/scripts/${{ matrix.type }}/docker.sh env: diff --git a/CMakeLists.txt b/CMakeLists.txt index 84132e47d1..42e8615e57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,8 +374,6 @@ if(ENABLE_QT6 AND Qt6_LOCATION) list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}") 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) # Best practice is to ask for all components at once, so they are from the same version @@ -712,6 +710,7 @@ if (SUYU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") endif() endif() +add_subdirectory(externals) 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