From da279f96221ee8205797ea68b0cd89d4d1a8a769 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 2 May 2015 17:37:30 +0100 Subject: [PATCH] Setup continuous testing on cygwin using AppVeyor --- .appveyor.yml | 31 +++++++++++++++++++++++++++++++ Makefile.in | 2 +- test/ThreadTest.cpp | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..3979cc7c --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,31 @@ +# There is a pre-installed cygwin: http://help.appveyor.com/discussions/suggestions/427-pre-install-cygwin +# But it's old and misses some stuff anyway +# +# TODO: test both x86 and x86_64 +# TODO: test msvc +version: 0.0.0.0.1-branch-{branch}-build-{build} +clone_depth: 10 +cache: + - c:\cygwin\var\cache\setup +install: + - ps: Invoke-WebRequest https://cygwin.com/setup-x86.exe -OutFile c:\cygwin-setup-x86.exe + - c:\cygwin-setup-x86.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --upgrade-also --only-site --site http://cygwin.mirror.constant.com --root c:\cygwin --local-package-dir c:\cygwin\var\cache\setup --packages aclocal,automake,gcc-g++,make,pkg-config,wget,openssl-devel,libicu-devel > cygwin-install.log 2>&1 + - ps: Push-AppveyorArtifact cygwin-install.log + - c:\cygwin\bin\sh -lc "uname -a" + - c:\cygwin\bin\sh -lc "cat /proc/cpuinfo" + - c:\cygwin\bin\sh -lc "cat /proc/meminfo" + - c:\cygwin\bin\sh -lc "ls -l /bin" + - c:\cygwin\bin\sh -lc "cygcheck -s -v > $APPVEYOR_BUILD_FOLDER/cygcheck.log 2>&1" + - ps: Push-AppveyorArtifact cygcheck.log +# stdin is broken at AppVeyor, so we open it explicitly as /dev/null +build_script: + - git submodule update --init + - c:\cygwin\bin\sh -lc "cd $APPVEYOR_BUILD_FOLDER; ./autogen.sh < /dev/null" + - mkdir build + - c:\cygwin\bin\sh -lc "cd $APPVEYOR_BUILD_FOLDER/build; ../configure < /dev/null" + - ps: Push-AppveyorArtifact build\config.log + - c:\cygwin\bin\sh -lc "cd $APPVEYOR_BUILD_FOLDER/build; make VERBOSE=1 -j2 < /dev/null" + - c:\cygwin\bin\sh -lc "cd $APPVEYOR_BUILD_FOLDER/build; make install < /dev/null" + - c:\cygwin\bin\sh -lc "znc --version" +test_script: + - c:\cygwin\bin\sh -lc "cd $APPVEYOR_BUILD_FOLDER/build; make VERBOSE=1 test < /dev/null" diff --git a/Makefile.in b/Makefile.in index 4a5b521b..0b78e4c6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,7 +148,7 @@ endif ifneq "THIS_IS_NOT_TARBALL" "" # If git commit was changed since previous build, add a phony target to dependencies, forcing version.o to be recompiled # Nightlies have pregenerated version.cpp -src/version.cpp: Makefile version.sh $(shell if [ x`cat .version_extra 2> /dev/null` != x`$(srcdir)/version.sh $(GIT) 3>&2 2> /dev/null` ]; then echo version_extra_recompile; fi) +src/version.cpp: Makefile version.sh $(shell if [ x`cat .version_extra 2> /dev/null` != x`$(srcdir)/version.sh "$(GIT)" 3>&2 2> /dev/null` ]; then echo version_extra_recompile; fi) @mkdir -p .depend src $(E) Building source file version.cpp... $(Q)WRITE_OUTPUT=yes $(srcdir)/version.sh "$(GIT)" > .version_extra 2> /dev/null diff --git a/test/ThreadTest.cpp b/test/ThreadTest.cpp index 4ba5f415..ad9df86c 100644 --- a/test/ThreadTest.cpp +++ b/test/ThreadTest.cpp @@ -16,6 +16,7 @@ #include #include +#include class CWaitingJob : public CJob { public: