From 4e0c07de0fea488704f5222da4b42c8bb0e26626 Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 10 May 2020 12:45:56 +0200 Subject: [PATCH] Build install target in CI --- CI/before_script.msvc.sh | 10 +++++++++- appveyor.yml | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 235ef0295..d4be543bb 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -36,6 +36,7 @@ PLATFORM="" CONFIGURATION="" TEST_FRAMEWORK="" GOOGLE_INSTALL_ROOT="" +INSTALL_PREFIX="." while [ $# -gt 0 ]; do ARGSTR=$1 @@ -83,9 +84,13 @@ while [ $# -gt 0 ]; do t ) TEST_FRAMEWORK=true ;; + i ) + INSTALL_PREFIX=$(echo "$1" | sed 's;\\;/;g' | sed -E 's;/+;/;g') + shift ;; + h ) cat < Set the configuration, can also be set with environment variable CONFIGURATION. @@ -109,6 +114,8 @@ Options: Produce NMake makefiles instead of a Visual Studio solution. -V Run verbosely + -i + CMake install prefix EOF exit 0 ;; @@ -760,6 +767,7 @@ cd $DEPS_INSTALL/.. echo echo "Setting up OpenMW build..." add_cmake_opts -DOPENMW_MP_BUILD=on +add_cmake_opts -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" if [ ! -z $CI ]; then case $STEP in components ) diff --git a/appveyor.yml b/appveyor.yml index 5095e7abd..3057cc725 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,15 +50,16 @@ install: before_build: - cmd: git submodule update --init --recursive - - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -c %configuration% -p %PLATFORM% -v %msvc% -V + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -c %configuration% -p %PLATFORM% -v %msvc% -V -i %APPVEYOR_BUILD_FOLDER%\install build_script: - cmd: if %PLATFORM%==Win32 set build=MSVC%msvc%_32 - cmd: if %PLATFORM%==x64 set build=MSVC%msvc%_64 - cmd: msbuild %build%\OpenMW.sln /t:Build /p:Configuration=%configuration% /m:2 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + - cmd: cmake --install %build% --config %configuration% after_build: - - cmd: if %PLATFORM%==x64 7z a OpenMW_MSVC%msvc%_%platform%_%appveyor_pull_request_number%_%appveyor_pull_request_head_commit%.zip %APPVEYOR_BUILD_FOLDER%\MSVC%msvc%_64\%configuration%\ -xr"!*.pdb" + - cmd: if %PLATFORM%==x64 7z a OpenMW_MSVC%msvc%_%platform%_%appveyor_pull_request_number%_%appveyor_pull_request_head_commit%.zip %APPVEYOR_BUILD_FOLDER%\install -xr"!*.pdb" #- cmd: if %PLATFORM%==x64 7z a OpenMW_MSVC%msvc%_%platform%_%appveyor_pull_request_number%_%appveyor_pull_request_head_commit%_pdb.zip %APPVEYOR_BUILD_FOLDER%\MSVC%msvc%_64\%configuration%\*.pdb test: off