-
Notifications
You must be signed in to change notification settings - Fork 27
/
appveyor.yml
68 lines (64 loc) · 2.31 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: "{build}"
platform:
- x64
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) {
$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/nirum-lang/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-x64.exe
deploy:
provider: GitHub
on: { appveyor_repo_tag: true }
auth_token:
secure: 8Qon80pFZttL2HXHzjlZK93AGf1FvWhh2ZHgeSAzZWthjJfGT2usFgMfZ6MjxmsB
release: "$(appveyor_repo_tag_name)"
description: "$(appveyor_repo_tag_name)"
artifact: /.*\.exe/
prerelease: true