-
Notifications
You must be signed in to change notification settings - Fork 22
/
appveyor.yml
99 lines (82 loc) · 2.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "{branch}-{build}"
shallow_clone: true
platform:
# - x86
- x64
services:
- mssql2017
- postgresql101
image: Visual Studio 2019
configuration:
# - Debug
- Release
environment:
MYSQL_DIR: C:\Program Files\MySql\MySQL Server 8.0
PGUSER: "postgres"
PGPASSWORD: "Password12!"
MYSQL_PWD: "Password12!"
skip_commits:
files:
- .github/workflows/windows.yml
- .github/workflows/release.yml
- .github/workflows/coverage.yml
init:
- SET PATH=C:\Program Files\PostgreSQL\10\bin\;%PATH%
- psql --version
branches:
only:
- master
- develop
- /v\d+\.\d+\.\d+/
except:
- feature/gh-pages
install:
- git clone https://github.com/snikulov/sqlite.cmake.build.git C:\projects\sqlite\src
- appveyor-retry choco install doxygen.install
before_build:
- ps: Start-Service MySQL80
- ps: |
cd C:\projects\sqlite\src
mkdir build
cd build
$env:generator="Visual Studio 16 2019"
echo generator="$env:generator"
$env:SQLITE_ROOT="C:\projects\sqlite\sqlite"
$env:PATH="$env:PATH;$env:SQLITE_ROOT\bin;$env:MYSQL_DIR\bin;$env:MYSQL_DIR\lib"
$env:USER="root"
mysql -e "create database matador_test;" --user=root
sqlcmd -S localhost,1433 -U sa -P Password12! -Q "CREATE DATABASE matador_test"
psql -c "CREATE DATABASE matador_test;" -U postgres
psql -c "CREATE USER test WITH PASSWORD 'test123';" -U postgres
cmake -G "$env:generator" -DCMAKE_INSTALL_PREFIX="C:\projects\sqlite\sqlite" ..
cmake --build . --config Release --target install
cd "$env:APPVEYOR_BUILD_FOLDER"
mkdir build
cd build
cmake -G "$env:generator" -DMATADOR_ODBC=true -DMSSQL_CONNECTION_STRING:STRING="mssql://sa:Password12!@(local)\\SQL2017/matador_test (ODBC Driver 17 for SQL Server)" -DMATADOR_SQLITE3=true -DMATADOR_MYSQL=true -DMYSQL_CONNECTION_STRING:STRING="mysql://root:Password12!@localhost/matador_test" -DPOSTGRESQL_CONNECTION_STRING:STRING="postgresql://test:[email protected]/matador_test" ..
build_script:
- cmake --build . --config %configuration% --target matador test_matador
before_test:
- copy "C:\projects\sqlite\sqlite\bin\sqlite3.dll" "C:\projects\matador\build\Release\bin\%CONFIGURATION%\"
test_script:
- dir
- cd "%APPVEYOR_BUILD_FOLDER%/build" && if %CONFIGURATION%==Debug (ctest --verbose -E perftest --build-config %CONFIGURATION%) else (ctest --verbose --build-config %CONFIGURATION%)
after_build:
- ps: |
if (($env:APPVEYOR_REPO_TAG -Match "true") -and ($env:configuration -Match "Release")) {
cmake --build . --target web
cpack -G NSIS -C Release
}
artifacts:
- path: Package/matador*.exe
name: installer
deploy:
provider: GitHub
auth_token:
secure: VdPPVnmf2IpYg8348grqXRBjh5DWShItre2LA8wKqHvA5yi8eopOI4yp5nI9ZSlZ
artifact: installer
draft: false
prerelease: false
on:
configuration: Release
appveyor_repo_tag: true