Test with both 32-bits and 64-bits on AppVeyor
build: off
+clone_folder: "c:\\hslua"
+
+environment:
+ matrix:
+ - STACK_VERSION: "windows-i386"
+ STACK_ROOT: "c:\\sr32"
+ STACK: "%STACK_ROOT%\\stack.exe"
+ STACK_FLAGS: "--flag hslua:lua_32bits"
+ - STACK_VERSION: "windows-x86_64"
+ STACK_ROOT: "c:\\sr64"
+ STACK: "%STACK_ROOT%\\stack.exe"
+ STACK_FLAGS: ""
+
+matrix:
+ fast_finish: true
+
+cache:
+ - "%STACK_ROOT%"
before_test:
# http://help.appveyor.com/discussions/problems/6312-curl-command-not-found
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
-- curl -sS -ostack.zip -L --insecure http://www.stackage.org/stack/windows-x86_64
-- 7z x stack.zip stack.exe
-
-clone_folder: "c:\\hslua"
-environment:
- global:
- STACK_ROOT: "c:\\sr"
+ - |
+ %STACK% --version || curl -sS -ostack.zip -L --insecure http://www.stackage.org/stack/%STACK_VERSION% && 7z e stack.zip -o"%STACK_ROOT%" stack.exe
test_script:
-- stack setup > nul
# The ugly echo "" hack is to avoid complaints about 0 being an invalid file
# descriptor
-- echo "" | stack --no-terminal test
+ - '%STACK% setup > nul'
+ - '%STACK% path'
+ - 'echo "" | %STACK% clean'
+ - 'echo "" | %STACK% --no-terminal test %STACK_FLAGS%'
