windows build 7
Some checks failed
demo.yaml / windows build 7 (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-02-23 02:55:00 +01:00
commit 8df52b4ae7
2 changed files with 45 additions and 11 deletions

View file

@ -35,7 +35,7 @@ $vulkanSDKPath = Join-Path -Path $vulkanBasePath -ChildPath (Join-Path -Path $la
clang++ -std=c++26 -I"$vulkanSDKPath" -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile .\build/std.cppm -o .\build/std.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" interfaces\Crafter.Build-CompileStatus.cppm -o .\build\Crafter.Build-CompileStatus.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" interfaces\Crafter.Build-Command.cppm -o .\build\Crafter.Build-Command.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" -D PLATFORM_WINDOWS interfaces\Crafter.Build-Command.cppm -o .\build\Crafter.Build-Command.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" interfaces\Crafter.Build-Shader.cppm -o .\build\Crafter.Build-Shader.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" interfaces\Crafter.Build-Module.cppm -o .\build\Crafter.Build-Module.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" interfaces\Crafter.Build-Implementation.cppm -o .\build\Crafter.Build-Implementation.pcm
@ -44,15 +44,15 @@ clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\bui
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" interfaces\Crafter.Build-Project.cppm -o .\build\Crafter.Build-Project.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" --precompile -fprebuilt-module-path=".\build" -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces\Crafter.Build.cppm -o .\build\Crafter.Build.pcm
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Command.pcm -o .\build\Crafter.Build-Command.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Shader.pcm -o .\build\Crafter.Build-Shader.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Module.pcm -o .\build\Crafter.Build-Module.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Implementation.pcm -o .\build\Crafter.Build-Implementation.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Configuration.pcm -o .\build\Crafter.Build-Configuration.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Project.pcm -o .\build\Crafter.Build-Project.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Test.pcm -o .\build\Crafter.Build-Test.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-CompileStatus.pcm -o .\build\Crafter.Build-CompileStatus.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build.pcm -o .\build\Crafter.Build.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Command.pcm -o .\build\Crafter.Build-Command.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Shader.pcm -o .\build\Crafter.Build-Shader.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Module.pcm -o .\build\Crafter.Build-Module.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Implementation.pcm -o .\build\Crafter.Build-Implementation.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Configuration.pcm -o .\build\Crafter.Build-Configuration.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Project.pcm -o .\build\Crafter.Build-Project.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-Test.pcm -o .\build\Crafter.Build-Test.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build-CompileStatus.pcm -o .\build\Crafter.Build-CompileStatus.o
clang++ -std=c++26 -O3 -fprebuilt-module-path=".\build" -c .\build\Crafter.Build.pcm -o .\build\Crafter.Build.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\implementations\Crafter.Build-Command.cpp -o .\build\Crafter.Build-Command_impl.o
clang++ -std=c++26 -I"$vulkanSDKPath" -O3 -fprebuilt-module-path=".\build" -c .\implementations\Crafter.Build-Test.cpp -o .\build\Crafter.Build-Test_impl.o

View file

@ -19,12 +19,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
module;
#include <stdio.h>
#ifdef PLATFORM_WINDOWS
#include <windows.h>
#endif
module Crafter.Build:Command_impl;
import :Command;
import std;
namespace Crafter {
#ifndef PLATFORM_WINDOWS
std::string RunCommand(const std::string_view cmd) {
std::array<char, 128> buffer;
std::string result;
@ -50,6 +54,36 @@ namespace Crafter {
if (!pipe) throw std::runtime_error("popen() failed!");
pclose(pipe);
}
#else
std::string RunCommand(const std::string_view cmd) {
std::array<char, 128> buffer;
std::string result;
std::string command = "cmd.exe /C " + std::string(cmd) + " 2>&1"; // Redirect stderr to stdout
// Open pipe to file
FILE* pipe = _popen(command.c_str(), "r");
if (!pipe) throw std::runtime_error("popen() failed!");
// Read till end of process:
while (fgets(buffer.data(), buffer.size(), pipe) != nullptr) {
result += buffer.data();
}
// Close pipe
_pclose(pipe);
return result;
}
void RunCommandIgnore(const std::string_view cmd) {
std::string command = "cmd.exe /C " + std::string(cmd) + " > NUL 2>&1"; // Redirect stdout and stderr to NUL
// Open pipe to file
FILE* pipe = _popen(command.c_str(), "r");
if (!pipe) throw std::runtime_error("popen() failed!");
_pclose(pipe);
}
#endif
// CompileException::CompileException(std::vector<CompileError>&& errors) : errors(std::move(errors)) {
// for(CompileError error : errors) {