From d247f092dc88eb97a2e42dacb4cc06c93a5e2137 Mon Sep 17 00:00:00 2001 From: dcvz Date: Fri, 17 May 2024 22:45:36 +0200 Subject: [PATCH] Add windows --- .github/workflows/validate.yml | 106 ++++++++++++++++----------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 3925ce9..757aaf7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -89,56 +89,56 @@ jobs: path: | Zelda64Recompiled assets/ -# build-windows: -# runs-on: windows-latest -# strategy: -# matrix: -# type: [ Debug, Release ] -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# 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 gnupg -# 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: |- -# git clone https://${{ secrets.PAT }}@github.com/dcvz/zre.git -# ./zre/process.ps1 -# env: -# LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} -# - name: Build N64Recomp & RSPRecomp -# run: | -# git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource -# cd N64RecompSource -# -# # enable ccache -# set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH" -# -# 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 8 -# cmake --build cmake-build --config Release --target RSPRecomp -j 8 -# -# # 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 (Unix) -# run: |- -# # enable ccache -# set $env:PATH="$env:USERPROFILE/.cargo/bin;$env: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 -# cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j 8 + build-windows: + runs-on: windows-latest + strategy: + matrix: + type: [ Debug, Release ] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + 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 gnupg + 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: |- + git clone https://${{ secrets.PAT }}@github.com/dcvz/zre.git + ./zre/process.ps1 + env: + LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + - name: Build N64Recomp & RSPRecomp + run: | + git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource + cd N64RecompSource + + # enable ccache + set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH" + + 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 8 + cmake --build cmake-build --config Release --target RSPRecomp -j 8 + + # 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 (Unix) + run: |- + # enable ccache + set $env:PATH="$env:USERPROFILE/.cargo/bin;$env: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 + cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j 8