@@ -9,13 +9,15 @@ environment:
9 TMP: "c:\\tmp"
9 TMP: "c:\\tmp"
10 # see #4201, https://github.com/haskell-tools/haskell-tools/issues/277
10 # see #4201, https://github.com/haskell-tools/haskell-tools/issues/277
12+ - BUILD_TYPE: "stack"
12− - STACK_VERSION: "windows-x86_64"
13+ OSARCH: "windows-x86_64"
13 STACK_ROOT: "c:\\sr64"
14 STACK_ROOT: "c:\\sr64"
14 STACK_YAML: "stack.yaml"
15 STACK_YAML: "stack.yaml"
15 STACK_FLAGS: "--arch=x86_64"
16 STACK_FLAGS: "--arch=x86_64"
16 ARCH: "x64"
17 ARCH: "x64"
17 CHOCO_OPTS: ""
18 CHOCO_OPTS: ""
19+ - BUILD_TYPE: "stack"
18− - STACK_VERSION: "windows-i386"
20+ OSARCH: "windows-i386"
19 STACK_ROOT: "c:\\sr32"
21 STACK_ROOT: "c:\\sr32"
20 STACK_YAML: "stack.lts11.yaml"
22 STACK_YAML: "stack.lts11.yaml"
21 STACK_FLAGS: "--arch=i386 --flag=hslua:lua_32bits"
23 STACK_FLAGS: "--arch=i386 --flag=hslua:lua_32bits"
@@ -24,6 +26,12 @@ environment:
24 # note: we do a lts11 build because of
26 # note: we do a lts11 build because of
25 # https://github.com/commercialhaskell/stackage/issues/3385
27 # https://github.com/commercialhaskell/stackage/issues/3385
26 # with luck this will be fixed in ghc 8.6.
28 # with luck this will be fixed in ghc 8.6.
29+ - BUILD_TYPE: "cabal"
30+ OSARCH: "windows-i386-cabal"
31+ GHC_VERSION: "8.6.1.1"
32+ CABAL_BUILD_OPTS: "--allow-newer=base --allow-newer=template-haskell --allow-newer=containers -flua_32bits -fembed_data_files"
28skip_commits:
36skip_commits:
@@ -52,7 +60,12 @@ build: off
54 - choco install wixtoolset %CHOCO_OPTS%
62 - choco install wixtoolset %CHOCO_OPTS%
63+ - if test "BUILD_TYPE" = stack
55− - choco install haskell-stack %CHOCO_OPTS%
65+ choco install haskell-stack %CHOCO_OPTS%
67+ choco install ghc --version %GHC_VERSION% %CHOCO_OPTS%
57# before_test:
70# before_test:
@@ -60,10 +73,19 @@ test_script:
60 # The ugly echo "" hack is to avoid complaints about 0 being an invalid file
73 # The ugly echo "" hack is to avoid complaints about 0 being an invalid file
61 # descriptor
74 # descriptor
76+ if test "$BUILD_TYPE" = stack
63− stack --version
78+ stack --version
64− stack path
79+ stack path
65− echo "" | stack clean
80+ echo "" | stack clean
66− echo "" | stack install --stack-yaml %STACK_YAML% %STACK_BUILD_OPTS% %STACK_FLAGS% pandoc pandoc-citeproc
81+ echo "" | stack install --stack-yaml %STACK_YAML% %STACK_BUILD_OPTS% %STACK_FLAGS% pandoc pandoc-citeproc
85+ cabal new-build %CABAL_BUILD_OPTS% . pandoc-citeproc
86+ cp "`find dist-newstyle/ -type f -name pandoc`" .\windows\
87+ cp "`find dist-newstyle/ -type f -name pandoc-citeproc`" .\windows\
68after_test:
90after_test:
69 # .\ in the stack commandline seems to be .\windows\ (where the stack-appveyor.yaml is)
91 # .\ in the stack commandline seems to be .\windows\ (where the stack-appveyor.yaml is)
@@ -71,16 +93,16 @@ after_test:
71 - .\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
93 - .\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
72 - .\pandoc.exe -s ..\COPYING.md -o COPYING.rtf
94 - .\pandoc.exe -s ..\COPYING.md -o COPYING.rtf
73 - copy ..\COPYRIGHT COPYRIGHT.txt
95 - copy ..\COPYRIGHT COPYRIGHT.txt
74− - 7z a "pandoc-%STACK_VERSION%.zip" pandoc.exe pandoc-citeproc.exe MANUAL.html COPYING.rtf
96+ - 7z a "pandoc-%OSARCH%.zip" pandoc.exe pandoc-citeproc.exe MANUAL.html COPYING.rtf
76 set VERSION=
98 set VERSION=
77 for /f "tokens=1-2 delims= " %%a in ('.\pandoc.exe --version') do ( if not defined VERSION set "VERSION=%%b" )
99 for /f "tokens=1-2 delims= " %%a in ('.\pandoc.exe --version') do ( if not defined VERSION set "VERSION=%%b" )
78 echo %VERSION%
100 echo %VERSION%
79 "%WIXBIN%"\candle -arch %ARCH% -dVERSION=%VERSION% -dBINPATH=. *.wxs -out wixobj\
101 "%WIXBIN%"\candle -arch %ARCH% -dVERSION=%VERSION% -dBINPATH=. *.wxs -out wixobj\
80− "%WIXBIN%"\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out "pandoc-%STACK_VERSION%.msi" wixobj\*.wixobj
102+ "%WIXBIN%"\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out "pandoc-%OSARCH%.msi" wixobj\*.wixobj
82artifacts:
104artifacts:
83− - path: 'windows\pandoc-%STACK_VERSION%.zip'
105+ - path: 'windows\pandoc-%OSARCH%.zip'
84 name: exe
106 name: exe
85− - path: 'windows\pandoc-%STACK_VERSION%.msi'
107+ - path: 'windows\pandoc-%OSARCH%.msi'
86 name: msi
108 name: msi