Setup AppVeyor Build Matrix for 32 & 64 bit builds.
This commit is contained in:
@@ -1,26 +1,54 @@
|
|||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
|
image: Visual Studio 2015
|
||||||
image: Visual Studio 2015
|
|
||||||
platform: x64
|
environment:
|
||||||
|
matrix:
|
||||||
environment:
|
- COMPILER: msys2
|
||||||
matrix:
|
PLATFORM: x86
|
||||||
- COMPILER: msys2
|
MSYS2_ARCH: x86
|
||||||
PLATFORM: x64
|
MSYS2_DIR: msys64
|
||||||
MSYS2_ARCH: x86_64
|
MSYSTEM: MINGW32
|
||||||
MSYS2_DIR: msys64
|
BIT: 32
|
||||||
MSYSTEM: MINGW64
|
- COMPILER: msys2
|
||||||
BIT: 64
|
PLATFORM: x64
|
||||||
|
MSYS2_ARCH: x86_64
|
||||||
build_script:
|
MSYS2_DIR: msys64
|
||||||
- '%APPVEYOR_BUILD_FOLDER%\win_build.bat'
|
MSYSTEM: MINGW64
|
||||||
|
BIT: 64
|
||||||
test_script:
|
|
||||||
- '%APPVEYOR_BUILD_FOLDER%\test\test_libpostal.exe'
|
build_script:
|
||||||
|
- cmd: cd %APPVEYOR_BUILD_FOLDER%
|
||||||
after_build:
|
- ps: |
|
||||||
- 7z a libpostal.zip %APPVEYOR_BUILD_FOLDER%\libpostal.dll %APPVEYOR_BUILD_FOLDER%\libpostal.def %APPVEYOR_BUILD_FOLDER%\libpostal.exp %APPVEYOR_BUILD_FOLDER%\libpostal.lib %APPVEYOR_BUILD_FOLDER%\src\libpostal.h
|
Write-Host "Compiler: $Env:COMPILER"
|
||||||
|
Write-Host "Architecture: $Env:MSYS2_ARCH"
|
||||||
artifacts:
|
Write-Host "Platform: $Env:PLATFORM"
|
||||||
- path: libpostal.zip
|
Write-Host "MSYS2 Directory: $Env:MSYS2_DIR"
|
||||||
name: libpostal
|
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"
|
||||||
|
bash -lc "cd $Env:WDIR && make install"
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- '%APPVEYOR_BUILD_FOLDER%\test\test_libpostal.exe'
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: libpostal.zip
|
||||||
|
name: libpostal
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
cd %APPVEYOR_BUILD_FOLDER%
|
|
||||||
|
|
||||||
echo Compiler: %COMPILER%
|
|
||||||
echo Architecture: %MSYS2_ARCH%
|
|
||||||
echo Platform: %PLATFORM%
|
|
||||||
echo MSYS2 directory: %MSYS2_DIR%
|
|
||||||
echo MSYS2 system: %MSYSTEM%
|
|
||||||
echo Configuration: %CONFIGURATION%
|
|
||||||
echo Bits: %BIT%
|
|
||||||
|
|
||||||
IF %COMPILER%==msys2 (
|
|
||||||
@echo on
|
|
||||||
SET "PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH%"
|
|
||||||
|
|
||||||
bash -lc "cd $APPVEYOR_BUILD_FOLDER && cp -rf windows/* ./"
|
|
||||||
bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap.sh"
|
|
||||||
bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./configure --datadir=/c"
|
|
||||||
bash -lc "cd $APPVEYOR_BUILD_FOLDER && make"
|
|
||||||
bash -lc "cd $APPVEYOR_BUILD_FOLDER && make install"
|
|
||||||
bash -lc "cd $APPVEYOR_BUILD_FOLDER && 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:x64
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user