@@ -3,173 +3,5 @@ image: Visual Studio 2015
3
3
4
4
build : off
5
5
6
- environment :
7
- global :
8
- # Avoid long paths on Windows
9
- STACK_ROOT : " c:\\ s"
10
- STACK_WORK : " .w"
11
- WORK_DIR : " c:\\ w"
12
- # Override the temp directory to avoid sed escaping issues
13
- # See https://github.com/haskell/cabal/issues/5386
14
- TMP : " c:\\ tmp"
15
- CACHE_S3_VERSION : v0.1.4
16
- CACHE_S3_MAX_SIZE : 1600MB # AppVeyor limits the amount uploaded to approx 2GB
17
- AWS_REGION : us-west-1
18
- S3_BUCKET : appveyor-ci-cache
19
- AWS_ACCESS_KEY_ID :
20
- secure : sQWt5CpaN0H+jwUVoTsrET46pADUDEcrJ5D9MHmKX0M=
21
- AWS_SECRET_ACCESS_KEY :
22
- secure : m5sQYd16K8HA0zoZaD0gOl4EEWUso1D51L5rp+kT3hLaIE3tt4iT+b+iW8F4F0FU
23
-
24
- init :
25
- - ps : $env:CACHE_S3_READY = (("$env:CACHE_S3_VERSION" -ne "") -and ("$env:S3_BUCKET" -ne "") -and ("$env:AWS_ACCESS_KEY_ID" -ne "") -and ("$env:AWS_SECRET_ACCESS_KEY" -ne ""))
26
-
27
- before_test :
28
- # Avoid long paths not to each MAX_PATH of 260 chars
29
- - xcopy /q /s /e /r /k /i /v /h /y "%APPVEYOR_BUILD_FOLDER%" "%WORK_DIR%"
30
- - cd "%WORK_DIR%"
31
- # Restore cache
32
- - Echo %APPVEYOR_BUILD_VERSION% > build-id
33
- - ps : >-
34
- Write-Host "in pagefile script" ;
35
- $c = Get-WmiObject Win32_computersystem -EnableAllPrivileges ;
36
- if($c.AutomaticManagedPagefile){
37
- Write-Host "disabling managed page file settings"
38
- $c.AutomaticManagedPagefile = $false
39
- $c.Put() | Out-Null
40
- } ;
41
- $new_page_size=25000 ;
42
- $CurrentPageFile = Get-WmiObject -Class Win32_PageFileSetting ;
43
- if ($CurrentPageFile.InitialSize -ne $new_page_size) {
44
- Write-Host "setting new page file size to $new_page_size"
45
- $CurrentPageFile.InitialSize=$new_page_size
46
- $CurrentPageFile.MaximumSize=$new_page_size
47
- $CurrentPageFile.Put() | Out-Null
48
- } ;
49
- if ( $env:CACHE_S3_READY -eq $true ) {
50
- 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
51
- 7z x cache-s3.zip cache-s3.exe
52
- .\cache-s3 --max-size=$env:CACHE_S3_MAX_SIZE --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -v info -c restore stack --base-branch=develop
53
- .\cache-s3 --max-size=$env:CACHE_S3_MAX_SIZE --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -v info -c restore stack work --base-branch=develop
54
- }
55
-
56
- # Get custom GHC
57
- - ps : >-
58
- mkdir C:\ghc
59
-
60
- Invoke-WebRequest "https://s3.eu-central-1.amazonaws.com/ci-static/ghc-8.4.4-x86_64-unknown-mingw32-20181113-b907eb0f9b.tar.xz" -OutFile "C:\ghc\ghc.tar.xz" -UserAgent "Curl"
61
-
62
- 7z x C:\ghc\ghc.tar.xz -oC:\ghc
63
-
64
- 7z x C:\ghc\ghc.tar -oC:\ghc
65
-
66
- $env:PATH="$env:PATH;C:\ghc\ghc-8.4.4\bin"
67
-
68
- # Install OpenSSL 1.0.2 (see https://github.com/appveyor/ci/issues/1665)
69
- - ps : (New-Object Net.WebClient).DownloadFile('https://slproweb.com/download/Win64OpenSSL-1_0_2r.exe', "$($env:USERPROFILE)\Win64OpenSSL.exe")
70
- - ps : cmd /c start /wait "$($env:USERPROFILE)\Win64OpenSSL.exe" /silent /verysilent /sp- /suppressmsgboxes /DIR=C:\OpenSSL-Win64-v102
71
- - ps : Install-Product node 6
72
- # Install stack
73
- - ps : Start-FileDownload http://www.stackage.org/stack/windows-x86_64 -FileName stack.zip
74
- - 7z x stack.zip stack.exe
75
-
76
-
77
- # Install rocksdb
78
- - git clone https://github.com/facebook/rocksdb.git --branch v4.13.5
79
- - ps : Start-FileDownload 'https://s3.eu-central-1.amazonaws.com/ci-static/serokell-rocksdb-haskell-325427fc709183c8fdf777ad5ea09f8d92bf8585.zip' -FileName rocksdb.zip
80
- - 7z x rocksdb.zip
81
-
82
- # CSL-1509: After moving the 'cardano-sl' project itself into a separate folder ('lib/'), the 'cardano-text.exe' executable fails on AppVeyor CI.
83
- # 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.
84
- - copy rocksdb.dll node
85
- - copy rocksdb.dll lib
86
- - copy rocksdb.dll wallet
87
-
88
- # Install liblzma/xz
89
- - ps : Start-FileDownload https://tukaani.org/xz/xz-5.2.3-windows.zip -Filename xz-5.2.3-windows.zip
90
- - 7z -oC:\xz_extracted x xz-5.2.3-windows.zip
91
-
92
6
test_script :
93
- - cd "%WORK_DIR%"
94
- - stack config --system-ghc set system-ghc --global true
95
- - stack exec -- ghc-pkg recache
96
- - stack --verbosity warn setup --no-reinstall > nul
97
- # 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
98
- - scripts\ci\appveyor-retry call stack --verbosity warn install happy cpphs
99
- -j 2
100
- --no-terminal
101
- --local-bin-path %SYSTEMROOT%\system32
102
- --extra-include-dirs="C:\OpenSSL-Win64-v102\include"
103
- --extra-lib-dirs="C:\OpenSSL-Win64-v102"
104
- --extra-include-dirs="C:\xz_extracted\include"
105
- --extra-lib-dirs="C:\xz_extracted\bin_x86-64"
106
- --extra-include-dirs="%WORK_DIR%\rocksdb\include"
107
- --extra-lib-dirs="%WORK_DIR%"
108
- --ghc-options="-copy-libs-when-linking"
109
- # TODO: CSL-1133. To be reenabled.
110
- # - stack test --coverage
111
- # - 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
112
- # Retry transient failures due to https://github.com/haskell/cabal/issues/4005
113
- # We intentionally don't build auxx here, because this build is for installer.
114
- - scripts\ci\appveyor-retry call stack --dump-logs install cardano-sl cardano-sl-tools cardano-wallet
115
- -j 3
116
- --no-terminal
117
- --local-bin-path %WORK_DIR%
118
- --no-haddock-deps
119
- --flag cardano-sl-core:-asserts
120
- --flag cardano-sl-tools:for-installer
121
- --extra-include-dirs="C:\OpenSSL-Win64-v102\include"
122
- --extra-lib-dirs="C:\OpenSSL-Win64-v102"
123
- --extra-include-dirs="C:\xz_extracted\include"
124
- --extra-lib-dirs="C:\xz_extracted\bin_x86-64"
125
- --extra-include-dirs="%WORK_DIR%\rocksdb\include"
126
- --extra-lib-dirs="%WORK_DIR%"
127
- --ghc-options="-copy-libs-when-linking"
128
- # Cardano pieces, modulo the frontend
129
- - mkdir daedalus
130
- # log config is called `log-config-prod.yaml` just in case, it's the old name
131
- - copy log-configs\daedalus.yaml daedalus\log-config-prod.yaml
132
- - copy lib\configuration.yaml daedalus\
133
- - copy lib\*genesis*.json daedalus\
134
- - copy cardano-launcher.exe daedalus\
135
- - copy cardano-node.exe daedalus\
136
- - copy cardano-x509-certificates.exe daedalus\
137
- - copy wallet-extractor.exe daedalus\
138
- - cd daedalus
139
- - Echo %APPVEYOR_BUILD_VERSION% > build-id
140
- - Echo %APPVEYOR_REPO_COMMIT% > commit-id
141
- - Echo https://ci.appveyor.com/project/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/build/%APPVEYOR_BUILD_VERSION% > ci-url
142
-
143
- after_test :
144
- - xcopy /q /s /e /r /k /i /v /h /y "%WORK_DIR%\daedalus" "%APPVEYOR_BUILD_FOLDER%\daedalus"
145
- - cd "%WORK_DIR%/daedalus"
146
- - 7z a "%APPVEYOR_REPO_COMMIT%.zip" *
147
- - appveyor PushArtifact "%APPVEYOR_REPO_COMMIT%.zip"
148
- - cd "%WORK_DIR%" # Get back to where cache-s3.exe is located
149
- - ps : >-
150
- if ( ($env:CACHE_S3_READY -eq $true) -and (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) ) {
151
- if ($env:APPVEYOR_REPO_BRANCH -eq "master" -Or $env:APPVEYOR_REPO_BRANCH -eq "develop" -Or $env:APPVEYOR_REPO_BRANCH -like "release*") {
152
- Write-Host "saving stack"
153
- .\cache-s3 --max-size=$env:CACHE_S3_MAX_SIZE --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -c -v info save stack
154
- Write-Host "done stack"
155
- }
156
- Write-Host "saving stack work"
157
- .\cache-s3 --max-size=$env:CACHE_S3_MAX_SIZE --prefix=$env:APPVEYOR_PROJECT_NAME --git-branch=$env:APPVEYOR_REPO_BRANCH --suffix=windows -c -v info save stack work
158
- Write-Host "done stack work"
159
- }
160
- artifacts :
161
- - path : daedalus/
162
- name : CardanoSL
163
- type : zip
164
-
165
- deploy :
166
- provider : S3
167
- access_key_id :
168
- secure : IEky6PsMzHaKHNBMxR8tQaQI8X7qWRB9+HuEroTVRBk=
169
- secret_access_key :
170
- secure : cqjzG96hWB1x3JDbVSbF9E+aJ5jKvIGacJRUDWATHaTOYfSt6Rvive/NrF4lKBIm
171
- bucket : appveyor-ci-deploy
172
- region : ap-northeast-1
173
- set_public : true
174
- folder : cardano-sl
175
- artifact : $(APPVEYOR_REPO_COMMIT).zip
7
+ - ps : echo "No Longer Used, windows binaries cross compiled in hydra"
0 commit comments