-
Notifications
You must be signed in to change notification settings - Fork 419
/
.appveyor.yml
55 lines (50 loc) · 2.06 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
version: 1.0.{build}
image: Visual Studio 2015
skip_branch_with_pr: true
environment:
matrix:
- COMPILER: msys2
PLATFORM: x86
MSYS2_ARCH: x86
MSYS2_DIR: msys64
MSYSTEM: MINGW32
BIT: 32
- COMPILER: msys2
PLATFORM: x64
MSYS2_ARCH: x86_64
MSYS2_DIR: msys64
MSYSTEM: MINGW64
BIT: 64
build_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- ps: |
Write-Host "Compiler: $Env:COMPILER"
Write-Host "Architecture: $Env:MSYS2_ARCH"
Write-Host "Platform: $Env:PLATFORM"
Write-Host "MSYS2 Directory: $Env:MSYS2_DIR"
Write-Host "MSYS2 System: $Env:MSYSTEM"
if ($Env:COMPILER -eq "msys2") {
$Env:Path = "C:\$Env:MSYS2_DIR\$Env:MSYSTEM\bin;C:\$Env:MSYS2_DIR\usr\bin;$Env:Path"
$Env:WDIR = $Env:APPVEYOR_BUILD_FOLDER -replace "\\", "/"
bash -lc "cd $Env:WDIR && cp -rf ./windows/* ./"
bash -lc "cd $Env:WDIR && ./bootstrap.sh"
bash -lc "cd $Env:WDIR && ./configure --datadir=/c"
bash -lc "cd $Env:WDIR && make -j4"
bash -lc "cd $Env:WDIR && make check"
bash -lc "cd $Env:WDIR && cp src/.libs/libpostal-*.dll libpostal.dll"
& 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\lib.exe' /def:libpostal.def /out:libpostal.lib /machine:$Env:PLATFORM
if ($Env:BIT -eq "32") {
$Paths = @(
(Join-Path $Env:APPVEYOR_BUILD_FOLDER "src"),
(Join-Path $Env:APPVEYOR_BUILD_FOLDER "src\.libs"),
(Join-Path $Env:APPVEYOR_BUILD_FOLDER "test"),
(Join-Path $Env:APPVEYOR_BUILD_FOLDER "test\.libs"))
Get-ChildItem -Path $Paths | ?{ $_.Name -Match '\.(exe|dll)$' } | % { & 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\editbin.exe' /NOLOGO /LARGEADDRESSAWARE $_.FullName }
}
7z a libpostal.zip $Env:APPVEYOR_BUILD_FOLDER\libpostal.dll $Env:APPVEYOR_BUILD_FOLDER\libpostal.def $Env:APPVEYOR_BUILD_FOLDER\libpostal.exp $Env:APPVEYOR_BUILD_FOLDER\libpostal.lib $Env:APPVEYOR_BUILD_FOLDER\src\libpostal.h
}
test_script:
- '%APPVEYOR_BUILD_FOLDER%\test\test_libpostal.exe'
artifacts:
- path: libpostal.zip
name: libpostal