Travis fixes for windows

This commit is contained in:
Georg Richter
2024-07-17 11:06:52 +02:00
parent 1287c901dc
commit ea307b8d6e
3 changed files with 17 additions and 11 deletions

View File

@ -13,6 +13,7 @@ before_install:
case $TRAVIS_OS_NAME in
windows)
choco install python --version=3.12.0
python --version
;;
esac
fi

View File

@ -64,21 +64,19 @@ else
cd bld
if [ "$TRAVIS_OS_NAME" = "windows" ] ; then
export WIX="c:/Program Files (x86)/WiX Toolset v3.14"
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCERT_PATH=${SSLCERT} -DDEFAULT_SSL_VERIFY_SERVER_CERT=OFF -DWITH_MSI=ON -DWITH_CURL=ON
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCERT_PATH=${SSLCERT} -DWITH_MSI=ON -DWITH_CURL=ON -DPython_ROOT_DIR=c:\python312
echo "build from windows"
set MARIADB_CC_TEST=1
set MYSQL_TEST_DB=testc
set MYSQL_TEST_TLS=%TEST_REQUIRE_TLS%
set MYSQL_TEST_USER=%TEST_DB_USER%
set MYSQL_TEST_HOST=%TEST_DB_HOST%
set MYSQL_TEST_PASSWD=%TEST_DB_PASSWORD%
set MYSQL_TEST_PORT=%TEST_DB_PORT%
set MYSQL_TEST_TLS=%TEST_REQUIRE_TLS%
export MARIADB_CC_TEST=1
export MYSQL_TEST_DB=testc
export MYSQL_TEST_USER=%TEST_DB_USER%
export MYSQL_TEST_HOST=%TEST_DB_HOST%
export MYSQL_TEST_PASSWD=%TEST_DB_PASSWORD%
export MYSQL_TEST_PORT=%TEST_DB_PORT%
cmake --build . --config RelWithDebInfo
else
echo "build from linux"
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCERT_PATH=${SSLCERT} -DDEFAULT_SSL_VERIFY_SERVER_CERT=OFF -DWITH_CURL=ON
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCERT_PATH=${SSLCERT} -DWITH_CURL=ON
export MARIADB_CC_TEST=1
export MYSQL_TEST_USER=$TEST_DB_USER
export MYSQL_TEST_HOST=$TEST_DB_HOST

View File

@ -19,7 +19,14 @@ ENDIF()
ENABLE_TESTING()
find_package (Python3 COMPONENTS Interpreter)
IF(WIN32 AND DEFINED ENV{TRAVIS})
SET(Python3_EXECUTABLE c:/python312/python.exe)
SET(Python3_FOUND TRUE)
ELSE()
# Always use highest version number
set(Python3_FIND_STRATEGY VERSION)
find_package (Python3 COMPONENTS Interpreter)
ENDIF()
INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include
${CC_BINARY_DIR}/include