appveyor.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. image: Visual Studio 2013
  2. # This is the default location, but we put it here for safety reasons, since we use it in our test script
  3. clone_folder: c:\projects\rathena
  4. # We do not need the git history for our integration tests
  5. clone_depth: 50
  6. version: '{branch}-{build}'
  7. pull_requests:
  8. do_not_increment_build_number: true
  9. environment:
  10. matrix:
  11. - VisualStudioVersion: 14.0
  12. Defines: "\"BUILDBOT\""
  13. - VisualStudioVersion: 14.0
  14. Defines: "\"BUILDBOT;PRERE\""
  15. platform:
  16. - Win32
  17. - x64
  18. configuration:
  19. - Debug
  20. # Disable Release for now, since do not want to have any optimization and have access to debug infos on crash
  21. # - Release
  22. matrix:
  23. fast_finish: true
  24. build_script:
  25. - cmd: msbuild rAthena.sln /p:DefineConstants=%Defines%
  26. services: mysql
  27. test_script:
  28. - cmd: >-
  29. rem Set up the environment variables we need
  30. set DB_HOST=127.0.0.1
  31. set DB_ROOT=root
  32. set DB_ROOTPW=Password12!
  33. set DB_USER=ragnarok
  34. set DB_USERPW=ragnarok
  35. set DB_NAME=ragnarok
  36. set MYSQL="C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe"
  37. rem Setting creation
  38. cd C:\projects\rathena
  39. echo map_server_ip: %DB_HOST%>> conf\import\inter_conf.txt
  40. echo map_server_id: %DB_USER%>> conf\import\inter_conf.txt
  41. echo map_server_pw: %DB_PASS%>> conf\import\inter_conf.txt
  42. echo map_server_db: %DB_NAME%>> conf\import\inter_conf.txt
  43. echo log_db_ip: %DB_HOST%>> conf\import\inter_conf.txt
  44. echo log_db_id: %DB_USER%>> conf\import\inter_conf.txt
  45. echo log_db_pw: %DB_USERPW%>> conf\import\inter_conf.txt
  46. echo log_db_db: %DB_NAME%>> conf\import\inter_conf.txt
  47. rem MySQL database setup
  48. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% -e "CREATE DATABASE %DB_NAME%;"
  49. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\main.sql"
  50. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\logs.sql"
  51. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_cash_db.sql"
  52. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_cash_db2.sql"
  53. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db.sql"
  54. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db2.sql"
  55. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db_re.sql"
  56. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db2_re.sql"
  57. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db.sql"
  58. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db2.sql"
  59. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db_re.sql"
  60. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db2_re.sql"
  61. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db.sql"
  62. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db2.sql"
  63. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db_re.sql"
  64. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db2_re.sql"
  65. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\roulette_default_data.sql"
  66. %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% -e "GRANT ALL ON *.* TO '%DB_USER%'@'%DB_HOST%' IDENTIFIED BY '%DB_USERPW%';"
  67. rem Activate all custom and test scripts
  68. start /d tools\ci npc.bat
  69. rem Start the map server
  70. login-server.exe --run-once
  71. char-server.exe --run-once
  72. map-server.exe --run-once