forked from input-output-hk/cardano-sl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
132 lines (119 loc) · 5.97 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: 1.0.{build}
image: Visual Studio 2015
build: off
environment:
global:
# Avoid long paths on Windows
STACK_ROOT: "c:\\s"
STACK_WORK: ".w"
WORK_DIR: "c:\\w"
CACHE_S3_VERSION: v0.1.1
AWS_REGION: us-west-1
S3_BUCKET: appveyor-ci-cache
AWS_ACCESS_KEY_ID:
secure: 0OtMCUmJ4V7fNRPvKjzYxSO19I200rPG8WRW/qn1QPk=
AWS_SECRET_ACCESS_KEY:
secure: EmPAMpga8gjXxPMfJSsdq2sof8SLwyga1rrYuZDlPoriMS1iEFLvCNLA70JqHSna
init:
- ps: $env:CACHE_S3_READY = (("$env:CACHE_S3_VERSION" -ne "") -and ("$env:S3_BUCKET" -ne ""))
before_test:
# Avoid long paths not to each MAX_PATH of 260 chars
- xcopy /q /s /e /r /k /i /v /h /y "%APPVEYOR_BUILD_FOLDER%" "%WORK_DIR%"
- cd "%WORK_DIR%"
# Restore cache
- Echo %APPVEYOR_BUILD_VERSION% > build-id
- ps: >-
if ( $env:CACHE_S3_READY -eq $true ) {
Start-FileDownload https://github.com/fpco/cache-s3/releases/download/$env:CACHE_S3_VERSION/cache-s3-$env:CACHE_S3_VERSION-windows-x86_64.zip -FileName cache-s3.zip
7z x cache-s3.zip cache-s3.exe
.\cache-s3 --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -v info -c restore stack --base-branch=master
.\cache-s3 --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -v info -c restore stack work --base-branch=master
}
# Install OpenSSL 1.0.2 (see https://github.com/appveyor/ci/issues/1665)
- ps: (New-Object Net.WebClient).DownloadFile('https://slproweb.com/download/Win64OpenSSL-1_0_2n.exe', "$($env:USERPROFILE)\Win64OpenSSL.exe")
- ps: cmd /c start /wait "$($env:USERPROFILE)\Win64OpenSSL.exe" /silent /verysilent /sp- /suppressmsgboxes /DIR=C:\OpenSSL-Win64-v102
- ps: Install-Product node 6
# Install stack
- ps: Start-FileDownload http://www.stackage.org/stack/windows-x86_64 -FileName stack.zip
- 7z x stack.zip stack.exe
# Install rocksdb
- git clone https://github.com/facebook/rocksdb.git --branch v4.13.5
- ps: Start-FileDownload 'https://ci.appveyor.com/api/buildjobs/kbpteb8j55p6sa2m/artifacts/rocksdb%2Fbuild%2FRocksdb.zip' -FileName rocksdb.zip
- 7z x rocksdb.zip
# CSL-1509: After moving the 'cardano-sl' project itself into a separate folder ('lib/'), the 'cardano-text.exe' executable fails on AppVeyor CI.
# After some investigation, it was discovered that this was because 'rocksdb.dll' has to be located in this folder as well, or else the test executable doesn't work.
- copy rocksdb.dll lib
- copy rocksdb.dll wallet
# Install liblzma/xz
- ps: Start-FileDownload https://tukaani.org/xz/xz-5.2.3-windows.zip -Filename xz-5.2.3-windows.zip
- 7z -oC:\xz_extracted x xz-5.2.3-windows.zip
test_script:
- cd "%WORK_DIR%"
- stack --verbosity warn setup --no-reinstall > nul
# Install happy separately: https://github.com/commercialhaskell/stack/issues/3151#issuecomment-310642487. Also install cpphs because it's a build-tool and Stack can't figure out by itself that it should be installed
- scripts\ci\appveyor-retry call stack --verbosity warn install happy cpphs
-j 2
--no-terminal
--local-bin-path %SYSTEMROOT%\system32
--extra-include-dirs="C:\OpenSSL-Win64-v102\include"
--extra-lib-dirs="C:\OpenSSL-Win64-v102"
--extra-include-dirs="C:\xz_extracted\include"
--extra-lib-dirs="C:\xz_extracted\bin_x86-64"
--extra-include-dirs="%WORK_DIR%\rocksdb\include"
--extra-lib-dirs="%WORK_DIR%"
# TODO: CSL-1133. To be reenabled.
# - stack test --coverage
# - stack hpc report cardano-sl cardano-sl-txp cardano-sl-core cardano-sl-db cardano-sl-update cardano-sl-infra cardano-sl-lrc cardano-sl-ssc
# Retry transient failures due to https://github.com/haskell/cabal/issues/4005
# We intentionally don't build auxx here, because this build is for installer.
- scripts\ci\appveyor-retry call stack install cardano-sl cardano-sl-tools cardano-sl-wallet cardano-sl-wallet-new
-j 2
--no-terminal
--local-bin-path %WORK_DIR%
--test
--no-haddock-deps
--flag cardano-sl-core:-asserts
--flag cardano-sl-tools:for-installer
--flag cardano-sl-wallet:for-installer
--extra-include-dirs="C:\OpenSSL-Win64-v102\include"
--extra-lib-dirs="C:\OpenSSL-Win64-v102"
--extra-include-dirs="C:\xz_extracted\include"
--extra-lib-dirs="C:\xz_extracted\bin_x86-64"
--extra-include-dirs="%WORK_DIR%\rocksdb\include"
--extra-lib-dirs="%WORK_DIR%"
- stack exec -- cardano-wallet-hs2purs
# Prepare files for frontend build
- copy log-config-prod.yaml daedalus\
- copy lib\configuration.yaml daedalus\
- copy lib\*genesis*.json daedalus\
- copy cardano-launcher.exe daedalus\
- copy cardano-node.exe daedalus\
# Build the bridge
- cd daedalus
- Echo %APPVEYOR_BUILD_VERSION% > build-id
- Echo %APPVEYOR_REPO_COMMIT% > commit-id
- Echo https://ci.appveyor.com/project/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/build/%APPVEYOR_BUILD_VERSION% > ci-url
- ps: Install-Product node 7
- ..\scripts\ci\appveyor-retry call npm install
- npm run build:prod
after_test:
- cd "%WORK_DIR%" # Get back to where cache-s3.exe is located
- ps: >-
if ( ($env:CACHE_S3_READY -eq $true) -and (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) ) {
if ($env:APPVEYOR_REPO_BRANCH -eq "master" -Or $env:APPVEYOR_REPO_BRANCH -eq "develop" -Or $env:APPVEYOR_REPO_BRANCH -like "release*") {
.\cache-s3 --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -c -v info save stack
}
.\cache-s3 --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -c -v info save stack work
}
- xcopy /q /s /e /r /k /i /v /h /y "%WORK_DIR%\daedalus" "%APPVEYOR_BUILD_FOLDER%\daedalus"
artifacts:
- path: daedalus/
name: CardanoSL
type: zip
notifications:
- provider: Slack
incoming_webhook:
secure: 3KXYR8gCzuhyML2adCU1HayVFPi5TfDUhiQcffkf8QNcwqmZRL+IY/idxf951NNYJ8+GJQDhek7LWLhKrr4d08J9erBw8GePrCwTaBfwQkQ=
on_build_success: false
on_build_failure: false
on_build_status_changed: true