-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from yallop/appveyor-setup
AppVeyor configuration (CI for Windows)
- Loading branch information
Showing
4 changed files
with
134 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
platform: | ||
- x64 | ||
|
||
environment: | ||
global: | ||
CYG_MIRROR: http://cygwin.uib.no | ||
CYG_CACHE: C:/cygwin/var/cache/setup | ||
matrix: | ||
- CYG_ARCH: x86 | ||
CYG_ROOT: C:/cygwin | ||
WODI_ARCH: 32 | ||
MINGW_ARCH: i686 | ||
- CYG_ARCH: x86_64 | ||
CYG_ROOT: C:/cygwin64 | ||
WODI_ARCH: 64 | ||
MINGW_ARCH: x86_64 | ||
|
||
init: | ||
- 'echo System architecture: %PLATFORM%' | ||
|
||
install: | ||
- 'appveyor DownloadFile http://cygwin.com/setup-%CYG_ARCH%.exe -FileName setup.exe' | ||
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P wget -P dos2unix -P diffutils -P cpio -P make -P patch -P mingw64-%MINGW_ARCH%-gcc-core -P mingw64-%MINGW_ARCH%-gcc-g++ >NUL' | ||
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"' | ||
- '%CYG_ROOT%/bin/bash -lc "wget -q http://ml.ignorelist.com/wodi/8/wodi%WODI_ARCH%.tar.xz -O /tmp/wodi%WODI_ARCH%.tar.xz"' | ||
- '%CYG_ROOT%/bin/bash -lc "cd /tmp && rm -rf wodi%WODI_ARCH% && tar -xf wodi%WODI_ARCH%.tar.xz && bash wodi%WODI_ARCH%/install.sh"' | ||
- '%CYG_ROOT%/bin/bash -lc "godi_add godi-ounit"' | ||
|
||
build_script: | ||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && ./appveyor/build.sh"' | ||
|
||
artifacts: | ||
- path: test.log | ||
name: test-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
type -p ocamlc | ||
ocamlc -version | ||
|
||
x="$(uname -m)" | ||
case "$x" in | ||
x86_64) | ||
build=x86_64-pc-cygwin | ||
host=x86_64-w64-mingw32 | ||
MINGW_TOOL_PREFIX=x86_64-w64-mingw32- | ||
;; | ||
*) | ||
build=i686-pc-cygwin | ||
host=i686-w64-mingw32 | ||
MINGW_TOOL_PREFIX=i686-w64-mingw32- | ||
;; | ||
esac | ||
|
||
export AR=${MINGW_TOOL_PREFIX}ar.exe | ||
export AS=${MINGW_TOOL_PREFIX}as.exe | ||
export CC=${MINGW_TOOL_PREFIX}gcc.exe | ||
export CPP=${MINGW_TOOL_PREFIX}cpp.exe | ||
export CPPFILT=${MINGW_TOOL_PREFIX}c++filt.exe | ||
export CXX=${MINGW_TOOL_PREFIX}g++.exe | ||
export DLLTOOL=${MINGW_TOOL_PREFIX}dlltool.exe | ||
export DLLWRAP=${MINGW_TOOL_PREFIX}dllwrap.exe | ||
export GCOV=${MINGW_TOOL_PREFIX}gcov.exe | ||
export LD=${MINGW_TOOL_PREFIX}ld.exe | ||
export NM=${MINGW_TOOL_PREFIX}nm.exe | ||
export OBJCOPY=${MINGW_TOOL_PREFIX}objcopy.exe | ||
export OBJDUMP=${MINGW_TOOL_PREFIX}objdump.exe | ||
export RANLIB=${MINGW_TOOL_PREFIX}ranlib.exe | ||
export RC=${MINGW_TOOL_PREFIX}windres.exe | ||
export READELF=${MINGW_TOOL_PREFIX}readelf.exe | ||
export SIZE=${MINGW_TOOL_PREFIX}size.exe | ||
export STRINGS=${MINGW_TOOL_PREFIX}strip.exe | ||
export STRIP=${MINGW_TOOL_PREFIX}strip.exe | ||
export WINDMC=${MINGW_TOOL_PREFIX}windmc.exe | ||
export WINDRES=${MINGW_TOOL_PREFIX}windres.exe | ||
|
||
# findlib is already installed | ||
|
||
# libffi: we need a static version and only a static version | ||
( | ||
rm -rf /usr/local | ||
mkdir -p /usr/local/include | ||
wget ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz | ||
rm -rf libffi-3.1 | ||
tar xfvz libffi-3.1.tar.gz | ||
cd libffi-3.1 | ||
(./configure --build="$build" --host="$host" --prefix /usr/local --disable-shared --enable-static </dev/null && make </dev/null && make install </dev/null) || cat config.log | ||
mkdir -p /usr/local/include/ | ||
ln -s -t /usr/local/include/ /usr/local/lib/libffi-3.1/include/* | ||
) | ||
|
||
export LIBFFI_CFLAGS="-I/usr/local/include" | ||
export LIBFFI_LIBS="-L/usr/local/lib -lffi" | ||
|
||
touch setup.data | ||
make distclean || true | ||
rm -f setup.data | ||
make all | ||
if ! make -k test &>test.log ; then | ||
echo "test case failure" >&2 | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/findlib-1.5.3/src/findlib/frontend.ml b/findlib-1.5.3/src/findlib/frontend.ml | ||
index 1fdb117..bf09ce9 100644 | ||
--- a/findlib-1.5.3/src/findlib/frontend.ml | ||
+++ b/findlib-1.5.3/src/findlib/frontend.ml | ||
@@ -384,13 +384,8 @@ let run_command ?filter verbose cmd args = | ||
let () = prerr_endline ("Findlib_config.system : " ^ Findlib_config.system) in | ||
let () = prerr_endline ("fixed_cmd : " ^ fixed_cmd) in | ||
|
||
- let pid = | ||
- Unix.create_process | ||
- fixed_cmd | ||
- (Array.of_list (cmd :: args)) | ||
- Unix.stdin | ||
- cmd_output | ||
- Unix.stderr | ||
+ let status = | ||
+ Unix.system (Printf.sprintf "%s %s" fixed_cmd (String.concat " " args)) | ||
in | ||
|
||
begin match filter with | ||
@@ -414,7 +409,6 @@ let run_command ?filter verbose cmd args = | ||
| None -> () | ||
end; | ||
|
||
- let (_,status) = Unix.waitpid [] pid in | ||
Sys.set_signal Sys.sigint old_sigint; | ||
begin | ||
match status with |