forked from pBlueG/SA-MP-MySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
66 lines (48 loc) · 2.18 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '{build}'
image: Visual Studio 2015
services:
- mysql
configuration:
- Debug
- Release
platform: x86
clone_depth: 1
environment:
SAMP_SERVER_ROOT: C:\Projects\sa-mp-mysql\samp03
BOOST_ROOT: C:/Libraries/boost_1_59_0
BOOST_LIBRARYDIR: C:/Libraries/boost_1_59_0/lib32-msvc-14.0
install:
- git submodule update --init --recursive
- appveyor DownloadFile https://downloads.mariadb.com/Connectors/c/connector-c-3.0.2/mariadb-connector-c-3.0.2-win32.msi
- msiexec /i mariadb-connector-c-3.0.2-win32.msi /quiet /qn
- del mariadb-connector-c-3.0.2-win32.msi
- ps: Start-FileDownload http://files.sa-mp.com/samp037_svr_R2-2-1_win32.zip
- 7z x samp037_svr_R2-2-1_win32.zip -osamp03
- appveyor DownloadFile https://github.com/Zeex/pawn/releases/download/20160702/pawnc-3.10.20160702-windows.zip
- 7z x pawnc-3.10.20160702-windows.zip
- set PATH=%PATH%;%CD%\pawnc-3.10.20160702-windows\bin
- set PATH=%PATH%;C:\Python27\Scripts
- pip install samp-server-cli
- set PATH=%PATH%;C:\Program Files\MySql\MySQL Server 5.7\bin
before_build:
- cmake . -G "Visual Studio 14 2015" -DCMAKE_INSTALL_PREFIX="%SAMP_SERVER_ROOT%" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DMYSQLCAPI_ROOT_DIR="C:/Program Files (x86)/MariaDB/MariaDB Connector C"
build_script:
- cmake --build . --config %CONFIGURATION%
- cmake --build . --config %CONFIGURATION% --target install
- cmake --build . --config %CONFIGURATION% --target package
before_test:
- mysql -e "CREATE DATABASE `test`;" --user=root --password=Password12!
- mysql -e "CREATE USER 'tester'@'127.0.0.1' IDENTIFIED BY '1234';" --user=root --password=Password12!
- mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'tester'@'127.0.0.1' WITH GRANT OPTION;" --user=root --password=Password12!
test_script:
- pawncc tests\unit_test.pwn -d3 -Z+ -; -( -i%SAMP_SERVER_ROOT%\pawno\include -itests\include
- xcopy tests\test_data %SAMP_SERVER_ROOT% /E
- copy *.amx %SAMP_SERVER_ROOT%\gamemodes
- samp-server-cli -o -g unit_test -d mysql -T 60
on_failure:
- type %SAMP_SERVER_ROOT%\logs\plugins\mysql.log
artifacts:
- path: mysql-*-win32.zip
name: MySQL plugin
- path: samp03\logs
name: MySQL unit test logs