Skip to content

Commit 390bc9a

Browse files
committed
modify workflow
1 parent 1e46b9e commit 390bc9a

File tree

5 files changed

+66
-39
lines changed

5 files changed

+66
-39
lines changed

.github/workflows/rpcs3.yml

Lines changed: 60 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -325,28 +325,20 @@ jobs:
325325
path: ${{ env.DEPS_CACHE_DIR }}
326326
key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }}
327327

328-
Windows_Build_Clang:
328+
329+
Windows_Build_MSYS2:
329330
# Only run push event on master branch of main repo, but run all PRs
330331
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
331332
runs-on: windows-2025
332333
strategy:
333-
fail-fast: false
334334
matrix:
335335
include:
336336
- msys2: clang64
337337
compiler: clang
338338
arch: win64
339-
- compiler: clang-cl
340-
llvmver: 19.1.7
341-
arch: win64
342-
343339
env:
344340
CCACHE_DIR: 'C:\ccache'
345-
VCPKG_TRIPLET: x64-windows
346-
VCPKG_BUILD_TYPE: release
347-
VCPKG_ROOT: "${{github.workspace}}/vcpkg"
348-
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
349-
name: RPCS3 Windows ${{ matrix.compiler }}
341+
name: RPCS3 Windows Clang (MSYS2)
350342
steps:
351343
- name: Checkout repository
352344
uses: actions/checkout@main
@@ -355,7 +347,6 @@ jobs:
355347

356348
- name: Setup msys2
357349
uses: msys2/setup-msys2@v2
358-
if: ${{ matrix.compiler == 'clang' }}
359350
with:
360351
msystem: ${{ matrix.msys2 }}
361352
update: true
@@ -383,16 +374,69 @@ jobs:
383374
git
384375
p7zip
385376
377+
- name: Restore build Ccache
378+
uses: actions/cache/restore@main
379+
id: restore-build-ccache
380+
with:
381+
path: ${{ env.CCACHE_DIR }}
382+
key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{ github.run_id }}
383+
restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-
384+
385+
- name: Build RPCS3
386+
shell: msys2 {0}
387+
run: |
388+
export CCACHE_DIR=$(cygpath -u "$CCACHE_DIR")
389+
echo "CCACHE_DIR=$CCACHE_DIR"
390+
.ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }}
391+
.ci/build-windows-clang.sh
392+
393+
- name: Save build Ccache
394+
if: github.ref == 'refs/heads/master'
395+
uses: actions/cache/save@main
396+
with:
397+
path: ${{ env.CCACHE_DIR }}
398+
key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }}
399+
400+
- name: Upload artifacts
401+
uses: actions/upload-artifact@main
402+
with:
403+
name: RPCS3 for Windows (${{ runner.arch }}, ${{ matrix.compiler }})
404+
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
405+
compression-level: 0
406+
if-no-files-found: error
407+
408+
Windows_Build_CLANG-CL:
409+
# Only run push event on master branch of main repo, but run all PRs
410+
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
411+
runs-on: windows-2025
412+
strategy:
413+
fail-fast: false
414+
matrix:
415+
include:
416+
- compiler: clang-cl
417+
llvmver: 19.1.7
418+
arch: win64
419+
420+
env:
421+
CCACHE_DIR: 'C:\ccache'
422+
VCPKG_TRIPLET: x64-windows
423+
VCPKG_BUILD_TYPE: release
424+
VCPKG_ROOT: "${{github.workspace}}/vcpkg"
425+
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
426+
name: RPCS3 Windows Clang (Clang-CL)
427+
steps:
428+
- name: Checkout repository
429+
uses: actions/checkout@main
430+
with:
431+
fetch-depth: 0
432+
386433
- name: Clone and bootstrap vcpkg
387-
if: ${{ matrix.compiler == 'clang-cl' }}
388434
shell: pwsh
389435
run: |
390436
git clone https://github.com/microsoft/vcpkg.git
391437
.\vcpkg\bootstrap-vcpkg.bat
392438
393439
- name: 'Setup NuGet Credentials for vcpkg'
394-
if: ${{ matrix.compiler == 'clang-cl' }}
395-
shell: 'bash'
396440
run: |
397441
`./vcpkg/vcpkg fetch nuget | tail -n 1` \
398442
sources add \
@@ -406,7 +450,6 @@ jobs:
406450
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
407451
408452
- name: Restore LLVM Cache
409-
if: ${{ matrix.compiler == 'clang-cl' }}
410453
uses: actions/cache/restore@main
411454
id: llvm-cache
412455
with:
@@ -415,7 +458,6 @@ jobs:
415458
restore-keys: ${{ runner.os }}-clang-dl-cache-
416459

417460
- name: Add LLVM
418-
if: ${{ matrix.compiler == 'clang-cl' }}
419461
shell: pwsh
420462
run: |
421463
if (!(Test-Path -Path D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\)) {
@@ -432,7 +474,7 @@ jobs:
432474
Add-Content -Path $env:GITHUB_PATH -Value "D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\bin"
433475
434476
- name: Save LLVM Cache
435-
if: ${{ github.ref == 'refs/heads/master' && matrix.compiler == 'clang-cl' }}
477+
if: ${{ github.ref == 'refs/heads/master' }}
436478
uses: actions/cache/save@main
437479
with:
438480
path: ./llvm-${{ matrix.llvmver }}
@@ -446,26 +488,13 @@ jobs:
446488
key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{ github.run_id }}
447489
restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-
448490

449-
- name: Build RPCS3
450-
if: ${{ matrix.compiler == 'clang' }}
451-
shell: msys2 {0}
452-
run: |
453-
export CCACHE_DIR=$(cygpath -u "$CCACHE_DIR")
454-
echo "CCACHE_DIR=$CCACHE_DIR"
455-
.ci/build-windows-clang.sh
456-
.ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }}
457-
.ci/deploy-windows-${{ matrix.compiler }}.sh
458-
459491
- name: install DIA SDK
460-
if: ${{ matrix.compiler == 'clang-cl' }}
461492
run: |
462493
mkdir -p "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional" || true
463494
cp -r "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/DIA SDK" "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK"
464495
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
465496
466497
- name: Build RPCS3
467-
if: ${{ matrix.compiler == 'clang-cl' }}
468-
shell: bash
469498
run: |
470499
.ci/build-windows-clang-cl.sh
471500
.ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }}

3rdparty/libusb/config.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
3434
elseif(MSVC)
3535
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
3636
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
37-
append_compiler_flags(
38-
-Wno-unused-value
39-
-Wno-pragma-pack
40-
${ADDITIONAL_CC_FLAGS}
37+
append_compiler_flags(
38+
-Wno-unused-value
39+
-Wno-pragma-pack
40+
${ADDITIONAL_CC_FLAGS}
4141
)
4242
endif()
4343
endif()

buildfiles/cmake/ConfigureCompiler.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ if(MSVC)
1010
if(COMPILER_SUPPORTS_MARCH_NATIVE)
1111
add_compile_options(-march=native)
1212
endif()
13-
add_link_options(/dynamicbase)
1413
else()
1514
add_compile_options(/Zc:throwingNew- /constexpr:steps16777216)
16-
add_link_options(/DYNAMICBASE)
1715
endif()
1816
add_compile_definitions(
1917
_CRT_SECURE_NO_DEPRECATE=1 _CRT_NON_CONFORMING_SWPRINTFS=1 _SCL_SECURE_NO_WARNINGS=1

rpcs3/Emu/Memory/vm_reservation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ namespace vm
171171

172172
auto stamp0 = utils::get_tsc(), stamp1 = stamp0, stamp2 = stamp0;
173173

174-
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
174+
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
175175
__asm__ goto ("xbegin %l[stage2];" ::: "memory" : stage2);
176176
#else
177177
status = _xbegin();

rpcs3/util/asm.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace utils
7070
else
7171
{
7272
auto result = std::invoke(op);
73-
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
73+
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
7474
__asm__ volatile ("xend;" ::: "memory");
7575
#else
7676
_xend();

0 commit comments

Comments
 (0)