Add appveyor.yml for Windows CI via Appveyor
authorNicolas Williams <nico@cryptonector.com>
Sun, 17 Jan 2016 23:09:42 +0000 (17:09 -0600)
committerNicolas Williams <nico@cryptonector.com>
Thu, 21 Jan 2016 18:43:31 +0000 (12:43 -0600)
Appveyor is like Travis-CI, but for Windows.

Since it seems impossible to install texinfo, this elides building docs
for now.

NTMakefile
appveyor.yml [new file with mode: 0644]
packages/windows/assembly/NTMakefile

index 9848a78979d03b7f4016bd9de90189cbbb78f34b..adf04f8455e7dba7b360fa2702f5ee740ca33826 100644 (file)
 thirdparty=thirdparty
 !endif
 
+!ifdef APPVEYOR
+SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl \
+       tools tests packages etc
+!else
 SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc \
        tools tests packages etc $(thirdparty) packages\windows\installer
+!endif
 
 !include windows/NTMakefile.w32
 
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644 (file)
index 0000000..39b35d7
--- /dev/null
@@ -0,0 +1,50 @@
+install:
+  # FIXME: Somehow this isn't enough to get texinfo installed
+  #        See https://github.com/appveyor/ci/issues/606
+  - C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
+  - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy"
+  - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S autoconf automake bison flex texinfo"
+  - C:\cygwin\setup-x86.exe -qnNdO -R C:\cygwin -s http://cygwin.mirror.constant.com -l C:\cygwin\var\cache\setup -P texinfo
+
+build_script:
+  - set PSDKDir=C:\Program Files\Microsoft SDKs\Windows\v7.1
+  - call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" %1 %2 /xp
+  - set WIXDIR="c:\Program Files (x86)\Windows Installer XML v3.5"
+  # We're not doing any codesigning in the Appveyor build yet.
+  - SET CODESIGN_PKT=0000000000000000
+  - set PATH=%PATH%;C:\Python26;C:\Perl64\bin;C:\tools\cygwin\bin;C:\Program Files (x86)\HTML Help Workshop
+  - set PATH=%PATH%;C:/msys64/usr/bin
+  - set PATH=%PATH%;C:\program files (x86)\windows installer xml v3.5\bin;C:\cygwin\bin
+  - set dbg__type=Debug
+  - title Heimdal Build %CPU% %dbg__type%
+  - echo PATH=%PATH%
+  # Right now we can't make doc nor installers
+  - nmake /f NTMakefile APPVEYOR=1 MAKEINFO=makeinfo NO_INSTALLERS=1
+  - 7z a heimdal-out.zip C:\projects\heimdal\out\
+
+test_script:
+  # Packages are not validated in the Appveyor build, FYI.
+  - nmake /f NTMakefile APPVEYOR=1 MAKEINFO=makeinfo NO_INSTALLERS=1 test
+
+artifacts:
+  - path: heimdal-out.zip
+    name: heimdal-out
+
+on_failure:
+  - appveyor PushArtifact heimdal-out.zip
+
+# To get RDP access to an appveyor worker for debugging a build, just
+# uncomment these next two lines and the last two lines too.
+#init:
+#  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+
+# Uncomment this to allow the RDP session to continue after the build
+# finishes.
+#
+# There's a delete-me file on the desktop that one should delete when
+# one is done with the worker.  RDP sessions are capped at 60 minutes as
+# of this writing.
+#
+#on_finish:
+#  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+
index 01039527c21e383c97c15c12571749dbdb8b7392..c6b20b84017d92b248b17793cab8b5ca087c2b45 100644 (file)
@@ -108,8 +108,12 @@ all:: asm-krb
 clean::
        -$(RM) $(ASMKRBDIR)\*.*
 
+!ifdef APPVEYOR
+test::
+!else
 test::
        $(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN) -validate_manifest
+!endif
 
 {$(BINDIR)}.dll{$(ASMKRBDIR)}.dll:
        $(CP) $< $@
@@ -132,8 +136,12 @@ $(APPMANIFEST): Heimdal.Application.manifest.in
                -e "s,[@]cpu[@],$(MCPU),g" \
                -e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@
 
+!ifdef APPVEYOR
+test::
+!else
 test::
        $(MT) -manifest $(APPMANIFEST) -validate_manifest
+!endif
 
 # ----------------------------------------------------------------------
 # Publisher configuration files