• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1shallow_clone: true
2
3# We're currently only testing libffi built with Microsoft's
4# 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
11image: Visual Studio 2017
12platform:
13  - x64
14  - x86
15  - arm
16  - arm64
17
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:
24    - VSVER: 15
25
26install:
27  - ps: >-
28      If ($env:Platform -Match "x86") {
29          $env:VCVARS_PLATFORM="x86"
30          $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"
34        } 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"
40        } 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"
46        } Else {
47          $env:VCVARS_PLATFORM="amd64"
48          $env:BUILD="x86_64-w64-cygwin"
49          $env:HOST="x86_64-w64-cygwin"
50          $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -m64"
51          $env:SRC_ARCHITECTURE="x86"
52      }
53  - 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
54  - 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
55  - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
56  - echo call VsDevCmd to set VS150COMNTOOLS
57  - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
58  - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
59  - echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
60  - call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
61
62build_script:
63  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
64  - 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 .;)"
66  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"
67