[ccan] [PATCH v3 13/13] Add appveyor.yml

Kevin Locke kevin at kevinlocke.name
Wed Sep 28 16:01:13 AEST 2016


On Tue, 2016-09-27 at 15:20 +1000, David Gibson wrote:
> On Thu, Sep 22, 2016 at 09:33:16PM -0600, Kevin Locke wrote:
>> This file defines the AppVeyor CI (appveyor.com) settings.
> 
> Nice, though I can't really test it until we've got the rest of the
> Windows / MSVC fixes applied.
> 
> If possible it would be nice to have in the commit message, and maybe
> as a comment in the yml file too, some instructions on how to view the
> appveyor results - what page to go to, do you need a login etc.

Sure, good idea.  This patch includes basic instructions for how to
view the current status and how to setup AppVeyor for a copy of the
repository.

It makes the assumption that Rusty wouldn't mind setting up AppVeyor
for his CCAN GitHub repo (which would also add build checks to pull
requests).  If you'd prefer not to, I think I can set it up to build
from git://git.ozlabs.org/~ccan/ccan on my own account (although I'm
not sure how it would handle update checking).  Let me know and I'll
give it a try to find out.

Also, for reference, you can see the current build results on my repo
at https://ci.appveyor.com/project/kevinoid/ccan

-8<--------------------------------------------------------------------
This file defines the AppVeyor CI (appveyor.com) settings.

It builds using make+bash under MSYS2 so that the current build system
can be used with minimal changes.  It currently only builds configurator
and generates config.h.

The build and test commands for more thorough testing are left as
comments in appveyor.yml so interested parties can use them as a
starting point for future work.

Note that several compiler errors not related to configurator are
printed due to make attempting to generate and include test-depends.
Although Windows-specific code could be added to Makefile to avoid
these, it seemed unwarranted if the compile errors may be fixed soon.

Changes since v2:
- Add reference to AppVeyor results for Rusty's GitHub repo and basic
  instructions to setup AppVeyor for forks.

Signed-off-by: Kevin Locke <kevin at kevinlocke.name>
---
 appveyor.yml | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 appveyor.yml

diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..0a930c6
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,37 @@
+# AppVeyor CI Configuration
+#
+# Current build status can be viewed at
+# https://ci.appveyor.com/project/rustyrussell/ccan
+#
+# To build test a fork of this repository using AppVeyor:
+# 1. Visit appveyor.com and create a free account.
+# 2. On the Projects tab, select "New Project" then the project hosting site.
+# 3. Grant OAuth permissions to your project git host.
+# 4. Select the repository for your project fork.
+# 5. Review build results and push updates until the desired result is reached.
+
+version: 0.0.{build}
+
+platform:
+- x86
+- amd64
+
+build_script:
+# Reset %PATH% to avoid msys/cygwin DLL conflicts which cause
+# *** fatal error - cygheap base mismatch detected
+- set PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\msys64\usr\bin
+# Set environment variables for chosen compiler
+- "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" %Platform%"
+# Ensure config.h can be generated.
+# Note: Dash options avoid POSIX path conversion by msys
+- "make config.h CC=cl CCAN_CFLAGS=\"-nologo -Zi -FS -W4 -wd4200 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS\" CFLAGS_FORCE_C_SOURCE=-TC OUTPUT_OPTION=-Fo:$@ DEPGEN= LD=link SHELL=bash"
+# FIXME:  Work in progress.  Disabled due to unfixed compile errors.
+# FIXME:  -j%NUMBER_OF_PROCESSORS% won't work without DEPGEN for config.h
+#         It may be possible to generate .d from cl using /showIncludes
+#         See https://stackoverflow.com/q/37685069
+#- "make tools CC=cl CCAN_CFLAGS=\"-nologo -Zi -FS -W4 -wd4200 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS\" CFLAGS_FORCE_C_SOURCE=-TC OUTPUT_OPTION=-Fo:$@ DEPGEN= LD=link SHELL=bash"
+#- "make -k CC=cl CCAN_CFLAGS=\"-nologo -Zi -FS -W4 -wd4200 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS\" CFLAGS_FORCE_C_SOURCE=-TC OUTPUT_OPTION=-Fo:$@ DEPGEN= LD=link SHELL=bash"
+
+test_script:
+# FIXME:  Work in progress.  Disabled due to unfixed compile errors.
+#- "make -k check CC=cl CCAN_CFLAGS=\"-nologo -Zi -FS -W4 -wd4200 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS\" CFLAGS_FORCE_C_SOURCE=-TC OUTPUT_OPTION=-Fo:$@ DEPGEN= LD=link SHELL=bash"
-- 
2.9.3



More information about the ccan mailing list