Updated CI pipeline build for Windows
parent
e807e7c984
commit
8e950e5145
|
@ -176,22 +176,19 @@ jobs:
|
||||||
- name: Create build directory
|
- name: Create build directory
|
||||||
run: cmake -E make_directory build
|
run: cmake -E make_directory build
|
||||||
- name: Run CMake (for Windows)
|
- name: Run CMake (for Windows)
|
||||||
working-directory: build
|
run: cmake --preset Windows-CI -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}\scripts\buildsystems\vcpkg.cmake
|
||||||
run: cmake -G "Ninja" -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}\scripts\buildsystems\vcpkg.cmake -DUSE_STATIC_RUNTIME=1 -DCBOT_STATIC=1 -DBOOST_STATIC=1 -DGLEW_STATIC=1 -DSNDFILE_STATIC=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\build\install -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=1 ..
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: build
|
|
||||||
run: |
|
run: |
|
||||||
$nproc = (Get-CIMInstance -Class 'CIM_Processor').NumberOfLogicalProcessors
|
$nproc = (Get-CIMInstance -Class 'CIM_Processor').NumberOfLogicalProcessors
|
||||||
cmake --build . -j $nproc
|
cmake --build --preset Windows-CI -j $nproc
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Install
|
- name: Install
|
||||||
working-directory: build
|
run: cmake --build --preset Windows-CI --target install
|
||||||
run: cmake --install .
|
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: windows-msvc-debug-${{ matrix.arch }}
|
name: windows-msvc-debug-${{ matrix.arch }}
|
||||||
path: build/install
|
path: install
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: ./colobot_ut --gtest_output=xml:gtestresults.xml
|
run: ./colobot_ut --gtest_output=xml:gtestresults.xml
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Contains global options and definitions
|
# Contains global options and definitions
|
||||||
##
|
##
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.21)
|
||||||
|
|
||||||
project(colobot
|
project(colobot
|
||||||
VERSION 0.2.1.0
|
VERSION 0.2.1.0
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"cmakeMinimumRequired": {
|
||||||
|
"major": 3,
|
||||||
|
"minor": 21,
|
||||||
|
"patch": 0
|
||||||
|
},
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "CI",
|
||||||
|
"description": "Base configuration for CI pipeline",
|
||||||
|
"hidden": true,
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"installDir": "${sourceDir}/install"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Windows-CI",
|
||||||
|
"description": "Windows configuration for CI pipeline",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"inherits": ["CI"],
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER": "cl.exe",
|
||||||
|
"CMAKE_CXX_COMPILER": "cl.exe",
|
||||||
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
|
"USE_STATIC_RUNTIME": true,
|
||||||
|
"CBOT_STATIC": true,
|
||||||
|
"BOOST_STATIC": true,
|
||||||
|
"GLEW_STATIC": true,
|
||||||
|
"SNDFILE_STATIC": true,
|
||||||
|
"DEV_BUILD": true,
|
||||||
|
"PORTABLE": true,
|
||||||
|
"TOOLS": true,
|
||||||
|
"TESTS": true,
|
||||||
|
"DESKTOP": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "Windows-CI",
|
||||||
|
"configurePreset": "Windows-CI",
|
||||||
|
"configuration": "RelWithDebInfo"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue