diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d839fb30..9c36b68b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -391,7 +391,7 @@ jobs: # Note: NFD_PORTAL=ON uses D-Bus portal instead of GTK on Linux (more reliable in CI) - name: Report Configure Failure - if: failure() && (steps.configure_windows.outcome == 'failure' || steps.configure_unix.outcome == 'failure') + if: always() && (steps.configure_windows.outcome == 'failure' || steps.configure_unix.outcome == 'failure') shell: bash run: | echo "::error::CMake configuration failed. Check cmake_config.log for details." @@ -433,7 +433,7 @@ jobs: fi - name: Report Build Failure - if: failure() && steps.build.outcome == 'failure' + if: always() && steps.build.outcome == 'failure' shell: bash run: | echo "::error::Build failed. Check build.log for details." @@ -449,7 +449,7 @@ jobs: fi - name: Windows Build Diagnostics - if: failure() && runner.os == 'Windows' && steps.build.outcome == 'failure' + if: always() && runner.os == 'Windows' && steps.build.outcome == 'failure' shell: pwsh run: | Write-Host "=== Windows Build Diagnostics ===" -ForegroundColor Red @@ -480,7 +480,7 @@ jobs: } - name: Post-Build Diagnostics (Windows) - if: runner.os == 'Windows' && steps.build.outcome == 'success' + if: always() && runner.os == 'Windows' && steps.build.outcome == 'success' shell: pwsh run: | Write-Host "=== Post-Build Diagnostics ===" -ForegroundColor Green diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5057e28..320e2399 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,7 @@ jobs: arch: x64 - name: Configure + id: configure shell: pwsh run: | $toolchain = "${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" @@ -55,13 +56,40 @@ jobs: -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_TOOLCHAIN_FILE=$toolchain ` -DVCPKG_TARGET_TRIPLET=x64-windows-static ` + -DVCPKG_MANIFEST_MODE=ON ` -DYAZE_BUILD_TESTS=OFF ` -DYAZE_BUILD_EMU=ON ` -DYAZE_BUILD_Z3ED=ON ` - -DYAZE_BUILD_TOOLS=ON + -DYAZE_BUILD_TOOLS=ON 2>&1 | Tee-Object -FilePath cmake_config.log + + - name: Report Configure Failure + if: always() && steps.configure.outcome == 'failure' + shell: pwsh + run: | + Write-Host "::error::CMake configuration failed. Check cmake_config.log for details." -ForegroundColor Red + if (Test-Path cmake_config.log) { + Write-Host "::group::CMake Configuration Log (last 50 lines)" + Get-Content cmake_config.log -Tail 50 + Write-Host "::endgroup::" + } + exit 1 - name: Build - run: cmake --build build --config Release --parallel 4 -- /p:CL_MPcount=4 + id: build + shell: pwsh + run: cmake --build build --config Release --parallel 4 -- /p:CL_MPcount=4 2>&1 | Tee-Object -FilePath build.log + + - name: Report Build Failure + if: always() && steps.build.outcome == 'failure' + shell: pwsh + run: | + Write-Host "::error::Build failed. Check build.log for details." -ForegroundColor Red + if (Test-Path build.log) { + Write-Host "::group::Build Log (last 100 lines)" + Get-Content build.log -Tail 100 + Write-Host "::endgroup::" + } + exit 1 - name: Package shell: pwsh @@ -72,7 +100,19 @@ jobs: Copy-Item LICENSE, README.md -Destination release/ Compress-Archive -Path release/* -DestinationPath yaze-windows-x64.zip + - name: Upload Build Logs on Failure (Windows) + if: always() && (steps.configure.outcome == 'failure' || steps.build.outcome == 'failure') + uses: actions/upload-artifact@v4 + with: + name: build-logs-windows + path: | + cmake_config.log + build.log + if-no-files-found: ignore + retention-days: 7 + - uses: actions/upload-artifact@v4 + if: steps.build.outcome == 'success' with: name: yaze-windows-x64 path: yaze-windows-x64.zip @@ -89,6 +129,7 @@ jobs: run: brew install ninja cmake - name: Configure arm64 + id: configure_arm64 run: | cmake -S . -B build-arm64 -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ @@ -96,12 +137,14 @@ jobs: -DYAZE_BUILD_TESTS=OFF \ -DYAZE_BUILD_EMU=ON \ -DYAZE_BUILD_Z3ED=ON \ - -DYAZE_BUILD_TOOLS=ON + -DYAZE_BUILD_TOOLS=ON 2>&1 | tee cmake_config_arm64.log - name: Build arm64 - run: cmake --build build-arm64 --config Release + id: build_arm64 + run: cmake --build build-arm64 --config Release 2>&1 | tee build_arm64.log - name: Configure x86_64 + id: configure_x86_64 run: | cmake -S . -B build-x86_64 -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ @@ -109,10 +152,11 @@ jobs: -DYAZE_BUILD_TESTS=OFF \ -DYAZE_BUILD_EMU=ON \ -DYAZE_BUILD_Z3ED=ON \ - -DYAZE_BUILD_TOOLS=ON + -DYAZE_BUILD_TOOLS=ON 2>&1 | tee cmake_config_x86_64.log - name: Build x86_64 - run: cmake --build build-x86_64 --config Release + id: build_x86_64 + run: cmake --build build-x86_64 --config Release 2>&1 | tee build_x86_64.log - name: Create Universal Binary run: | @@ -128,7 +172,21 @@ jobs: hdiutil create -fs HFS+ -srcfolder yaze.app \ -volname "yaze" yaze-macos-universal.dmg + - name: Upload Build Logs on Failure (macOS) + if: always() && (steps.configure_arm64.outcome == 'failure' || steps.build_arm64.outcome == 'failure' || steps.configure_x86_64.outcome == 'failure' || steps.build_x86_64.outcome == 'failure') + uses: actions/upload-artifact@v4 + with: + name: build-logs-macos + path: | + cmake_config_arm64.log + build_arm64.log + cmake_config_x86_64.log + build_x86_64.log + if-no-files-found: ignore + retention-days: 7 + - uses: actions/upload-artifact@v4 + if: steps.build_arm64.outcome == 'success' && steps.build_x86_64.outcome == 'success' with: name: yaze-macos-universal path: yaze-macos-universal.dmg @@ -161,6 +219,7 @@ jobs: libgtk-3-dev libdbus-1-dev - name: Configure + id: configure run: | cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ @@ -168,10 +227,11 @@ jobs: -DYAZE_BUILD_EMU=ON \ -DYAZE_BUILD_Z3ED=ON \ -DYAZE_BUILD_TOOLS=ON \ - -DNFD_PORTAL=ON + -DNFD_PORTAL=ON 2>&1 | tee cmake_config.log - name: Build - run: cmake --build build --config Release + id: build + run: cmake --build build --config Release 2>&1 | tee build.log - name: Package run: | @@ -181,7 +241,19 @@ jobs: cp LICENSE README.md release/ tar -czf yaze-linux-x64.tar.gz -C release . + - name: Upload Build Logs on Failure (Linux) + if: always() && (steps.configure.outcome == 'failure' || steps.build.outcome == 'failure') + uses: actions/upload-artifact@v4 + with: + name: build-logs-linux + path: | + cmake_config.log + build.log + if-no-files-found: ignore + retention-days: 7 + - uses: actions/upload-artifact@v4 + if: steps.build.outcome == 'success' with: name: yaze-linux-x64 path: yaze-linux-x64.tar.gz @@ -190,7 +262,7 @@ jobs: name: Create Release needs: [build-windows, build-macos, build-linux] runs-on: ubuntu-latest - if: always() + if: always() && (needs.build-windows.result == 'success' || needs.build-macos.result == 'success' || needs.build-linux.result == 'success') steps: - uses: actions/checkout@v4 diff --git a/vcpkg.json b/vcpkg.json index d36b5a63..2e2e617f 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -5,6 +5,14 @@ "description": "Yet Another Zelda3 Editor", "builtin-baseline": "b2c74683ecfd6a8e7d27ffb0df077f66a9339509", "dependencies": [ + { + "name": "grpc", + "platform": "windows" + }, + { + "name": "protobuf", + "platform": "windows" + }, { "name": "sdl2", "platform": "windows"