2024-05-18 02:23:48 +00:00
|
|
|
name: validate
|
|
|
|
on:
|
2024-06-02 14:34:25 +00:00
|
|
|
workflow_call:
|
2024-06-08 23:42:15 +00:00
|
|
|
inputs:
|
|
|
|
SDL2_VERSION:
|
|
|
|
type: string
|
|
|
|
required: false
|
2024-06-17 11:10:34 +00:00
|
|
|
default: '2.30.3'
|
2024-06-08 23:42:15 +00:00
|
|
|
N64RECOMP_COMMIT:
|
|
|
|
type: string
|
|
|
|
required: false
|
2024-09-28 22:23:19 +00:00
|
|
|
default: 'd33d38161798167929b114c2b0fd445f9670e10a'
|
2024-06-16 19:38:23 +00:00
|
|
|
DXC_CHECKSUM:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
default: '4e6f4e52989aca69739880b40b9f988357f15d10ca03284377b81f1502463ff5'
|
2024-10-07 21:20:43 +00:00
|
|
|
VULKAN_SDK_VERSION:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
default: '1.3.290.0'
|
|
|
|
MOLTENVK_COMMIT:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
default: '3b9e335fe8fc8a72cf6099acbd54128889445c0a'
|
2024-06-02 14:34:25 +00:00
|
|
|
secrets:
|
|
|
|
ZRE_REPO_WITH_PAT:
|
|
|
|
required: true
|
2024-05-18 02:23:48 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
2024-05-27 10:33:15 +00:00
|
|
|
build-linux:
|
2024-06-16 19:38:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
container:
|
2024-07-08 16:52:33 +00:00
|
|
|
image: dcvz/n64recomp:ubuntu-18.04
|
|
|
|
volumes:
|
|
|
|
# create a volume that we'll use as the new source for the node binary
|
|
|
|
# https://github.com/actions/checkout/issues/1809
|
|
|
|
- /nodeoverride:/nodeoverride:rw,rshared
|
|
|
|
- /nodeoverride:/__e/node20:ro,rshared
|
2024-06-16 19:38:23 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
type: [ Debug, Release ]
|
|
|
|
os: [ ubuntu-22.04 ]
|
|
|
|
name: ubuntu-18.04 (x64, ${{ matrix.type }})
|
|
|
|
steps:
|
2024-07-08 16:52:33 +00:00
|
|
|
- name: Copy the Node20 binary
|
|
|
|
run: |
|
|
|
|
cp -r /node20217/* /nodeoverride/
|
2024-06-16 19:38:23 +00:00
|
|
|
- name: Checkout
|
2024-07-08 16:52:33 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-06-16 19:38:23 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha || github.ref }}
|
|
|
|
submodules: recursive
|
|
|
|
- name: ccache
|
2024-07-08 16:52:33 +00:00
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
2024-06-16 19:38:23 +00:00
|
|
|
with:
|
|
|
|
key: ${{ matrix.os }}-z64re-ccache-${{ matrix.type }}-x64-${{ inputs.N64RECOMP_COMMIT }}
|
|
|
|
- name: Prepare Build
|
|
|
|
run: |-
|
|
|
|
git clone ${{ secrets.ZRE_REPO_WITH_PAT }}
|
|
|
|
unzip zre/files.zip > /dev/null 2>&1
|
|
|
|
- name: Build N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource
|
|
|
|
cd N64RecompSource
|
|
|
|
git checkout ${{ inputs.N64RECOMP_COMMIT }}
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
# enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
|
|
|
# Build N64Recomp & RSPRecomp
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
2024-09-28 23:01:03 +00:00
|
|
|
cmake --build cmake-build --config Release --target N64RecompCLI -j $(nproc)
|
2024-06-16 19:38:23 +00:00
|
|
|
cmake --build cmake-build --config Release --target RSPRecomp -j $(nproc)
|
|
|
|
|
|
|
|
# Copy N64Recomp & RSPRecomp to root directory
|
|
|
|
cp cmake-build/N64Recomp ..
|
|
|
|
cp cmake-build/RSPRecomp ..
|
|
|
|
- name: Run N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
./N64Recomp us.rev1.toml
|
|
|
|
./RSPRecomp aspMain.us.rev1.toml
|
|
|
|
./RSPRecomp njpgdspMain.us.rev1.toml
|
|
|
|
- name: Hotpatch DXC into RT64's contrib
|
|
|
|
run: |
|
|
|
|
# check if dxc was updated before we replace it, to detect changes
|
|
|
|
echo ${{ inputs.DXC_CHECKSUM }} ./lib/rt64/src/contrib/dxc/bin/x64/dxc | sha256sum --status -c -
|
|
|
|
|
|
|
|
cp -v /usr/local/lib/libdxcompiler.so ./lib/rt64/src/contrib/dxc/lib/x64/libdxcompiler.so
|
|
|
|
cp -v /usr/local/bin/dxc ./lib/rt64/src/contrib/dxc/bin/x64/dxc
|
|
|
|
- name: Build ZeldaRecomp
|
|
|
|
run: |-
|
|
|
|
# enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build -DPATCHES_C_COMPILER=clang-17 -DPATCHES_LD=ld.lld-17 -DPATCHES_OBJCOPY=llvm-objcopy-17
|
|
|
|
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j $(nproc)
|
|
|
|
- name: Prepare Archive
|
|
|
|
run: |
|
|
|
|
mv cmake-build/Zelda64Recompiled Zelda64Recompiled
|
|
|
|
rm -rf assets/scss
|
|
|
|
tar -czf Zelda64Recompiled.tar.gz Zelda64Recompiled assets/ gamecontrollerdb.txt
|
|
|
|
- name: Archive Zelda64Recomp
|
2024-10-07 21:20:43 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-06-16 19:38:23 +00:00
|
|
|
with:
|
|
|
|
name: Zelda64Recompiled-${{ runner.os }}-X64-${{ matrix.type }}
|
|
|
|
path: Zelda64Recompiled.tar.gz
|
|
|
|
- name: Build AppImage
|
|
|
|
run: |-
|
|
|
|
./.github/linux/appimage.sh
|
|
|
|
- name: Zelda64Recomp AppImage
|
2024-10-07 21:20:43 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-06-16 19:38:23 +00:00
|
|
|
with:
|
|
|
|
name: Zelda64Recompiled-AppImage-X64-${{ matrix.type }}
|
|
|
|
path: Zelda64Recompiled-*.AppImage
|
|
|
|
build-linux-arm64:
|
|
|
|
runs-on: ${{ format('blaze/{0}', matrix.os) }}
|
2024-05-18 02:23:48 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
type: [ Debug, Release ]
|
2024-05-27 10:33:15 +00:00
|
|
|
os: [ ubuntu-22.04 ]
|
2024-06-16 19:38:23 +00:00
|
|
|
name: ${{ matrix.os }} (arm64, ${{ matrix.type }})
|
2024-05-18 02:23:48 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
2024-05-20 20:55:59 +00:00
|
|
|
ref: ${{ github.event.pull_request.head.sha || github.ref }}
|
2024-05-18 02:23:48 +00:00
|
|
|
submodules: recursive
|
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
with:
|
2024-06-16 19:38:23 +00:00
|
|
|
key: ${{ matrix.os }}-z64re-ccache-${{ matrix.type }}-arm64-${{ inputs.N64RECOMP_COMMIT }}
|
2024-05-18 02:23:48 +00:00
|
|
|
- name: Install Linux Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2024-05-22 08:55:12 +00:00
|
|
|
sudo apt-get install -y ninja-build libsdl2-dev libgtk-3-dev lld llvm clang-15 libfuse2
|
2024-05-18 02:23:48 +00:00
|
|
|
|
|
|
|
# Install SDL2
|
|
|
|
echo ::group::install SDL2
|
|
|
|
|
|
|
|
# Enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
2024-06-08 23:42:15 +00:00
|
|
|
wget https://github.com/libsdl-org/SDL/releases/download/release-${{ inputs.SDL2_VERSION }}/SDL2-${{ inputs.SDL2_VERSION }}.tar.gz
|
|
|
|
tar -xzf SDL2-${{ inputs.SDL2_VERSION }}.tar.gz
|
|
|
|
cd SDL2-${{ inputs.SDL2_VERSION }}
|
2024-05-18 02:23:48 +00:00
|
|
|
./configure
|
|
|
|
make -j 10
|
|
|
|
sudo make install
|
2024-06-16 19:38:23 +00:00
|
|
|
sudo cp -av /usr/local/lib/libSDL* /lib/aarch64-linux-gnu/
|
2024-05-18 02:23:48 +00:00
|
|
|
echo ::endgroup::
|
|
|
|
- name: Prepare Build
|
|
|
|
run: |-
|
2024-05-18 20:35:13 +00:00
|
|
|
git clone ${{ secrets.ZRE_REPO_WITH_PAT }}
|
2024-05-18 02:23:48 +00:00
|
|
|
./zre/process.sh
|
2024-06-02 18:18:50 +00:00
|
|
|
cp ./zre/mm_shader_cache.bin ./shadercache/
|
2024-05-18 02:23:48 +00:00
|
|
|
- name: Build N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource
|
|
|
|
cd N64RecompSource
|
2024-06-08 23:42:15 +00:00
|
|
|
git checkout ${{ inputs.N64RECOMP_COMMIT }}
|
2024-06-03 19:39:20 +00:00
|
|
|
git submodule update --init --recursive
|
2024-05-18 02:23:48 +00:00
|
|
|
|
|
|
|
# enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
|
|
|
# Build N64Recomp & RSPRecomp
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
2024-09-28 23:01:03 +00:00
|
|
|
cmake --build cmake-build --config Release --target N64RecompCLI -j $(nproc)
|
2024-06-07 08:39:47 +00:00
|
|
|
cmake --build cmake-build --config Release --target RSPRecomp -j $(nproc)
|
2024-05-18 02:23:48 +00:00
|
|
|
|
|
|
|
# Copy N64Recomp & RSPRecomp to root directory
|
|
|
|
cp cmake-build/N64Recomp ..
|
|
|
|
cp cmake-build/RSPRecomp ..
|
|
|
|
- name: Run N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
./N64Recomp us.rev1.toml
|
|
|
|
./RSPRecomp aspMain.us.rev1.toml
|
|
|
|
./RSPRecomp njpgdspMain.us.rev1.toml
|
|
|
|
- name: Build ZeldaRecomp
|
|
|
|
run: |-
|
|
|
|
# enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang++-15 -DCMAKE_C_COMPILER=clang-15 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
2024-06-07 08:39:47 +00:00
|
|
|
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j $(nproc)
|
2024-05-18 02:23:48 +00:00
|
|
|
- name: Prepare Archive
|
|
|
|
run: |
|
|
|
|
mv cmake-build/Zelda64Recompiled Zelda64Recompiled
|
|
|
|
rm -rf assets/scss
|
2024-06-16 19:38:23 +00:00
|
|
|
tar -czf Zelda64Recompiled.tar.gz Zelda64Recompiled assets/ gamecontrollerdb.txt
|
2024-05-18 02:23:48 +00:00
|
|
|
- name: Archive Zelda64Recomp
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-06-16 19:38:23 +00:00
|
|
|
name: Zelda64Recompiled-${{ runner.os }}-ARM64-${{ matrix.type }}
|
2024-05-27 10:33:15 +00:00
|
|
|
path: Zelda64Recompiled.tar.gz
|
2024-05-22 08:55:12 +00:00
|
|
|
- name: Prepare AppImage
|
|
|
|
run: ./.github/linux/appimage.sh
|
|
|
|
- name: Zelda64Recomp AppImage
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-06-16 19:38:23 +00:00
|
|
|
name: Zelda64Recompiled-AppImage-ARM64-${{ matrix.type }}
|
2024-05-27 10:33:15 +00:00
|
|
|
path: Zelda64Recompiled-*.AppImage
|
2024-05-18 02:23:48 +00:00
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
type: [ Debug, Release ]
|
2024-05-27 10:33:15 +00:00
|
|
|
name: windows (${{ matrix.type }})
|
2024-05-18 02:23:48 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
2024-05-20 20:55:59 +00:00
|
|
|
ref: ${{ github.event.pull_request.head.sha || github.ref }}
|
2024-05-18 02:23:48 +00:00
|
|
|
submodules: recursive
|
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
with:
|
|
|
|
key: ${{ runner.os }}-z64re-ccache-${{ matrix.type }}
|
|
|
|
- name: Install Windows Dependencies
|
|
|
|
run: |
|
|
|
|
choco install ninja
|
|
|
|
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
|
|
|
|
- name: Configure Developer Command Prompt
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Prepare Build
|
|
|
|
run: |-
|
2024-05-18 20:35:13 +00:00
|
|
|
git clone ${{ secrets.ZRE_REPO_WITH_PAT }}
|
2024-05-18 02:23:48 +00:00
|
|
|
./zre/process.ps1
|
2024-06-02 18:18:50 +00:00
|
|
|
cp ./zre/mm_shader_cache.bin ./shadercache/
|
2024-05-18 02:23:48 +00:00
|
|
|
- name: Build N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource
|
|
|
|
cd N64RecompSource
|
2024-06-08 23:42:15 +00:00
|
|
|
git checkout ${{ inputs.N64RECOMP_COMMIT }}
|
2024-06-03 19:39:20 +00:00
|
|
|
git submodule update --init --recursive
|
2024-05-18 02:23:48 +00:00
|
|
|
|
|
|
|
# enable ccache
|
|
|
|
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
|
2024-06-07 08:39:47 +00:00
|
|
|
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
|
2024-05-18 02:23:48 +00:00
|
|
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
2024-09-28 23:01:03 +00:00
|
|
|
cmake --build cmake-build --config Release --target N64RecompCLI -j $cpuCores
|
2024-06-07 08:39:47 +00:00
|
|
|
cmake --build cmake-build --config Release --target RSPRecomp -j $cpuCores
|
2024-05-18 02:23:48 +00:00
|
|
|
|
|
|
|
# Copy N64Recomp & RSPRecomp to root directory
|
|
|
|
cp cmake-build/N64Recomp.exe ..
|
|
|
|
cp cmake-build/RSPRecomp.exe ..
|
|
|
|
- name: Run N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
./N64Recomp.exe us.rev1.toml
|
|
|
|
./RSPRecomp.exe aspMain.us.rev1.toml
|
|
|
|
./RSPRecomp.exe njpgdspMain.us.rev1.toml
|
|
|
|
- name: Build ZeldaRecomp
|
|
|
|
run: |-
|
|
|
|
# enable ccache
|
|
|
|
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
|
2024-06-07 08:39:47 +00:00
|
|
|
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
|
|
|
|
|
|
|
|
# remove LLVM from PATH so it doesn't overshadow the one provided by VS
|
|
|
|
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';'
|
2024-05-18 02:23:48 +00:00
|
|
|
|
2024-06-01 21:22:33 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build -DCMAKE_CXX_FLAGS="-Xclang -fexceptions -Xclang -fcxx-exceptions"
|
2024-06-07 08:39:47 +00:00
|
|
|
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j $cpuCores
|
2024-06-08 23:42:15 +00:00
|
|
|
env:
|
|
|
|
SDL2_VERSION: ${{ inputs.SDL2_VERSION }}
|
2024-05-18 02:23:48 +00:00
|
|
|
- name: Prepare Archive
|
|
|
|
run: |
|
|
|
|
Move-Item -Path "cmake-build/Zelda64Recompiled.exe" -Destination "Zelda64Recompiled.exe"
|
2024-05-18 14:38:38 +00:00
|
|
|
Move-Item -Path "cmake-build/dxcompiler.dll" -Destination "dxcompiler.dll"
|
|
|
|
Move-Item -Path "cmake-build/dxil.dll" -Destination "dxil.dll"
|
|
|
|
Move-Item -Path "cmake-build/SDL2.dll" -Destination "SDL2.dll"
|
2024-05-18 02:23:48 +00:00
|
|
|
Remove-Item -Path "assets/scss" -Recurse -Force
|
|
|
|
- name: Archive Zelda64Recomp
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: Zelda64Recompiled-${{ runner.os }}-${{ matrix.type }}
|
|
|
|
path: |
|
|
|
|
Zelda64Recompiled.exe
|
2024-05-18 14:38:38 +00:00
|
|
|
dxcompiler.dll
|
|
|
|
dxil.dll
|
|
|
|
SDL2.dll
|
2024-05-18 02:23:48 +00:00
|
|
|
assets/
|
2024-06-16 19:38:23 +00:00
|
|
|
gamecontrollerdb.txt
|
2024-10-07 21:20:43 +00:00
|
|
|
build-macos:
|
|
|
|
runs-on: blaze/macos-14
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
type: [ Debug, Release ]
|
|
|
|
name: macos (x64, arm64, ${{ matrix.type }})
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha || github.ref }}
|
|
|
|
submodules: recursive
|
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
with:
|
|
|
|
key: ${{ runner.os }}-z64re-ccache-${{ matrix.type }}
|
|
|
|
- name: Homebrew Setup
|
|
|
|
run: |
|
|
|
|
brew install ninja
|
|
|
|
brew uninstall --ignore-dependencies libpng freetype
|
|
|
|
- name: MacPorts Setup
|
|
|
|
uses: melusina-org/setup-macports@v1
|
|
|
|
id: 'macports'
|
|
|
|
with:
|
|
|
|
parameters: '.github/macos/macports.yaml'
|
|
|
|
- name: Prepare Build
|
|
|
|
run: |-
|
|
|
|
git clone ${{ secrets.ZRE_REPO_WITH_PAT }}
|
|
|
|
./zre/process.sh
|
|
|
|
cp ./zre/mm_shader_cache.bin ./shadercache/
|
|
|
|
- name: Build N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource
|
|
|
|
cd N64RecompSource
|
|
|
|
git checkout ${{ inputs.N64RECOMP_COMMIT }}
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
# enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
|
|
|
# Build N64Recomp & RSPRecomp
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
|
|
|
cmake --build cmake-build --config Release --target N64Recomp -j $(sysctl -n hw.ncpu)
|
|
|
|
cmake --build cmake-build --config Release --target RSPRecomp -j $(sysctl -n hw.ncpu)
|
|
|
|
|
|
|
|
# Copy N64Recomp & RSPRecomp to root directory
|
|
|
|
cp cmake-build/N64Recomp ..
|
|
|
|
cp cmake-build/RSPRecomp ..
|
|
|
|
- name: Run N64Recomp & RSPRecomp
|
|
|
|
run: |
|
|
|
|
./N64Recomp us.rev1.toml
|
|
|
|
./RSPRecomp aspMain.us.rev1.toml
|
|
|
|
./RSPRecomp njpgdspMain.us.rev1.toml
|
|
|
|
- name: Cache Vulkan SDK
|
|
|
|
id: cache-vulkan-sdk
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: /Users/runner/VulkanSDK/${{ inputs.VULKAN_SDK_VERSION }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.type }}-vulkan-sdk-${{ inputs.VULKAN_SDK_VERSION }}
|
|
|
|
- name: Install Vulkan SDK
|
|
|
|
if: steps.cache-vulkan-sdk.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
wget https://sdk.lunarg.com/sdk/download/${{ inputs.VULKAN_SDK_VERSION }}/mac/vulkansdk-macos-${{ inputs.VULKAN_SDK_VERSION }}.dmg
|
|
|
|
hdiutil attach ./vulkansdk-macos-${{ inputs.VULKAN_SDK_VERSION }}.dmg
|
|
|
|
sudo /Volumes/vulkansdk-macos-${{ inputs.VULKAN_SDK_VERSION }}/InstallVulkan.app/Contents/MacOS/InstallVulkan --root ~/VulkanSDK/${{ inputs.VULKAN_SDK_VERSION }} --accept-licenses --default-answer --confirm-command install
|
|
|
|
hdiutil detach /Volumes/vulkansdk-macos-${{ inputs.VULKAN_SDK_VERSION }}
|
|
|
|
- name: Checkout MoltenVK
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/KhronosGroup/MoltenVK.git
|
|
|
|
cd MoltenVK
|
|
|
|
git checkout ${{ inputs.MOLTENVK_COMMIT }}
|
|
|
|
- name: Cache MoltenVK Dependencies
|
|
|
|
id: cache-mvk-dependencies
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
MoltenVK/External/build
|
|
|
|
!MoltenVK/External/build/Intermediates
|
|
|
|
key: ${{ runner.os }}-${{ matrix.type }}-${{ hashFiles('MoltenVK/fetchDependencies','MoltenVK/ExternalRevisions/**','MoltenVK/ExternalDependencies.xcodeproj/**','MoltenVK/Scripts/**') }}
|
|
|
|
- name: Fetch MVK Dependencies (Use Built Cache)
|
|
|
|
if: steps.cache-mvk-dependencies.outputs.cache-hit == 'true'
|
|
|
|
run: |
|
|
|
|
cd MoltenVK
|
|
|
|
./fetchDependencies -v --none
|
|
|
|
- name: Fetch MVK Dependencies
|
|
|
|
if: steps.cache-mvk-dependencies.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd MoltenVK
|
|
|
|
./fetchDependencies -v --macos
|
|
|
|
- name: Build MoltenVK
|
|
|
|
run: |
|
|
|
|
cd MoltenVK
|
|
|
|
make macos
|
|
|
|
sudo cp Package/Latest/MoltenVK/dylib/macOS/libMoltenVK.dylib ~/VulkanSDK/${{ inputs.VULKAN_SDK_VERSION }}/macOS/lib/libMoltenVK.dylib
|
|
|
|
- name: Build ZeldaRecomp
|
|
|
|
run: |-
|
|
|
|
# enable ccache
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build \
|
|
|
|
-DPATCHES_LD=/opt/local/bin/ld.lld-mp-18 -DPATCHES_OBJCOPY=/opt/local/bin/llvm-objcopy-mp-18 -DCMAKE_AR=/opt/local/bin/llvm-ar-mp-18 -DPATCHES_C_COMPILER=/opt/local/bin/clang-mp-18 \
|
|
|
|
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
|
|
|
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j $(sysctl -n hw.ncpu)
|
|
|
|
env:
|
|
|
|
VULKAN_SDK: /Users/runner/VulkanSDK/${{ inputs.VULKAN_SDK_VERSION }}/macOS
|
|
|
|
- name: Prepare Archive
|
|
|
|
run: |
|
|
|
|
mv cmake-build/Zelda64Recompiled.app Zelda64Recompiled.app
|
|
|
|
zip -r -y Zelda64Recompiled.zip Zelda64Recompiled.app
|
|
|
|
- name: Archive Zelda64Recomp
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: Zelda64Recompiled-${{ runner.os }}-${{ matrix.type }}
|
|
|
|
path: Zelda64Recompiled.zip
|