2018-03-12 18:26:26 +01:00
|
|
|
image: Visual Studio 2013
|
2017-05-19 10:29:50 +02:00
|
|
|
clone_folder: "c:\\pandoc"
|
2016-05-10 23:44:05 +02:00
|
|
|
environment:
|
2017-05-19 15:12:56 +02:00
|
|
|
global:
|
|
|
|
WIXBIN: "c:\\Program Files (x86)\\WiX Toolset v3.11\\bin"
|
2018-09-26 18:04:51 +02:00
|
|
|
CABAL_STORE: "C:\\cs"
|
|
|
|
CABAL_PACKAGE_DB: "%CABAL_STORE%\\ghc-%GHC_MINOR_VERSION%\\package.db"
|
2018-09-07 08:10:45 +02:00
|
|
|
# Override the temp directory to avoid sed escaping issues
|
|
|
|
# See https://github.com/haskell/cabal/issues/5386
|
|
|
|
TMP: "c:\\tmp"
|
2018-01-20 19:37:16 +01:00
|
|
|
# see #4201, https://github.com/haskell-tools/haskell-tools/issues/277
|
2017-05-24 22:54:11 +02:00
|
|
|
matrix:
|
2018-09-27 02:43:18 +02:00
|
|
|
- OSARCH: "windows-x86_64"
|
2018-09-26 08:14:23 +02:00
|
|
|
GHC_VERSION: "8.6.1.1"
|
2018-09-26 08:24:05 +02:00
|
|
|
GHC_MINOR_VERSION: "8.6.1"
|
|
|
|
GHC: "C:\\ProgramData\\chocolatey\\lib\\ghc\\tools\\ghc-%GHC_MINOR_VERSION%\\bin\\ghc.exe"
|
2018-09-26 08:14:23 +02:00
|
|
|
CABAL_VERSION: "2.4.0.0"
|
2018-09-27 07:19:36 +02:00
|
|
|
CABAL_OPTS: "-fembed_data_files -fbibutils"
|
2018-09-26 08:24:05 +02:00
|
|
|
GHC_OPTS: "-fhide-source-paths"
|
2018-09-26 08:14:23 +02:00
|
|
|
ARCH: "x64"
|
|
|
|
CHOCO_OPTS: ""
|
2018-09-27 02:43:18 +02:00
|
|
|
- OSARCH: "windows-i386"
|
2018-09-24 20:52:07 +02:00
|
|
|
GHC_VERSION: "8.6.1.1"
|
2018-09-26 08:24:05 +02:00
|
|
|
GHC_MINOR_VERSION: "8.6.1"
|
|
|
|
GHC: "C:\\ProgramData\\chocolatey\\lib\\ghc\\tools\\ghc-%GHC_MINOR_VERSION%\\bin\\ghc.exe"
|
2018-09-25 18:08:38 +02:00
|
|
|
CABAL_VERSION: "2.4.0.0"
|
2018-09-27 07:19:36 +02:00
|
|
|
CABAL_OPTS: "-flua_32bits -fembed_data_files -fbibutils"
|
2018-09-26 08:24:05 +02:00
|
|
|
GHC_OPTS: "-fhide-source-paths"
|
2018-09-24 20:52:07 +02:00
|
|
|
ARCH: "x86"
|
|
|
|
CHOCO_OPTS: "--x86"
|
2017-05-24 22:54:11 +02:00
|
|
|
|
2017-10-12 20:28:32 +02:00
|
|
|
skip_commits:
|
|
|
|
files:
|
|
|
|
- '*.md'
|
|
|
|
- '*.txt'
|
|
|
|
- '.travis.yml'
|
|
|
|
- 'Makefile'
|
|
|
|
- 'man/pandoc.1'
|
|
|
|
- 'linux/*'
|
|
|
|
- 'macos/*'
|
|
|
|
|
2017-05-24 22:54:11 +02:00
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
2017-05-24 11:41:05 +02:00
|
|
|
|
2016-05-10 23:44:05 +02:00
|
|
|
cache:
|
2018-09-27 03:17:32 +02:00
|
|
|
- '%CABAL_STORE%'
|
2016-05-12 20:48:40 +02:00
|
|
|
|
2017-05-19 16:22:45 +02:00
|
|
|
# Note: to reset build cache, do the following in JavaScript
|
|
|
|
# console on appveyor:
|
2018-01-21 17:20:08 +01:00
|
|
|
# $.ajax({ url: 'https://ci.appveyor.com/api/projects/jgm/pandoc/buildcache', type: 'DELETE'})
|
2018-09-27 02:43:18 +02:00
|
|
|
|
|
|
|
# We don't do a normal C build, but build in test_script
|
2016-06-03 21:37:54 +02:00
|
|
|
build: off
|
2015-04-27 02:57:24 +02:00
|
|
|
|
2016-05-10 23:44:05 +02:00
|
|
|
install:
|
2018-09-25 18:40:13 +02:00
|
|
|
- choco install wixtoolset --version 3.11.1 %CHOCO_OPTS%
|
2018-09-27 02:43:18 +02:00
|
|
|
- choco install ghc --version %GHC_VERSION% --ignore-dependencies %CHOCO_OPTS%
|
|
|
|
- choco install cabal --version %CABAL_VERSION% --ignore-dependencies %CHOCO_OPTS%
|
2016-05-10 23:44:05 +02:00
|
|
|
|
2017-05-19 10:25:14 +02:00
|
|
|
# before_test:
|
2015-04-26 20:37:37 +02:00
|
|
|
|
|
|
|
test_script:
|
2018-09-25 23:08:26 +02:00
|
|
|
# Note: we manually create cabal store, because of a cabal bug:
|
2018-09-25 22:43:27 +02:00
|
|
|
# see https://github.com/haskell/cabal/issues/5516
|
2018-09-27 02:43:18 +02:00
|
|
|
- if not exist "%CABAL_PACKAGE_DB%" ( mkdir "%CABAL_PACKAGE_DB%" )
|
2018-09-27 08:39:18 +02:00
|
|
|
- cabal --store-dir="%CABAL_STORE%" --version
|
|
|
|
- cabal --store-dir="%CABAL_STORE%" new-update
|
|
|
|
- cabal --store-dir="%CABAL_STORE%" new-configure -w %GHC% --enable-tests %CABAL_OPTS% --ghc-options="%GHC_OPTS%" . pandoc-citeproc
|
|
|
|
- cabal --store-dir="%CABAL_STORE%" new-build . pandoc-citeproc
|
|
|
|
- cabal --store-dir="%CABAL_STORE%" new-test . pandoc-citeproc
|
2018-09-27 02:43:18 +02:00
|
|
|
- forfiles /P .\dist-newstyle /M pandoc*.exe /S /C "cmd /C copy @path C:\pandoc\windows"
|
2016-05-10 11:28:33 +02:00
|
|
|
|
|
|
|
after_test:
|
2018-09-27 02:43:18 +02:00
|
|
|
# create msi and zip artifacts
|
2016-06-03 01:55:46 +02:00
|
|
|
- cd windows
|
2017-01-30 11:49:25 +01:00
|
|
|
- .\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
|
|
|
|
- .\pandoc.exe -s ..\COPYING.md -o COPYING.rtf
|
2016-06-03 06:12:55 +02:00
|
|
|
- copy ..\COPYRIGHT COPYRIGHT.txt
|
2018-09-24 20:52:07 +02:00
|
|
|
- 7z a "pandoc-%OSARCH%.zip" pandoc.exe pandoc-citeproc.exe MANUAL.html COPYING.rtf
|
2016-06-03 19:30:06 +02:00
|
|
|
- |
|
2016-06-03 19:49:30 +02:00
|
|
|
set VERSION=
|
2016-06-03 20:31:09 +02:00
|
|
|
for /f "tokens=1-2 delims= " %%a in ('.\pandoc.exe --version') do ( if not defined VERSION set "VERSION=%%b" )
|
2016-06-03 19:49:30 +02:00
|
|
|
echo %VERSION%
|
2018-09-07 08:10:45 +02:00
|
|
|
"%WIXBIN%"\candle -arch %ARCH% -dVERSION=%VERSION% -dBINPATH=. *.wxs -out wixobj\
|
2018-09-24 20:52:07 +02:00
|
|
|
"%WIXBIN%"\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out "pandoc-%OSARCH%.msi" wixobj\*.wixobj
|
2016-05-10 11:28:33 +02:00
|
|
|
|
2018-09-26 07:06:52 +02:00
|
|
|
# for debugging
|
|
|
|
# on_finish:
|
|
|
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
2018-09-26 06:11:33 +02:00
|
|
|
|
2016-05-10 11:28:33 +02:00
|
|
|
artifacts:
|
2018-09-24 20:52:07 +02:00
|
|
|
- path: 'windows\pandoc-%OSARCH%.zip'
|
2016-05-10 11:28:33 +02:00
|
|
|
name: exe
|
2018-09-24 20:52:07 +02:00
|
|
|
- path: 'windows\pandoc-%OSARCH%.msi'
|
2016-06-03 01:55:46 +02:00
|
|
|
name: msi
|