blob: ece8a948c9c7e932521ac11f39d4c9a784863315 [file] [log] [blame]
Anthony Green073bc9d2017-03-19 07:25:24 -04001shallow_clone: true
2
Anthony Greend2a40952019-10-14 06:46:52 -04003# We're currently only testing libffi built with Microsoft's
Anthony Green073bc9d2017-03-19 07:25:24 -04004# tools.
5# This matrix should be expanded to include at least:
6# 32- and 64-bit gcc/cygwin
7# 32- and 64-bit gcc/mingw
8# 32- and 64-bit clang/mingw
9# and perhaps more.
10
Paul Monsondb5706f2019-04-26 04:58:58 -070011image: Visual Studio 2017
Anthony Green073bc9d2017-03-19 07:25:24 -040012platform:
13 - x64
Paul Monsondb5706f2019-04-26 04:58:58 -070014 - x86
15 - arm
Paul Monsonc2a68592019-08-07 11:57:45 -070016 - arm64
Anthony Green073bc9d2017-03-19 07:25:24 -040017
18environment:
19 global:
20 CYG_ROOT: C:/cygwin
21 CYG_CACHE: C:/cygwin/var/cache/setup
22 CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
23 matrix:
Paul Monsondb5706f2019-04-26 04:58:58 -070024 - VSVER: 15
Anthony Green073bc9d2017-03-19 07:25:24 -040025
26install:
27 - ps: >-
28 If ($env:Platform -Match "x86") {
29 $env:VCVARS_PLATFORM="x86"
Paul Monsondb5706f2019-04-26 04:58:58 -070030 $env:BUILD="i686-pc-cygwin"
31 $env:HOST="i686-pc-cygwin"
32 $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh"
33 $env:SRC_ARCHITECTURE="x86"
Paul Monsonc2a68592019-08-07 11:57:45 -070034 } ElseIf ($env:Platform -Match "arm64") {
35 $env:VCVARS_PLATFORM="x86_arm64"
36 $env:BUILD="i686-pc-cygwin"
37 $env:HOST="aarch64-w64-cygwin"
38 $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm64"
39 $env:SRC_ARCHITECTURE="aarch64"
Paul Monsondb5706f2019-04-26 04:58:58 -070040 } ElseIf ($env:Platform -Match "arm") {
41 $env:VCVARS_PLATFORM="x86_arm"
42 $env:BUILD="i686-pc-cygwin"
43 $env:HOST="arm-w32-cygwin"
44 $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm"
45 $env:SRC_ARCHITECTURE="arm"
Anthony Green073bc9d2017-03-19 07:25:24 -040046 } Else {
47 $env:VCVARS_PLATFORM="amd64"
fwgaf6773d2018-04-02 13:55:31 +020048 $env:BUILD="x86_64-w64-cygwin"
49 $env:HOST="x86_64-w64-cygwin"
driver199806bf1a92019-04-28 03:21:44 +080050 $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -m64"
Paul Monsondb5706f2019-04-26 04:58:58 -070051 $env:SRC_ARCHITECTURE="x86"
Anthony Green073bc9d2017-03-19 07:25:24 -040052 }
Stephen8e250c32018-04-25 13:17:32 -070053 - 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
Anthony Green073bc9d2017-03-19 07:25:24 -040054 - 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
55 - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
Paul Monsondb5706f2019-04-26 04:58:58 -070056 - echo call VsDevCmd to set VS150COMNTOOLS
57 - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
Anthony Green073bc9d2017-03-19 07:25:24 -040058 - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
59 - echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
Paul Monsondb5706f2019-04-26 04:58:58 -070060 - call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
Anthony Green073bc9d2017-03-19 07:25:24 -040061
62build_script:
63 - c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
Paul Monsondb5706f2019-04-26 04:58:58 -070064 - c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='%MSVCC%' CXX='%MSVCC%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
65 - c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include; make; find .;)"
fwgaf6773d2018-04-02 13:55:31 +020066 - c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"