mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-16 12:09:07 +00:00
try to fix the ci
This commit is contained in:
parent
96b295fc74
commit
8d0182fd99
53
.github/workflows/build.yml
vendored
53
.github/workflows/build.yml
vendored
@ -146,6 +146,57 @@ jobs:
|
|||||||
name: shadps4-macos-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
name: shadps4-macos-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
path: upload/
|
path: upload/
|
||||||
|
|
||||||
|
macos-sdl-arm64:
|
||||||
|
runs-on: macos-15
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup latest Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-sdl-arm64-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build-arm64
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.19
|
||||||
|
env:
|
||||||
|
cache-name: ${{runner.os}}-sdl-arm64-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
create-symlink: true
|
||||||
|
key: ${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
variant: sccache
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -B ${{github.workspace}}/build-arm64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build-arm64 --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
||||||
|
|
||||||
|
- name: Package and Upload macOS ARM64 SDL artifact
|
||||||
|
run: |
|
||||||
|
mkdir upload-arm64
|
||||||
|
mv ${{github.workspace}}/build-arm64/shadps4 upload-arm64
|
||||||
|
mv ${{github.workspace}}/build-arm64/MoltenVK_icd.json upload-arm64
|
||||||
|
mv ${{github.workspace}}/build-arm64/libMoltenVK.dylib upload-arm64
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-macos-arm64-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: upload-arm64/
|
||||||
|
|
||||||
linux-sdl:
|
linux-sdl:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs: get-info
|
needs: get-info
|
||||||
@ -245,7 +296,7 @@ jobs:
|
|||||||
|
|
||||||
pre-release:
|
pre-release:
|
||||||
if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push'
|
||||||
needs: [get-info, windows-sdl, macos-sdl, linux-sdl]
|
needs: [get-info, windows-sdl, macos-sdl, macos-sdl-arm64, linux-sdl]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
|
|||||||
@ -574,6 +574,7 @@ struct AddressSpace::Impl {
|
|||||||
#else
|
#else
|
||||||
const auto virtual_size = system_managed_size + system_reserved_size + user_size;
|
const auto virtual_size = system_managed_size + system_reserved_size + user_size;
|
||||||
#if defined(ARCH_X86_64)
|
#if defined(ARCH_X86_64)
|
||||||
|
constexpr int map_flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_FIXED;
|
||||||
const auto virtual_base =
|
const auto virtual_base =
|
||||||
reinterpret_cast<u8*>(mmap(reinterpret_cast<void*>(SYSTEM_MANAGED_MIN), virtual_size,
|
reinterpret_cast<u8*>(mmap(reinterpret_cast<void*>(SYSTEM_MANAGED_MIN), virtual_size,
|
||||||
protection_flags, map_flags, -1, 0));
|
protection_flags, map_flags, -1, 0));
|
||||||
@ -581,6 +582,7 @@ struct AddressSpace::Impl {
|
|||||||
system_reserved_base = reinterpret_cast<u8*>(SYSTEM_RESERVED_MIN);
|
system_reserved_base = reinterpret_cast<u8*>(SYSTEM_RESERVED_MIN);
|
||||||
user_base = reinterpret_cast<u8*>(USER_MIN);
|
user_base = reinterpret_cast<u8*>(USER_MIN);
|
||||||
#else
|
#else
|
||||||
|
constexpr int map_flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE;
|
||||||
// Map memory wherever possible and instruction translation can handle offsetting to the
|
// Map memory wherever possible and instruction translation can handle offsetting to the
|
||||||
// base.
|
// base.
|
||||||
const auto virtual_base =
|
const auto virtual_base =
|
||||||
@ -732,7 +734,7 @@ struct AddressSpace::Impl {
|
|||||||
if (write) {
|
if (write) {
|
||||||
flags |= PROT_WRITE;
|
flags |= PROT_WRITE;
|
||||||
}
|
}
|
||||||
#ifdef ARCH_X86_64
|
#if defined(ARCH_X86_64)
|
||||||
if (execute) {
|
if (execute) {
|
||||||
flags |= PROT_EXEC;
|
flags |= PROT_EXEC;
|
||||||
}
|
}
|
||||||
@ -786,7 +788,7 @@ AddressSpace::~AddressSpace() = default;
|
|||||||
|
|
||||||
void* AddressSpace::Map(VAddr virtual_addr, size_t size, u64 alignment, PAddr phys_addr,
|
void* AddressSpace::Map(VAddr virtual_addr, size_t size, u64 alignment, PAddr phys_addr,
|
||||||
bool is_exec) {
|
bool is_exec) {
|
||||||
#if ARCH_X86_64
|
#if defined(ARCH_X86_64)
|
||||||
const auto prot = is_exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
|
const auto prot = is_exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
|
||||||
#else
|
#else
|
||||||
// On non-native architectures, we can simplify things by ignoring the execute flag for the
|
// On non-native architectures, we can simplify things by ignoring the execute flag for the
|
||||||
@ -857,7 +859,7 @@ boost::icl::interval_set<VAddr> AddressSpace::GetUsableRegions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void* AddressSpace::TranslateAddress(VAddr ps4_addr) const {
|
void* AddressSpace::TranslateAddress(VAddr ps4_addr) const {
|
||||||
#ifdef ARCH_X86_64
|
#if defined(ARCH_X86_64)
|
||||||
// On x86_64, PS4 addresses are directly mapped, so we can cast them
|
// On x86_64, PS4 addresses are directly mapped, so we can cast them
|
||||||
return reinterpret_cast<void*>(ps4_addr);
|
return reinterpret_cast<void*>(ps4_addr);
|
||||||
#elif defined(ARCH_ARM64) && defined(__APPLE__)
|
#elif defined(ARCH_ARM64) && defined(__APPLE__)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user