forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
172 lines (125 loc) · 4.39 KB
/
build.ps1
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'
.\dev-env\windows\bin\dadew.ps1 install
.\dev-env\windows\bin\dadew.ps1 sync
.\dev-env\windows\bin\dadew.ps1 enable
function bazel() {
Write-Output ">> bazel $args"
$global:lastexitcode = 0
. bazel.exe --bazelrc=.\nix\bazelrc @args
if ($global:lastexitcode -ne 0) {
Write-Output "<< bazel $args (failed, exit code: $global:lastexitcode)"
throw ("Bazel returned non-zero exit code: $global:lastexitcode")
}
Write-Output "<< bazel $args (ok)"
}
# FIXME: Until all bazel issues on Windows are resolved we will be testing only specific bazel targets
# general workspace test
bazel test //pipeline/samples/bazel/java/...
# zipper on Windows
# NOTE(FM): before we were just pulling the external sandbox, now we're building it,
# and it does not work.
# bazel build //ledger/sandbox:sandbox
# basic test for the haskell infrastructure
bazel build //pipeline/samples/bazel/haskell/...
bazel build //compiler/haskell-ide-core/...
bazel build //compiler/daml-lf-ast/...
# build gRPC
bazel build @com_github_grpc_grpc//:grpc
bazel build //nix/third-party/gRPC-haskell/core:fat_cbits
# XXX: Remove once haskell-gRPC builds
bazel build @haskell_c2hs//...
# node / npm / yarn test
bazel build //daml-foundations/daml-tools/daml-extension:daml_extension_lib
bazel build //daml-foundations/daml-tools/language-server-tests:lib-js
# ScalaCInvoker, a Bazel worker, created by rules_scala opens some of the bazel execroot's files,
# which later causes issues on Bazel init (source forest creation) on Windows. A shutdown closes workers,
# which is a workaround for this problem.
bazel shutdown
##################################################################
## ledger
bazel build //ledger/backend-api/...
bazel shutdown
bazel build //ledger/ledger-api-client/...
bazel shutdown
bazel test //ledger/ledger-api-client/...
bazel shutdown
bazel build //ledger/ledger-api-common/...
bazel shutdown
bazel test //ledger/ledger-api-common/...
bazel shutdown
bazel build //ledger/ledger-api-domain/...
bazel shutdown
bazel build //ledger/ledger-api-server-example
bazel shutdown
##################################################################
## ledger-api
bazel build //ledger-api/rs-grpc-akka/...
bazel shutdown
bazel test //ledger-api/rs-grpc-akka/...
bazel shutdown
###################################################################
## daml-lf (some parts of it are still not building correctly
# - falling back to target by target build until all issues are resolved)
# TODO: haskell targets left in //daml-lf/archive
bazel build //daml-lf/archive:daml_lf_archive_scala
bazel shutdown
bazel build //daml-lf/archive:daml_lf_archive_protos_zip
bazel build //daml-lf/archive:daml_lf_archive_protos_tarball
bazel build //daml-lf/data/...
bazel shutdown
bazel test //daml-lf/data/...
bazel shutdown
bazel build //daml-lf/engine:engine
bazel shutdown
bazel build //daml-lf/interface/...
bazel shutdown
bazel test //daml-lf/interface/...
bazel shutdown
bazel build //daml-lf/interpreter/...
bazel shutdown
# FIXME: one of tests fails
#bazel test //daml-lf/interpreter/...
#bazel shutdown
bazel build //daml-lf/lfpackage/...
bazel shutdown
bazel test //daml-lf/lfpackage/...
bazel shutdown
bazel build //daml-lf/parser/...
bazel shutdown
bazel test //daml-lf/parser/...
bazel shutdown
bazel build //daml-lf/repl/...
bazel shutdown
#no tests
#bazel test //daml-lf/repl/...
#bazel shutdown
bazel build //daml-lf/scenario-interpreter/...
bazel shutdown
#no tests
#bazel test //daml-lf/scenario-interpreter/...
#bazel shutdown
bazel build //daml-lf/transaction-scalacheck/...
bazel shutdown
#no tests
#bazel test //daml-lf/transaction-scalacheck/...
#bazel shutdown
bazel build //daml-lf/validation/...
bazel shutdown
bazel test //daml-lf/validation/...
bazel shutdown
###################################################################
bazel build //daml-foundations/daml-tools/docs/...
##############################################################
## language-support
bazel build //language-support/java/testkit:testkit
bazel shutdown
bazel build //language-support/java/bindings/...
bazel shutdown
bazel test //language-support/java/bindings/...
bazel shutdown
bazel build //language-support/java/bindings-rxjava/...
bazel shutdown
bazel test //language-support/java/bindings-rxjava/...
bazel shutdown
###################################################################