Skip to content

Commit

Permalink
fix windows tests (libffi#595)
Browse files Browse the repository at this point in the history
* Update .appveyor.yml

* add (debug+release)*(shared+static) CI

* fix libversion
  • Loading branch information
ericLemanissier authored Mar 24, 2021
1 parent 1aeb267 commit 01b56f4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
27 changes: 22 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ platform:
- arm
- arm64

configuration:
- Debug
- Release

environment:
global:
CYG_ROOT: C:/cygwin
CYG_CACHE: C:/cygwin/var/cache/setup
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
VSVER: 15
matrix:
- VSVER: 15
- SHARED_ARG: "--enable-shared --disable-static"
- SHARED_ARG: "--enable-static --disable-shared"

install:
- ps: >-
Expand Down Expand Up @@ -50,6 +56,11 @@ install:
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -m64"
$env:SRC_ARCHITECTURE="x86"
}
If ($env:Configuration -Match "Debug") {
$env:DEBUG_ARG="--enable-debug"
} Else {
$env:DEBUG_ARG="--disable-debug"
}
- 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
Expand All @@ -60,7 +71,13 @@ install:
- call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%

build_script:
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
- 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;)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include; make; find .;)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh)"
- 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 $DEBUG_ARG $SHARED_ARG)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; make)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; make check RUNTESTFLAGS='-v -v -v -v')"


on_finish:
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cat `find ./ -name libffi.log`)"
2 changes: 1 addition & 1 deletion msvcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ml="ml"
safeseh="-safeseh"
output=
libpaths=
libversion=7
libversion=8
verbose=

while [ $# -gt 0 ]
Expand Down

0 comments on commit 01b56f4

Please sign in to comment.