Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 33183b0

Browse files
committed
rewrite nix/CI scripts to drop stack2nix
1 parent 5284356 commit 33183b0

File tree

142 files changed

+2776
-7588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+2776
-7588
lines changed

.buildkite/pipeline.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
steps:
2-
- label: 'stack2nix'
3-
command: 'scripts/check-stack2nix.sh'
2+
- label: Check Hydra evaluation of release.nix
3+
command: 'nix-build -A check-hydra lib.nix -o check-hydra.sh && ./check-hydra.sh'
44
agents:
55
system: x86_64-linux
66

7-
- label: 'release.nix'
8-
command: 'scripts/ci/check-hydra.sh'
7+
- label: Check auto-generated Nix
8+
command: 'nix-build -A check-nix-tools lib.nix -o check-nix-tools.sh && ./check-nix-tools.sh'
99
agents:
1010
system: x86_64-linux
1111

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,4 @@ nix/.stack.nix/*.nix linguist-generated=true
243243
.stack-to-nix.cache linguist-generated=true
244244
nix/.stack-pkgs.nix linguist-generated=true
245245
script-runner/states
246+
test-state

.stack-to-nix.cache

-33
This file was deleted.

appveyor.yml

+1-169
Original file line numberDiff line numberDiff line change
@@ -3,173 +3,5 @@ image: Visual Studio 2015
33

44
build: off
55

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-
926
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"

cabal.project.freeze

+15-15
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ constraints: Cabal ==2.2.0.1,
2121
auto-update ==0.1.4,
2222
base16-bytestring ==0.1.1.6,
2323
base58-bytestring ==0.1.0,
24-
base64-bytestring ==1.0.0.1,
24+
base64-bytestring ==1.0.0.2,
2525
basement ==0.0.8,
2626
beam-core ==0.7.2.2,
2727
beam-migrate ==0.3.2.1,
@@ -48,14 +48,14 @@ constraints: Cabal ==2.2.0.1,
4848
dns ==3.0.4,
4949
docopt ==0.7.0.5,
5050
ekg ==0.4.0.15,
51-
ekg-core ==0.1.1.4,
51+
ekg-core ==0.1.1.6,
5252
ekg-statsd ==0.2.4.0,
5353
ekg-wai ==0.1.0.3,
5454
engine-io ==1.2.21,
5555
engine-io-wai ==1.0.9,
5656
ether ==0.5.1.0,
5757
exceptions ==0.10.0,
58-
extra ==1.6.13,
58+
extra ==1.6.14,
5959
fgl ==5.6.0.0,
6060
file-embed ==0.0.10.1,
6161
filelock ==0.1.1.2,
@@ -76,14 +76,14 @@ constraints: Cabal ==2.2.0.1,
7676
hspec-core ==2.5.5,
7777
hspec-expectations-lifted ==0.10.0,
7878
http-api-data ==0.3.8.1,
79-
http-client ==0.5.13.1,
79+
http-client ==0.5.14,
8080
http-client-tls ==0.3.5.3,
8181
http-conduit ==2.3.2,
8282
http-media ==0.7.1.3,
8383
http-types ==0.12.2,
8484
insert-ordered-containers ==0.2.1.0,
8585
ip ==1.3.0,
86-
iproute ==1.7.6,
86+
iproute ==1.7.7,
8787
ixset-typed ==0.4.0.1,
8888
kademlia ==1.1.0.1,
8989
katip ==0.6.3.0,
@@ -93,23 +93,23 @@ constraints: Cabal ==2.2.0.1,
9393
lifted-base ==0.2.3.12,
9494
loc ==0.1.3.3,
9595
log-warper ==1.8.10.1,
96-
lrucache ==1.2.0.0,
96+
lrucache ==1.2.0.1,
9797
lzma-conduit ==1.2.1,
98-
megaparsec ==6.5.0,
98+
megaparsec ==7.0.4,
9999
memory ==0.14.18,
100100
mmorph ==1.1.2,
101101
monad-control ==1.0.2.3,
102-
mono-traversable ==1.0.9.0,
102+
mono-traversable ==1.0.10.0,
103103
mwc-random ==0.13.6.0,
104-
neat-interpolation ==0.3.2.2,
104+
neat-interpolation ==0.3.2.4,
105105
network ==2.6.3.6,
106106
network-info ==0.2.0.10,
107107
network-transport ==0.5.2,
108108
network-transport-inmemory ==0.5.1,
109109
network-transport-tcp ==0.6.0,
110110
normaldistribution ==1.1.0.3,
111111
optparse-applicative ==0.14.3.0,
112-
optparse-simple ==0.1.0,
112+
optparse-simple ==0.1.1,
113113
parser-combinators ==1.0.0,
114114
parsers ==0.12.9,
115115
pipes ==4.3.9,
@@ -128,7 +128,7 @@ constraints: Cabal ==2.2.0.1,
128128
rocksdb-haskell-ng ==0.0.0,
129129
safe ==0.3.17,
130130
safe-exceptions ==0.1.7.0,
131-
safecopy ==0.9.4.1,
131+
safecopy ==0.9.4.3,
132132
scientific ==0.3.6.2,
133133
scrypt ==0.5.0,
134134
serokell-util ==0.9.0,
@@ -164,15 +164,15 @@ constraints: Cabal ==2.2.0.1,
164164
transformers-base ==0.4.5.2,
165165
transformers-lift ==0.2.0.1,
166166
trifecta ==2,
167-
turtle ==1.5.12,
167+
turtle ==1.5.13,
168168
universum ==1.2.0,
169169
unix-compat ==0.5.1,
170-
unliftio ==0.2.8.1,
170+
unliftio ==0.2.9.0,
171171
unliftio-core ==0.1.2.0,
172172
unordered-containers ==0.2.9.0,
173173
uuid ==1.3.13,
174174
validation ==1,
175-
vector ==0.12.0.1,
175+
vector ==0.12.0.2,
176176
vty ==5.21,
177177
wai ==3.2.1.2,
178178
wai-app-static ==3.1.6.2,
@@ -181,7 +181,7 @@ constraints: Cabal ==2.2.0.1,
181181
wai-middleware-throttle ==0.3.0.0,
182182
warp ==3.2.25,
183183
warp-tls ==3.2.4.3,
184-
wreq ==0.5.2.1,
184+
wreq ==0.5.3.1,
185185
x509 ==1.7.5,
186186
x509-store ==1.6.7,
187187
x509-validation ==1.6.11,

0 commit comments

Comments
 (0)