refactor(ci): enhance Windows CI and release workflows
- Removed the installation step for Ninja, simplifying the setup process. - Added a prefetch step for MSYS runtime to ensure necessary packages are available. - Updated CMake configuration to use a more structured argument array, improving readability and maintainability. - Enhanced build output handling to check multiple directories for the built artifacts, ensuring better feedback on the build process. Benefits: - Streamlines the CI and release workflows for Windows, leading to a more efficient build process. - Improves clarity and maintainability of the configuration scripts.
This commit is contained in:
158
.github/workflows/ci.yml
vendored
158
.github/workflows/ci.yml
vendored
@@ -69,10 +69,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Ninja (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: choco install ninja --no-progress -y
|
|
||||||
|
|
||||||
- name: Set up vcpkg (Windows)
|
- name: Set up vcpkg (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
uses: lukka/run-vcpkg@v11
|
uses: lukka/run-vcpkg@v11
|
||||||
@@ -132,6 +128,26 @@ jobs:
|
|||||||
Write-Host "Persisted VCPKG_ROOT=$vcpkgRoot"
|
Write-Host "Persisted VCPKG_ROOT=$vcpkgRoot"
|
||||||
Write-Host "Persisted CMAKE_TOOLCHAIN_FILE=$normalizedToolchain"
|
Write-Host "Persisted CMAKE_TOOLCHAIN_FILE=$normalizedToolchain"
|
||||||
|
|
||||||
|
- name: Prefetch MSYS runtime (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$downloads = Join-Path "${{ github.workspace }}" "vcpkg/downloads"
|
||||||
|
New-Item -ItemType Directory -Force -Path $downloads | Out-Null
|
||||||
|
$packages = @(
|
||||||
|
@{ Name = "msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst"; Url = "https://github.com/msys2/MSYS2-packages/releases/download/msys2-runtime-3.4.10-4/msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst" },
|
||||||
|
@{ Name = "msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.sig"; Url = "https://github.com/msys2/MSYS2-packages/releases/download/msys2-runtime-3.4.10-4/msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.sig" }
|
||||||
|
)
|
||||||
|
foreach ($pkg in $packages) {
|
||||||
|
$destination = Join-Path $downloads $pkg.Name
|
||||||
|
if (-not (Test-Path $destination)) {
|
||||||
|
Write-Host "Downloading $($pkg.Name)"
|
||||||
|
Invoke-WebRequest -Uri $pkg.Url -OutFile $destination
|
||||||
|
} else {
|
||||||
|
Write-Host "$($pkg.Name) already present, skipping download"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- name: Compute MSVC linker path (Windows)
|
- name: Compute MSVC linker path (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
@@ -409,40 +425,47 @@ jobs:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$linker = "link.exe"
|
$cmakeGenerator = "Visual Studio 17 2022"
|
||||||
if ($env:MSVC_LINK_PATH -and (Test-Path $env:MSVC_LINK_PATH)) {
|
$cmakeArch = "x64"
|
||||||
$linker = $env:MSVC_LINK_PATH
|
$toolset = if ("${{ matrix.cc }}" -like "*clang-cl*") { "ClangCL" } else { "" }
|
||||||
}
|
|
||||||
Write-Host "Using linker: $linker"
|
Write-Host "Using generator: $cmakeGenerator ($cmakeArch) toolset: $toolset"
|
||||||
|
|
||||||
cmake -B build -G "Ninja" `
|
$cmakeArgs = @(
|
||||||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
|
"-B", "build",
|
||||||
-DCMAKE_C_COMPILER=${{ matrix.cc }} `
|
"-G", $cmakeGenerator,
|
||||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} `
|
"-A", $cmakeArch,
|
||||||
-DCMAKE_LINKER="$linker" `
|
"-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}",
|
||||||
-DCMAKE_TOOLCHAIN_FILE="$env:CMAKE_TOOLCHAIN_FILE" `
|
"-DCMAKE_TOOLCHAIN_FILE=$env:CMAKE_TOOLCHAIN_FILE",
|
||||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
"-DVCPKG_TARGET_TRIPLET=x64-windows-static",
|
||||||
-DVCPKG_MANIFEST_MODE=ON `
|
"-DVCPKG_MANIFEST_MODE=ON",
|
||||||
-DVCPKG_INSTALL_OPTIONS="--debug" `
|
"-DVCPKG_INSTALL_OPTIONS=--debug",
|
||||||
-DOPENSSL_NO_ASM=ON `
|
"-DOPENSSL_NO_ASM=ON",
|
||||||
-DCMAKE_CXX_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP" `
|
"-DCMAKE_CXX_FLAGS=/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP",
|
||||||
-DCMAKE_C_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP" `
|
"-DCMAKE_C_FLAGS=/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP",
|
||||||
-DProtobuf_USE_STATIC_LIBS=ON `
|
"-DProtobuf_USE_STATIC_LIBS=ON",
|
||||||
-DProtobuf_MSVC_STATIC_RUNTIME=ON `
|
"-DProtobuf_MSVC_STATIC_RUNTIME=ON",
|
||||||
-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF",
|
||||||
-DgRPC_USE_PROTO_LITE=ON `
|
"-DgRPC_USE_PROTO_LITE=ON",
|
||||||
-DgRPC_USE_ABSL=ON `
|
"-DgRPC_USE_ABSL=ON",
|
||||||
-DYAZE_BUILD_TESTS=ON `
|
"-DYAZE_BUILD_TESTS=ON",
|
||||||
-DYAZE_BUILD_EMU=ON `
|
"-DYAZE_BUILD_EMU=ON",
|
||||||
-DYAZE_ENABLE_ROM_TESTS=OFF `
|
"-DYAZE_ENABLE_ROM_TESTS=OFF",
|
||||||
-DYAZE_BUILD_Z3ED=ON `
|
"-DYAZE_BUILD_Z3ED=ON",
|
||||||
-DYAZE_BUILD_TOOLS=ON 2>&1 | Tee-Object -FilePath cmake_config.log
|
"-DYAZE_BUILD_TOOLS=ON"
|
||||||
|
)
|
||||||
|
|
||||||
|
if ($toolset) {
|
||||||
|
$cmakeArgs += @("-T", $toolset)
|
||||||
|
}
|
||||||
|
|
||||||
|
cmake @cmakeArgs 2>&1 | Tee-Object -FilePath cmake_config.log
|
||||||
# Note: Full-featured build to match release configuration
|
# Note: Full-featured build to match release configuration
|
||||||
# Note: YAZE_BUILD_EMU=OFF disables standalone emulator executable
|
# Note: YAZE_BUILD_EMU=OFF disables standalone emulator executable
|
||||||
# but yaze_emulator library is still built for main app/tests
|
# but yaze_emulator library is still built for main app/tests
|
||||||
@@ -522,17 +545,22 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Building with ${{ env.BUILD_TYPE }} configuration..."
|
BUILD_TYPE=${BUILD_TYPE:-${{ env.BUILD_TYPE }}}
|
||||||
# Determine number of parallel jobs based on platform
|
echo "Building with ${BUILD_TYPE} configuration..."
|
||||||
if command -v nproc >/dev/null 2>&1; then
|
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||||
CORES=$(nproc)
|
cmake --build build --config "${BUILD_TYPE}" -- /m 2>&1 | tee build.log
|
||||||
elif command -v sysctl >/dev/null 2>&1; then
|
|
||||||
CORES=$(sysctl -n hw.ncpu)
|
|
||||||
else
|
else
|
||||||
CORES=2
|
# Determine number of parallel jobs based on platform
|
||||||
|
if command -v nproc >/dev/null 2>&1; then
|
||||||
|
CORES=$(nproc)
|
||||||
|
elif command -v sysctl >/dev/null 2>&1; then
|
||||||
|
CORES=$(sysctl -n hw.ncpu)
|
||||||
|
else
|
||||||
|
CORES=2
|
||||||
|
fi
|
||||||
|
echo "Using $CORES parallel jobs"
|
||||||
|
cmake --build build --parallel $CORES 2>&1 | tee build.log
|
||||||
fi
|
fi
|
||||||
echo "Using $CORES parallel jobs"
|
|
||||||
cmake --build build --parallel $CORES 2>&1 | tee build.log
|
|
||||||
if command -v ccache >/dev/null 2>&1; then
|
if command -v ccache >/dev/null 2>&1; then
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
fi
|
fi
|
||||||
@@ -590,24 +618,28 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
Write-Host "=== Post-Build Diagnostics ===" -ForegroundColor Green
|
Write-Host "=== Post-Build Diagnostics ===" -ForegroundColor Green
|
||||||
|
|
||||||
$binPath = "build/bin"
|
$binCandidates = @("build/bin", "build/bin/${{ env.BUILD_TYPE }}")
|
||||||
if (Test-Path $binPath) {
|
$found = $false
|
||||||
Write-Host "`nBuilt executables and libraries:" -ForegroundColor Cyan
|
foreach ($candidate in $binCandidates) {
|
||||||
Get-ChildItem -Path $binPath -Include *.exe,*.dll -Recurse | ForEach-Object {
|
if (-not (Test-Path $candidate)) { continue }
|
||||||
|
$found = $true
|
||||||
|
Write-Host "`nArtifacts under $candidate:" -ForegroundColor Cyan
|
||||||
|
Get-ChildItem -Path $candidate -Include *.exe,*.dll -Recurse | ForEach-Object {
|
||||||
$size = [math]::Round($_.Length / 1MB, 2)
|
$size = [math]::Round($_.Length / 1MB, 2)
|
||||||
Write-Host " $($_.Name) - ${size} MB"
|
Write-Host " $($_.FullName.Replace($PWD.Path + '\', '')) - ${size} MB"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
# Check for specific yaze executable
|
if (-not $found) {
|
||||||
if (Test-Path "$binPath/yaze.exe") {
|
Write-Host "⚠️ Build output directories not found." -ForegroundColor Yellow
|
||||||
Write-Host "`n✅ yaze.exe successfully built" -ForegroundColor Green
|
} else {
|
||||||
$yazeSize = [math]::Round((Get-Item "$binPath/yaze.exe").Length / 1MB, 2)
|
$yazeExe = Get-ChildItem -Path build -Filter yaze.exe -Recurse | Select-Object -First 1
|
||||||
|
if ($yazeExe) {
|
||||||
|
Write-Host "`n✅ yaze.exe located at $($yazeExe.FullName)" -ForegroundColor Green
|
||||||
|
$yazeSize = [math]::Round($yazeExe.Length / 1MB, 2)
|
||||||
Write-Host " Size: ${yazeSize} MB"
|
Write-Host " Size: ${yazeSize} MB"
|
||||||
} else {
|
} else {
|
||||||
Write-Host "`n⚠️ yaze.exe not found" -ForegroundColor Yellow
|
Write-Host "`n⚠️ yaze.exe not found in build output" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ Build output directory not found: $binPath" -ForegroundColor Yellow
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: Upload Build Artifacts (Windows)
|
- name: Upload Build Artifacts (Windows)
|
||||||
@@ -621,6 +653,8 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
build/bin/*.exe
|
build/bin/*.exe
|
||||||
build/bin/*.dll
|
build/bin/*.dll
|
||||||
|
build/bin/${{ env.BUILD_TYPE }}/*.exe
|
||||||
|
build/bin/${{ env.BUILD_TYPE }}/*.dll
|
||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
@@ -628,8 +662,9 @@ jobs:
|
|||||||
id: test_stable
|
id: test_stable
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: |
|
run: |
|
||||||
|
BUILD_TYPE=${BUILD_TYPE:-${{ env.BUILD_TYPE }}}
|
||||||
echo "Running stable test suite..."
|
echo "Running stable test suite..."
|
||||||
ctest --output-on-failure -j1 \
|
ctest --output-on-failure -C "$BUILD_TYPE" -j1 \
|
||||||
-L "stable" \
|
-L "stable" \
|
||||||
--output-junit stable_test_results.xml 2>&1 | tee ../stable_test.log || true
|
--output-junit stable_test_results.xml 2>&1 | tee ../stable_test.log || true
|
||||||
|
|
||||||
@@ -638,8 +673,9 @@ jobs:
|
|||||||
working-directory: build
|
working-directory: build
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
|
BUILD_TYPE=${BUILD_TYPE:-${{ env.BUILD_TYPE }}}
|
||||||
echo "Running experimental test suite (informational only)..."
|
echo "Running experimental test suite (informational only)..."
|
||||||
ctest --output-on-failure --parallel \
|
ctest --output-on-failure -C "$BUILD_TYPE" --parallel \
|
||||||
-L "experimental" \
|
-L "experimental" \
|
||||||
--output-junit experimental_test_results.xml 2>&1 | tee ../experimental_test.log
|
--output-junit experimental_test_results.xml 2>&1 | tee ../experimental_test.log
|
||||||
|
|
||||||
|
|||||||
145
.github/workflows/release.yml
vendored
145
.github/workflows/release.yml
vendored
@@ -143,10 +143,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: "Install Ninja (Windows only)"
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: choco install ninja --no-progress -y
|
|
||||||
|
|
||||||
- name: "Set up vcpkg (Windows only)"
|
- name: "Set up vcpkg (Windows only)"
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
uses: lukka/run-vcpkg@v11
|
uses: lukka/run-vcpkg@v11
|
||||||
@@ -201,10 +197,30 @@ jobs:
|
|||||||
|
|
||||||
$normalizedToolchain = $toolchain -replace '\\', '/'
|
$normalizedToolchain = $toolchain -replace '\\', '/'
|
||||||
"VCPKG_ROOT=$($vcpkgRoot -replace '\\', '/')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
"VCPKG_ROOT=$($vcpkgRoot -replace '\\', '/')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
"CMAKE_TOOLCHAIN_FILE=$normalizedToolchain" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
"CMAKE_TOOLCHAIN_FILE=$normalizedToolchain" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
Write-Host "Persisted VCPKG_ROOT=$vcpkgRoot"
|
Write-Host "Persisted VCPKG_ROOT=$vcpkgRoot"
|
||||||
Write-Host "Persisted CMAKE_TOOLCHAIN_FILE=$normalizedToolchain"
|
Write-Host "Persisted CMAKE_TOOLCHAIN_FILE=$normalizedToolchain"
|
||||||
|
|
||||||
|
- name: "Prefetch MSYS runtime (Windows)"
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$downloads = Join-Path "${{ github.workspace }}" "vcpkg/downloads"
|
||||||
|
New-Item -ItemType Directory -Force -Path $downloads | Out-Null
|
||||||
|
$packages = @(
|
||||||
|
@{ Name = "msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst"; Url = "https://github.com/msys2/MSYS2-packages/releases/download/msys2-runtime-3.4.10-4/msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst" },
|
||||||
|
@{ Name = "msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.sig"; Url = "https://github.com/msys2/MSYS2-packages/releases/download/msys2-runtime-3.4.10-4/msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.sig" }
|
||||||
|
)
|
||||||
|
foreach ($pkg in $packages) {
|
||||||
|
$destination = Join-Path $downloads $pkg.Name
|
||||||
|
if (-not (Test-Path $destination)) {
|
||||||
|
Write-Host "Downloading $($pkg.Name)"
|
||||||
|
Invoke-WebRequest -Uri $pkg.Url -OutFile $destination
|
||||||
|
} else {
|
||||||
|
Write-Host "$($pkg.Name) already present, skipping download"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- name: "Compute MSVC linker path (Windows)"
|
- name: "Compute MSVC linker path (Windows)"
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
@@ -419,39 +435,47 @@ jobs:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$linker = "link.exe"
|
$cmakeGenerator = "Visual Studio 17 2022"
|
||||||
if ($env:MSVC_LINK_PATH -and (Test-Path $env:MSVC_LINK_PATH)) {
|
$cmakeArch = "x64"
|
||||||
$linker = $env:MSVC_LINK_PATH
|
$toolset = if ("${{ matrix.cc }}" -like "*clang-cl*") { "ClangCL" } else { "" }
|
||||||
}
|
|
||||||
Write-Host "Using linker: $linker"
|
|
||||||
|
|
||||||
cmake -B build -G "Ninja" `
|
Write-Host "Using generator: $cmakeGenerator ($cmakeArch) toolset: $toolset"
|
||||||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
|
|
||||||
-DCMAKE_C_COMPILER=${{ matrix.cc }} `
|
$cmakeArgs = @(
|
||||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} `
|
"-B", "build",
|
||||||
-DCMAKE_LINKER="$linker" `
|
"-G", $cmakeGenerator,
|
||||||
-DCMAKE_TOOLCHAIN_FILE="$env:CMAKE_TOOLCHAIN_FILE" `
|
"-A", $cmakeArch,
|
||||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
"-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}",
|
||||||
-DVCPKG_MANIFEST_MODE=ON `
|
"-DCMAKE_TOOLCHAIN_FILE=$env:CMAKE_TOOLCHAIN_FILE",
|
||||||
-DOPENSSL_NO_ASM=ON `
|
"-DVCPKG_TARGET_TRIPLET=x64-windows-static",
|
||||||
-DCMAKE_CXX_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP" `
|
"-DVCPKG_MANIFEST_MODE=ON",
|
||||||
-DCMAKE_C_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP" `
|
"-DVCPKG_INSTALL_OPTIONS=--debug",
|
||||||
-DProtobuf_USE_STATIC_LIBS=ON `
|
"-DOPENSSL_NO_ASM=ON",
|
||||||
-DProtobuf_MSVC_STATIC_RUNTIME=ON `
|
"-DCMAKE_CXX_FLAGS=/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP",
|
||||||
-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF `
|
"-DCMAKE_C_FLAGS=/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DGOOGLE_PROTOBUF_NO_RTTI /DPROTOBUF_FORCE_COPY_IN_SWAP",
|
||||||
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF `
|
"-DProtobuf_USE_STATIC_LIBS=ON",
|
||||||
-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF `
|
"-DProtobuf_MSVC_STATIC_RUNTIME=ON",
|
||||||
-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF",
|
||||||
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF `
|
"-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF",
|
||||||
-DgRPC_USE_PROTO_LITE=ON `
|
"-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF",
|
||||||
-DgRPC_USE_ABSL=ON `
|
"-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF",
|
||||||
-DYAZE_BUILD_TESTS=ON `
|
"-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF",
|
||||||
-DYAZE_BUILD_EMU=ON `
|
"-DgRPC_USE_PROTO_LITE=ON",
|
||||||
-DYAZE_BUILD_Z3ED=ON `
|
"-DgRPC_USE_ABSL=ON",
|
||||||
-DYAZE_BUILD_TOOLS=ON `
|
"-DYAZE_BUILD_TESTS=ON",
|
||||||
-DYAZE_ENABLE_ROM_TESTS=OFF 2>&1 | Tee-Object -FilePath cmake_config.log
|
"-DYAZE_BUILD_EMU=ON",
|
||||||
|
"-DYAZE_BUILD_Z3ED=ON",
|
||||||
|
"-DYAZE_BUILD_TOOLS=ON",
|
||||||
|
"-DYAZE_ENABLE_ROM_TESTS=OFF"
|
||||||
|
)
|
||||||
|
|
||||||
|
if ($toolset) {
|
||||||
|
$cmakeArgs += @("-T", $toolset)
|
||||||
|
}
|
||||||
|
|
||||||
|
cmake @cmakeArgs 2>&1 | Tee-Object -FilePath cmake_config.log
|
||||||
# Note: Tests enabled for pre-1.0 releases to catch issues before publishing
|
# Note: Tests enabled for pre-1.0 releases to catch issues before publishing
|
||||||
# ROM tests disabled (require test ROM file)
|
# ROM tests disabled (require test ROM file)
|
||||||
|
|
||||||
@@ -546,17 +570,22 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Building release with ${{ env.BUILD_TYPE }} configuration..."
|
BUILD_TYPE=${BUILD_TYPE:-${{ env.BUILD_TYPE }}}
|
||||||
# Use all available cores for faster builds
|
echo "Building release with ${BUILD_TYPE} configuration..."
|
||||||
if command -v nproc >/dev/null 2>&1; then
|
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||||
CORES=$(nproc)
|
cmake --build build --config "${BUILD_TYPE}" -- /m 2>&1 | tee build.log
|
||||||
elif command -v sysctl >/dev/null 2>&1; then
|
|
||||||
CORES=$(sysctl -n hw.ncpu)
|
|
||||||
else
|
else
|
||||||
CORES=2
|
# Use all available cores for faster builds
|
||||||
|
if command -v nproc >/dev/null 2>&1; then
|
||||||
|
CORES=$(nproc)
|
||||||
|
elif command -v sysctl >/dev/null 2>&1; then
|
||||||
|
CORES=$(sysctl -n hw.ncpu)
|
||||||
|
else
|
||||||
|
CORES=2
|
||||||
|
fi
|
||||||
|
echo "Using $CORES parallel jobs"
|
||||||
|
cmake --build build --parallel $CORES 2>&1 | tee build.log
|
||||||
fi
|
fi
|
||||||
echo "Using $CORES parallel jobs"
|
|
||||||
cmake --build build --parallel $CORES 2>&1 | tee build.log
|
|
||||||
if command -v ccache >/dev/null 2>&1; then
|
if command -v ccache >/dev/null 2>&1; then
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
fi
|
fi
|
||||||
@@ -599,14 +628,22 @@ jobs:
|
|||||||
# Create staging directory
|
# Create staging directory
|
||||||
New-Item -ItemType Directory -Force -Path stage | Out-Null
|
New-Item -ItemType Directory -Force -Path stage | Out-Null
|
||||||
|
|
||||||
# Windows uses Ninja generator: build/bin/
|
$config = "${{ env.BUILD_TYPE }}"
|
||||||
Write-Host "Packaging Windows artifacts..."
|
$binRoots = @("build/bin/$config", "build/bin")
|
||||||
if (-not (Test-Path "build/bin/yaze.exe")) {
|
$sourceBin = $null
|
||||||
Write-Host "::error::Windows binary not found at build/bin/yaze.exe"
|
foreach ($root in $binRoots) {
|
||||||
Get-ChildItem -Path "build/bin/" -ErrorAction SilentlyContinue
|
if (Test-Path (Join-Path $root "yaze.exe")) {
|
||||||
|
$sourceBin = $root
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-not $sourceBin) {
|
||||||
|
Write-Host "::error::Windows binary not found in expected locations"
|
||||||
|
Get-ChildItem -Path "build" -Filter yaze.exe -Recurse -ErrorAction SilentlyContinue
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
Copy-Item -Path "build/bin/*" -Destination "stage/" -Recurse -Force
|
Write-Host "Packaging Windows artifacts from $sourceBin..."
|
||||||
|
Copy-Item -Path "$sourceBin/*" -Destination "stage/" -Recurse -Force
|
||||||
Copy-Item -Path "assets/" -Destination "stage/assets/" -Recurse -Force
|
Copy-Item -Path "assets/" -Destination "stage/assets/" -Recurse -Force
|
||||||
Copy-Item -Path "LICENSE", "README.md" -Destination "stage/" -Force
|
Copy-Item -Path "LICENSE", "README.md" -Destination "stage/" -Force
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user