-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathappveyor.yml
56 lines (50 loc) · 1.99 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
build: off
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 https://www.stackage.org/stack/windows-x86_64 # http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\stack"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup > nul
# The ugly echo "" hack is to avoid complaints about 0 being an invalid file
# descriptor
- echo "" | stack --arch x86_64 --no-terminal build --bench --no-run-benchmarks --test
- for /f %%i in ('stack path --local-install-root') do set DIR=%%i
# set a batch variable with the output of stack path --local-install-root command
- set BINDIR=%DIR%\bin
- set PROG=fbpmn.exe
- ps: if ($env:APPVEYOR_REPO_BRANCH -eq "develop") { $env:VERSION=(& "$env:BINDIR\$env:PROG" version)+"-SNAPSHOT" } else { $env:VERSION=(& "$env:BINDIR\$env:PROG" version)}
# use powershell to avoid the precedent method to set a batch variable with the output of command
- set OS=windows
- set ARCH=x86_64
- set ARCHIVE=fbpmn-%VERSION%-%OS%.%ARCH%
- ps: Get-ChildItem "$env:BINDIR\$env:PROG" | Compress-Archive -DestinationPath "$env:ARCHIVE.zip"
- ps: Push-AppveyorArtifact "$env:ARCHIVE.zip"
- set APPVEYOR_TAG=v%VERSION%
- ps: if ($env:APPVEYOR_REPO_BRANCH -eq "develop") { git tag $env:APPVEYOR_TAG ; echo tag $env:APPVEYOR_TAG ; } else { echo no tag }
deploy:
- provider: GitHub
release: $(APPVEYOR_TAG)
auth_token:
secure: lMm8EA0SMSypJ94MTQavnZjYFO5UpAn6TxuSpXk6iLjEYjkl2DpD3UOXGUZXgVbr
artifact: $(ARCHIVE).zip
draft: false
prerelease: false
on:
# branch: master
all_branches: ""
APPVEYOR_REPO_TAG: true
- provider: GitHub
release: $(APPVEYOR_TAG)
auth_token:
secure: lMm8EA0SMSypJ94MTQavnZjYFO5UpAn6TxuSpXk6iLjEYjkl2DpD3UOXGUZXgVbr
artifact: $(ARCHIVE).zip
draft: true
prerelease: false
on:
branch: develop
APPVEYOR_REPO_TAG: false