From bbb99871403baa625f088850e6bb3a5c59ee195a Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 7 Dec 2024 21:42:39 +0300 Subject: [PATCH] windows (#405) --- .github/workflows/windows.yml | 24 ++++++++++++------------ vctest/main.cpp | 12 +++++------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1f7978dd..dd1974c7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,7 +4,7 @@ on: push: branches: [ "main", "release-**"] pull_request: - branches: [ "main" ] + branches: [ "main", "headless-mode" ] jobs: build-windows: @@ -40,14 +40,14 @@ jobs: run: | build/vctest/Release/vctest.exe -e build/Release/VoxelEngine.exe -d dev/tests -u build timeout-minutes: 1 -# - name: Package for Windows -# run: | -# mkdir packaged -# cp -r build/* packaged/ -# cp C:/Windows/System32/msvcp140.dll packaged/Release/msvcp140.dll -# mv packaged/Release/VoxelEngine.exe packaged/Release/VoxelCore.exe -# working-directory: ${{ github.workspace }} -# - uses: actions/upload-artifact@v4 -# with: -# name: Windows-Build -# path: 'packaged/Release/*' + - name: Package for Windows + run: | + mkdir packaged + cp -r build/* packaged/ + cp C:/Windows/System32/msvcp140.dll packaged/Release/msvcp140.dll + mv packaged/Release/VoxelEngine.exe packaged/Release/VoxelCore.exe + working-directory: ${{ github.workspace }} + - uses: actions/upload-artifact@v4 + with: + name: Windows-Build + path: 'build/Release/*' diff --git a/vctest/main.cpp b/vctest/main.cpp index e0de9685..7757041e 100644 --- a/vctest/main.cpp +++ b/vctest/main.cpp @@ -143,11 +143,11 @@ static bool run_test(const Config& config, const fs::path& path) { auto name = path.stem(); std::stringstream ss; - ss << fix_path(config.executable.string()) << " --headless"; - ss << " --test " << path; - ss << " --res " << config.resDir; - ss << " --dir " << config.workingDir; - //ss << " >" << fix_path(outputFile.string()) << " 2>&1"; + ss << fs::canonical(config.executable) << " --headless"; + ss << " --test " << fix_path(path.string()); + ss << " --res " << fix_path(config.resDir.string()); + ss << " --dir " << fix_path(config.workingDir.string()); + ss << " >" << fix_path(outputFile.string()) << " 2>&1"; auto command = ss.str(); print_separator(std::cout); @@ -189,8 +189,6 @@ int main(int argc, char** argv) { } dump_config(config); - system("tree build/Release"); - std::vector tests; std::cout << "scanning for tests" << std::endl; for (const auto& entry : fs::directory_iterator(config.directory)) {