update windows and macos workflows & add engine version to log

This commit is contained in:
MihailRis 2024-12-07 02:45:51 +03:00
parent d2fbb83d78
commit d9bd60f473
3 changed files with 30 additions and 23 deletions

View File

@ -39,16 +39,20 @@ jobs:
- name: Run tests - name: Run tests
run: ctest --output-on-failure --test-dir build run: ctest --output-on-failure --test-dir build
- name: Create DMG - name: Run engine (headless)
run: | run: |
mkdir VoxelEngineDmgContent chmod +x build/VoxelEngine
cp -r build/res VoxelEngineDmgContent/ build/VoxelEngine --headless --dir userdir
cp -r build/VoxelEngine VoxelEngineDmgContent/ # - name: Create DMG
cp -r build/libs VoxelEngineDmgContent/libs # run: |
hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO # mkdir VoxelEngineDmgContent
# cp -r build/res VoxelEngineDmgContent/
- name: Upload artifacts # cp -r build/VoxelEngine VoxelEngineDmgContent/
uses: actions/upload-artifact@v4 # cp -r build/libs VoxelEngineDmgContent/libs
with: # hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO
name: VoxelEngineMacOs #
path: VoxelEngineMacApp.dmg # - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: VoxelEngineMacOs
# path: VoxelEngineMacApp.dmg

View File

@ -34,16 +34,18 @@ jobs:
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON -DVOXELENGINE_BUILD_TESTS=ON .. cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON -DVOXELENGINE_BUILD_TESTS=ON ..
cmake --build . --config Release cmake --build . --config 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 }}
- name: Run tests - name: Run tests
run: ctest --output-on-failure --test-dir build run: ctest --output-on-failure --test-dir build
- uses: actions/upload-artifact@v4 - name: Run engine (headless)
with: run: build/Release/VoxelEngine.exe --headless --dir userdir
name: Windows-Build # - name: Package for Windows
path: 'packaged/Release/*' # 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/*'

View File

@ -75,6 +75,7 @@ Engine::Engine(CoreParameters coreParameters)
settingsHandler({settings}), settingsHandler({settings}),
interpreter(std::make_unique<cmd::CommandsInterpreter>()), interpreter(std::make_unique<cmd::CommandsInterpreter>()),
network(network::Network::create(settings.network)) { network(network::Network::create(settings.network)) {
logger.info() << "engine version: " << ENGINE_VERSION_STRING;
if (params.headless) { if (params.headless) {
logger.info() << "headless mode is enabled"; logger.info() << "headless mode is enabled";
} }