axmol/tools/win-ci/build.ps1

24 lines
865 B
PowerShell
Raw Normal View History

2021-08-27 01:42:32 +08:00
$BUILD_ARCH = $args[0]
2023-01-03 14:34:10 +08:00
$WINSDK_VER = $args[1]
2021-08-27 01:42:32 +08:00
# CONFIG_ALL_OPTIONS
$CONFIG_ALL_OPTIONS=@()
2023-01-03 14:34:10 +08:00
if ($BUILD_ARCH -eq "x86") {
$CONFIG_ALL_OPTIONS += '-A', 'Win32'
2021-08-27 01:42:32 +08:00
}
2023-01-03 14:34:10 +08:00
# windows sdk version, require xxx, but 10.0.22621.0 recommanded
if ($WINSDK_VER -eq '') { # empty, cmake will choose same with runner windows OS build version
cmake -S . -B build_$BUILD_ARCH $CONFIG_ALL_OPTIONS -Thost=x64 -DAX_ENABLE_EXT_IMGUI=TRUE -DAX_ENABLE_EXT_LIVE2D=TRUE -DAX_ENABLE_EXT_EFFEKSEER=TRUE
} else {
cmake -S . -B build_$BUILD_ARCH $CONFIG_ALL_OPTIONS -Thost=x64 -DAX_ENABLE_EXT_IMGUI=TRUE -DAX_ENABLE_EXT_LIVE2D=TRUE -DAX_ENABLE_EXT_EFFEKSEER=TRUE "-DCMAKE_SYSTEM_VERSION=$WINSDK_VER"
}
2021-08-27 01:42:32 +08:00
2022-05-23 17:11:10 +08:00
cmake --build build_$BUILD_ARCH --config Release --target cpp_tests
if ( !($env:PULL_REQUEST -eq 'yes') ) {
cmake --build build_$BUILD_ARCH --config Release --target lua_tests
}