modify workflow

This commit is contained in:
Live session user 2025-11-16 05:25:55 -08:00
parent 1e46b9e064
commit 390bc9a04d
5 changed files with 66 additions and 39 deletions

View file

@ -325,28 +325,20 @@ jobs:
path: ${{ env.DEPS_CACHE_DIR }} path: ${{ env.DEPS_CACHE_DIR }}
key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }} key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }}
Windows_Build_Clang:
Windows_Build_MSYS2:
# Only run push event on master branch of main repo, but run all PRs # Only run push event on master branch of main repo, but run all PRs
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master') if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
runs-on: windows-2025 runs-on: windows-2025
strategy: strategy:
fail-fast: false
matrix: matrix:
include: include:
- msys2: clang64 - msys2: clang64
compiler: clang compiler: clang
arch: win64 arch: win64
- compiler: clang-cl
llvmver: 19.1.7
arch: win64
env: env:
CCACHE_DIR: 'C:\ccache' CCACHE_DIR: 'C:\ccache'
VCPKG_TRIPLET: x64-windows name: RPCS3 Windows Clang (MSYS2)
VCPKG_BUILD_TYPE: release
VCPKG_ROOT: "${{github.workspace}}/vcpkg"
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
name: RPCS3 Windows ${{ matrix.compiler }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@main uses: actions/checkout@main
@ -355,7 +347,6 @@ jobs:
- name: Setup msys2 - name: Setup msys2
uses: msys2/setup-msys2@v2 uses: msys2/setup-msys2@v2
if: ${{ matrix.compiler == 'clang' }}
with: with:
msystem: ${{ matrix.msys2 }} msystem: ${{ matrix.msys2 }}
update: true update: true
@ -383,16 +374,69 @@ jobs:
git git
p7zip p7zip
- name: Restore build Ccache
uses: actions/cache/restore@main
id: restore-build-ccache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-
- name: Build RPCS3
shell: msys2 {0}
run: |
export CCACHE_DIR=$(cygpath -u "$CCACHE_DIR")
echo "CCACHE_DIR=$CCACHE_DIR"
.ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }}
.ci/build-windows-clang.sh
- name: Save build Ccache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@main
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }}
- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: RPCS3 for Windows (${{ runner.arch }}, ${{ matrix.compiler }})
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
compression-level: 0
if-no-files-found: error
Windows_Build_CLANG-CL:
# Only run push event on master branch of main repo, but run all PRs
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
include:
- compiler: clang-cl
llvmver: 19.1.7
arch: win64
env:
CCACHE_DIR: 'C:\ccache'
VCPKG_TRIPLET: x64-windows
VCPKG_BUILD_TYPE: release
VCPKG_ROOT: "${{github.workspace}}/vcpkg"
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
name: RPCS3 Windows Clang (Clang-CL)
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Clone and bootstrap vcpkg - name: Clone and bootstrap vcpkg
if: ${{ matrix.compiler == 'clang-cl' }}
shell: pwsh shell: pwsh
run: | run: |
git clone https://github.com/microsoft/vcpkg.git git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat .\vcpkg\bootstrap-vcpkg.bat
- name: 'Setup NuGet Credentials for vcpkg' - name: 'Setup NuGet Credentials for vcpkg'
if: ${{ matrix.compiler == 'clang-cl' }}
shell: 'bash'
run: | run: |
`./vcpkg/vcpkg fetch nuget | tail -n 1` \ `./vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \ sources add \
@ -406,7 +450,6 @@ jobs:
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Restore LLVM Cache - name: Restore LLVM Cache
if: ${{ matrix.compiler == 'clang-cl' }}
uses: actions/cache/restore@main uses: actions/cache/restore@main
id: llvm-cache id: llvm-cache
with: with:
@ -415,7 +458,6 @@ jobs:
restore-keys: ${{ runner.os }}-clang-dl-cache- restore-keys: ${{ runner.os }}-clang-dl-cache-
- name: Add LLVM - name: Add LLVM
if: ${{ matrix.compiler == 'clang-cl' }}
shell: pwsh shell: pwsh
run: | run: |
if (!(Test-Path -Path D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\)) { if (!(Test-Path -Path D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\)) {
@ -432,7 +474,7 @@ jobs:
Add-Content -Path $env:GITHUB_PATH -Value "D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\bin" Add-Content -Path $env:GITHUB_PATH -Value "D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\bin"
- name: Save LLVM Cache - name: Save LLVM Cache
if: ${{ github.ref == 'refs/heads/master' && matrix.compiler == 'clang-cl' }} if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/cache/save@main uses: actions/cache/save@main
with: with:
path: ./llvm-${{ matrix.llvmver }} path: ./llvm-${{ matrix.llvmver }}
@ -446,26 +488,13 @@ jobs:
key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{ github.run_id }} key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}- restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-
- name: Build RPCS3
if: ${{ matrix.compiler == 'clang' }}
shell: msys2 {0}
run: |
export CCACHE_DIR=$(cygpath -u "$CCACHE_DIR")
echo "CCACHE_DIR=$CCACHE_DIR"
.ci/build-windows-clang.sh
.ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }}
.ci/deploy-windows-${{ matrix.compiler }}.sh
- name: install DIA SDK - name: install DIA SDK
if: ${{ matrix.compiler == 'clang-cl' }}
run: | run: |
mkdir -p "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional" || true mkdir -p "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional" || true
cp -r "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/DIA SDK" "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK" cp -r "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/DIA SDK" "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK"
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
- name: Build RPCS3 - name: Build RPCS3
if: ${{ matrix.compiler == 'clang-cl' }}
shell: bash
run: | run: |
.ci/build-windows-clang-cl.sh .ci/build-windows-clang-cl.sh
.ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }} .ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }}

View file

@ -34,10 +34,10 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
elseif(MSVC) elseif(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
append_compiler_flags( append_compiler_flags(
-Wno-unused-value -Wno-unused-value
-Wno-pragma-pack -Wno-pragma-pack
${ADDITIONAL_CC_FLAGS} ${ADDITIONAL_CC_FLAGS}
) )
endif() endif()
endif() endif()

View file

@ -10,10 +10,8 @@ if(MSVC)
if(COMPILER_SUPPORTS_MARCH_NATIVE) if(COMPILER_SUPPORTS_MARCH_NATIVE)
add_compile_options(-march=native) add_compile_options(-march=native)
endif() endif()
add_link_options(/dynamicbase)
else() else()
add_compile_options(/Zc:throwingNew- /constexpr:steps16777216) add_compile_options(/Zc:throwingNew- /constexpr:steps16777216)
add_link_options(/DYNAMICBASE)
endif() endif()
add_compile_definitions( add_compile_definitions(
_CRT_SECURE_NO_DEPRECATE=1 _CRT_NON_CONFORMING_SWPRINTFS=1 _SCL_SECURE_NO_WARNINGS=1 _CRT_SECURE_NO_DEPRECATE=1 _CRT_NON_CONFORMING_SWPRINTFS=1 _SCL_SECURE_NO_WARNINGS=1