Permalink
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (71 sloc) 2.54 KB
version: "{build}"
platform:
- x64
- x86
environment:
STACK_ROOT: C:\sr
TOX: C:\Python36\Scripts\tox.exe
cache:
- '%STACK_ROOT% -> appveyor.yml'
- '%LOCALAPPDATA%\Programs\stack -> appveyor.yml'
install:
# Debug prints
- dir C:\
- set
- ps: Invoke-WebRequest -OutFile C:\upx394w.zip https://github.com/upx/upx/releases/download/v3.94/upx394w.zip
- 7z x -oC:\ C:\upx394w.zip
- ps: set LANG=en_US
- ps: ls C:\
- ps: ls C:\upx394w
- ps: $env:PATH = 'C:\upx394w;' + $env:PATH;
- ps: >
if((Test-Path $env:STACK_ROOT) -ne $true) {
if($env:PLATFORM -eq 'x86') {
$stackUrl = 'https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-windows-i386.zip';
}
elseif($env:PLATFORM -eq 'x64') {
$stackUrl = 'https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-windows-x86_64.zip';
}
Invoke-WebRequest -OutFile C:\stack.zip $stackUrl;
Add-Type -AssemblyName System.IO.Compression.FileSystem;
[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\stack.zip', $env:STACK_ROOT);
ls $env:STACK_ROOT;
}
$env:PATH = $env:STACK_ROOT + ';C:\msys64\usr\bin;' + $env:PATH;
- if not exist "%LOCALAPPDATA%\Programs\stack" ( stack --no-terminal --skip-msys setup )
# https://github.com/spoqa/nirum/issues/226
# https://github.com/tox-dev/tox/issues/114#issuecomment-349712050
# https://tox.readthedocs.io/en/2.9.1/developers.html#id1
- ps: |
if($env:PLATFORM -eq 'x64') {
Copy-Item C:\Python27-x64\python.exe -Destination C:\Python27-x64\python2.7.exe
$env:PATH = 'C:\Python27-x64;' + $env:PATH;
}
# Debug prints
- dir C:\
- set
- C:\Python36\python -m pip install --upgrade tox pip setuptools
- stack --no-terminal install -j4 happy # haskell-src-exts requires happy
- stack --no-terminal install -j4 --only-dependencies
build_script:
- stack --no-terminal build -j4 --copy-bins --flag nirum:static
after_build:
- stack --skip-msys --no-terminal path --local-bin
- ps: ls $(stack path --skip-msys --no-terminal --local-bin)
- ps: 'copy "$(stack --skip-msys --no-terminal path --local-bin)\nirum.exe" nirum-win-${env:PLATFORM}.exe'
- ps: ls
- ps: upx.exe -9 nirum-win-${env:PLATFORM}.exe
test_script:
- stack --no-terminal test --jobs 1
artifacts:
- path: nirum-win-x86.exe
- path: nirum-win-x64.exe
deploy:
provider: GitHub
on: { appveyor_repo_tag: true }
auth_token:
secure: FsK3lwqFkPdtwzbjZ8a4gLn1GOT74D9TqBvKveEwFB7hL6pEp/d7cNUTpy91JGGt
release: "$(appveyor_repo_tag_name)"
description: "$(appveyor_repo_tag_name)"
artifact: /.*\.exe/
prerelease: true