forked from fpco/odbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
49 lines (40 loc) · 1.61 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
version: 1.0.{build}
image: Visual Studio 2015
build: off
environment:
global:
# Avoid long paths on Windows
STACK_ROOT: "c:\\s"
STACK_WORK: ".w"
WORK_DIR: "c:\\w"
ODBC_TEST_CONNECTION_STRING: "DRIVER={ODBC Driver 13 for SQL Server};SERVER=127.0.0.1;Uid=sa;Pwd=Password12!"
services:
- mssql2017
before_test:
# Avoid long paths not to each MAX_PATH of 260 chars
- xcopy /q /s /e /r /k /i /v /h /y "%APPVEYOR_BUILD_FOLDER%" "%WORK_DIR%"
- cd "%WORK_DIR%"
# Install stack
- curl -L https://www.stackage.org/stack/windows-x86_64 -o stack.zip
- 7z x stack.zip stack.exe
# Install ODBC drivers
- ps: Write-Host "Installing ODBC driver..." -ForegroundColor Cyan
- ps: Write-Host "Downloading..."
- ps: $msiPath = "$($env:USERPROFILE)\msodbcsql.msi"
- ps: (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/D/5/E/D5EEF288-A277-45C8-855B-8E2CB7E25B96/x64/msodbcsql.msi', $msiPath)
- ps: Write-Host "Installing..."
- ps: cmd /c start /wait msiexec /i "$msiPath" /q
- ps: del $msiPath
test_script:
- cd "%WORK_DIR%"
- stack --verbosity warn setup --no-reinstall > nul
- stack test
-j 1
--no-terminal
--local-bin-path %SYSTEMROOT%\system32
--extra-lib-dirs="%WORK_DIR%"
# Uncomment these two lines if you need to RPD into the VM to debug something
# init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))