chore: Update CMake and CI workflow for improved build configurations
- Added an option to conditionally build development tools in CMake, enhancing flexibility for local development. - Improved error handling in the CI workflow for packaging artifacts across Windows, macOS, and Linux, ensuring binaries and assets are correctly identified and managed. - Refactored test manager methods to return appropriate errors when gRPC features are not enabled, improving clarity in feature availability. - Included filesystem header in dungeon test harness for enhanced file operations.
This commit is contained in:
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
@@ -310,24 +310,53 @@ jobs:
|
||||
mkdir -p stage
|
||||
|
||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||
# Windows uses Visual Studio generator: build/bin/Release/
|
||||
echo "Packaging Windows artifacts..."
|
||||
if [[ ! -f build/bin/${{ env.BUILD_TYPE }}/yaze.exe ]]; then
|
||||
echo "::error::Windows binary not found at build/bin/${{ env.BUILD_TYPE }}/yaze.exe"
|
||||
ls -la build/bin/ || true
|
||||
exit 1
|
||||
fi
|
||||
cp -r build/bin/${{ env.BUILD_TYPE }}/* stage/
|
||||
cp -r assets/ stage/assets/
|
||||
cp LICENSE README.md stage/
|
||||
(cd stage && powershell -Command "Compress-Archive -Path * -DestinationPath ../${ARTIFACT_NAME}.zip")
|
||||
echo "Created ${ARTIFACT_NAME}.zip"
|
||||
echo "PACKAGE_PATH=${ARTIFACT_NAME}.zip" >> "$GITHUB_ENV"
|
||||
|
||||
elif [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
# For macOS, we stage the .app bundle as a "slice" for the universal merge job
|
||||
# macOS creates app bundle: build/bin/yaze.app
|
||||
echo "Packaging macOS artifacts..."
|
||||
if [[ ! -d build/bin/yaze.app ]]; then
|
||||
echo "::error::macOS app bundle not found at build/bin/yaze.app"
|
||||
ls -la build/bin/ || true
|
||||
exit 1
|
||||
fi
|
||||
cp -R build/bin/yaze.app stage/yaze.app
|
||||
echo "Staged yaze.app slice for ${ARTIFACT_NAME}"
|
||||
echo "PACKAGE_PATH=stage/" >> "$GITHUB_ENV"
|
||||
|
||||
else # Linux
|
||||
cp build/bin/yaze stage/
|
||||
cp -r assets/ stage/assets/
|
||||
# Linux uses Ninja generator: build/bin/yaze (no subdirectory)
|
||||
echo "Packaging Linux artifacts..."
|
||||
if [[ -f build/bin/yaze ]]; then
|
||||
echo "Found binary at build/bin/yaze"
|
||||
cp build/bin/yaze stage/
|
||||
else
|
||||
echo "::error::Linux binary not found at build/bin/yaze"
|
||||
ls -la build/bin/ || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy assets from source tree
|
||||
if [[ -d assets ]]; then
|
||||
cp -r assets/ stage/assets/
|
||||
else
|
||||
echo "::error::Assets directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp LICENSE README.md stage/
|
||||
tar -czf "${ARTIFACT_NAME}.tar.gz" -C stage .
|
||||
echo "Created ${ARTIFACT_NAME}.tar.gz"
|
||||
echo "PACKAGE_PATH=${ARTIFACT_NAME}.tar.gz" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: "Upload Artifact (Windows)"
|
||||
|
||||
@@ -372,8 +372,12 @@ file(COPY ${AGENT_FILES} DESTINATION "${CMAKE_BINARY_DIR}/assets/agent/")
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
# Tools
|
||||
add_subdirectory(tools)
|
||||
# Tools (development utilities - only for local development)
|
||||
option(YAZE_BUILD_TOOLS "Build development utility tools" OFF)
|
||||
if(YAZE_BUILD_TOOLS)
|
||||
message(STATUS "Building development tools")
|
||||
add_subdirectory(tools)
|
||||
endif()
|
||||
|
||||
# Tests
|
||||
if (YAZE_BUILD_TESTS)
|
||||
|
||||
@@ -1865,17 +1865,11 @@ void TestManager::TrimHarnessHistoryLocked() {
|
||||
harness_history_.erase(oldest_test);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
absl::Status TestManager::ReplayLastPlan() {
|
||||
return absl::FailedPreconditionError("Harness plan replay not available");
|
||||
}
|
||||
|
||||
void TestManager::RecordPlanSummary(const std::string& summary) {
|
||||
(void)summary;
|
||||
}
|
||||
|
||||
#if defined(YAZE_WITH_GRPC)
|
||||
absl::Status TestManager::ShowHarnessDashboard() {
|
||||
return absl::OkStatus();
|
||||
}
|
||||
@@ -1883,15 +1877,27 @@ absl::Status TestManager::ShowHarnessDashboard() {
|
||||
absl::Status TestManager::ShowHarnessActiveTests() {
|
||||
return absl::OkStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
void TestManager::SetHarnessListener(HarnessListener* listener) {
|
||||
#if defined(YAZE_WITH_GRPC)
|
||||
absl::MutexLock lock(&mutex_);
|
||||
harness_listener_ = listener;
|
||||
}
|
||||
#else
|
||||
(void)listener;
|
||||
absl::Status TestManager::ReplayLastPlan() {
|
||||
return absl::UnimplementedError("Harness features require YAZE_WITH_GRPC");
|
||||
}
|
||||
|
||||
absl::Status TestManager::ShowHarnessDashboard() {
|
||||
return absl::UnimplementedError("Harness features require YAZE_WITH_GRPC");
|
||||
}
|
||||
|
||||
absl::Status TestManager::ShowHarnessActiveTests() {
|
||||
return absl::UnimplementedError("Harness features require YAZE_WITH_GRPC");
|
||||
}
|
||||
#endif
|
||||
|
||||
void TestManager::RecordPlanSummary(const std::string& summary) {
|
||||
(void)summary;
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
Reference in New Issue
Block a user