Skip to content

Fix usage vcpkg for windows and add cmake preset for vscode #65

Fix usage vcpkg for windows and add cmake preset for vscode

Fix usage vcpkg for windows and add cmake preset for vscode #65

Workflow file for this run

name: Windows Build (CLang)
on:
push:
branches: [ "main", "release-**"]
pull_request:
branches: [ "main", "headless-mode" ]
jobs:
build-windows:
strategy:
matrix:
include:
- os: windows-latest
compiler: clang
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install latest cmake and ninja
uses: lukka/get-cmake@latest
- name: Bootstrap vcpkg
shell: pwsh
run: |
git clone https://github.com/microsoft/vcpkg.git
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
- name: Configure and build project with CMake and vcpkg
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
run: |
cmake --preset default-ninja-clang-windows
cmake --build --preset default-ninja-clang-windows --config Release
- name: Run tests
run: ctest --preset default-vs-msvc-windows
- name: Run engine tests
run: |
build/vctest/Release/vctest.exe -e build/Release/VoxelEngine.exe -d dev/tests -u build --output-always
timeout-minutes: 1
- name: Package for Windows
run: |
mkdir packaged
cp -r build/Release/* packaged/
cp build/vctest/Release/vctest.exe packaged/
cp C:/Windows/System32/msvcp140.dll packaged/msvcp140.dll
mv packaged/VoxelEngine.exe packaged/VoxelCore.exe
working-directory: ${{ github.workspace }}
- uses: actions/upload-artifact@v4
with:
name: Windows-Build
path: 'packaged/*'