2019-04-04 11:33:38 +03:00
|
|
|
Set-StrictMode -Version latest
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
|
2019-04-05 16:37:42 +03:00
|
|
|
.\dev-env\windows\bin\dadew.ps1 install
|
|
|
|
.\dev-env\windows\bin\dadew.ps1 sync
|
|
|
|
.\dev-env\windows\bin\dadew.ps1 enable
|
|
|
|
|
2019-04-25 14:10:13 +03:00
|
|
|
if (!(Test-Path .\.bazelrc.local)) {
|
|
|
|
Set-Content -Path .\.bazelrc.local -Value 'build --config windows'
|
|
|
|
}
|
|
|
|
|
2019-04-26 13:23:13 +03:00
|
|
|
$ARTIFACT_DIRS = if ("$env:BUILD_ARTIFACTSTAGINGDIRECTORY") { $env:BUILD_ARTIFACTSTAGINGDIRECTORY } else { Get-Location }
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
function bazel() {
|
|
|
|
Write-Output ">> bazel $args"
|
|
|
|
$global:lastexitcode = 0
|
2019-04-11 15:26:55 +03:00
|
|
|
$backupErrorActionPreference = $script:ErrorActionPreference
|
|
|
|
$script:ErrorActionPreference = "Continue"
|
2019-04-18 15:04:23 +03:00
|
|
|
& bazel.exe @args 2>&1 | %{ "$_" }
|
2019-04-11 15:26:55 +03:00
|
|
|
$script:ErrorActionPreference = $backupErrorActionPreference
|
|
|
|
if ($global:lastexitcode -ne 0 -And $args[0] -ne "shutdown") {
|
2019-04-05 16:37:42 +03:00
|
|
|
Write-Output "<< bazel $args (failed, exit code: $global:lastexitcode)"
|
2019-04-04 11:33:38 +03:00
|
|
|
throw ("Bazel returned non-zero exit code: $global:lastexitcode")
|
|
|
|
}
|
2019-04-05 16:37:42 +03:00
|
|
|
Write-Output "<< bazel $args (ok)"
|
2019-04-04 11:33:38 +03:00
|
|
|
}
|
|
|
|
|
2019-05-10 15:13:30 +03:00
|
|
|
# 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
|
2019-04-17 23:37:35 +03:00
|
|
|
|
2019-05-10 15:13:30 +03:00
|
|
|
# FIXME: Until all bazel issues on Windows are resolved we will be testing only specific bazel targets
|
2019-05-14 17:18:55 +03:00
|
|
|
bazel build `-`-experimental_execution_log_file ${ARTIFACT_DIRS}/build_execution_windows.log `
|
2019-05-10 15:13:30 +03:00
|
|
|
//release:sdk-release-tarball `
|
|
|
|
//release/windows-installer:windows-installer `
|
|
|
|
//:git-revision `
|
|
|
|
@com_github_grpc_grpc//:grpc `
|
|
|
|
@haskell_c2hs//... `
|
|
|
|
//3rdparty/... `
|
|
|
|
//nix/third-party/gRPC-haskell:grpc-haskell `
|
2019-06-05 18:56:11 +03:00
|
|
|
//daml-assistant/... `
|
2019-05-22 23:31:04 +03:00
|
|
|
//daml-foundations/... `
|
2019-05-10 15:13:30 +03:00
|
|
|
//compiler/... `
|
|
|
|
//daml-lf/... `
|
|
|
|
//extractor/... `
|
|
|
|
//language-support/java/testkit:testkit `
|
|
|
|
//language-support/java/bindings/... `
|
|
|
|
//language-support/java/bindings-rxjava/... `
|
2019-06-06 17:19:39 +03:00
|
|
|
//language-support/java/codegen/... `
|
2019-05-10 15:13:30 +03:00
|
|
|
//ledger/... `
|
|
|
|
//ledger-api/... `
|
|
|
|
//navigator/backend/... `
|
|
|
|
//navigator/frontend/... `
|
|
|
|
//scala-protoc-plugins/...
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-05-10 15:13:30 +03:00
|
|
|
bazel shutdown
|
2019-04-11 15:26:55 +03:00
|
|
|
|
2019-05-10 15:13:30 +03:00
|
|
|
bazel run `
|
|
|
|
//daml-foundations/daml-tools/da-hs-damlc-app `-`- `-h
|
2019-04-24 19:50:50 +03:00
|
|
|
|
|
|
|
bazel shutdown
|
|
|
|
|
2019-05-14 17:18:55 +03:00
|
|
|
bazel test `-`-experimental_execution_log_file ${ARTIFACT_DIRS}/test_execution_windows.log `
|
|
|
|
//daml-lf/... `
|
2019-05-10 15:13:30 +03:00
|
|
|
//language-support/java/bindings/... `
|
|
|
|
//language-support/java/bindings-rxjava/... `
|
2019-06-06 17:19:39 +03:00
|
|
|
//language-support/java/codegen/... `
|
2019-05-10 15:13:30 +03:00
|
|
|
//ledger/ledger-api-client/... `
|
|
|
|
//ledger/ledger-api-common/... `
|
|
|
|
//ledger-api/... `
|
2019-05-14 22:55:45 +03:00
|
|
|
//navigator/backend/... `
|
2019-06-05 18:56:11 +03:00
|
|
|
//daml-assistant/... `
|
2019-05-17 15:44:53 +03:00
|
|
|
//daml-foundations/daml-ghc:daml-ghc-deterministic `
|
2019-05-28 16:45:38 +03:00
|
|
|
//daml-foundations/daml-ghc:compile-subdir `
|
|
|
|
//daml-foundations/daml-ghc:bond-trading-memory `
|
|
|
|
//daml-foundations/daml-ghc:compile-empty `
|
|
|
|
//daml-foundations/daml-ghc:daml-ghc-deterministic `
|
|
|
|
//daml-foundations/daml-ghc:examples-memory `
|
|
|
|
//daml-foundations/daml-ghc:module-tree-memory `
|
2019-05-30 11:43:27 +03:00
|
|
|
//daml-foundations/daml-ghc:tasty-test `
|
2019-05-22 23:31:04 +03:00
|
|
|
//daml-foundations/daml-tools/da-hs-daml-cli `
|
2019-06-06 13:06:07 +03:00
|
|
|
//daml-foundations/daml-tools/da-hs-damlc-app/... `
|
|
|
|
//compiler/lsp-tests/...
|
2019-05-24 12:10:27 +03:00
|
|
|
# Disabled since there seems to be an issue with starting up the scenario service.
|
|
|
|
# See https://github.com/digital-asset/daml/issues/1354
|
2019-05-28 16:45:38 +03:00
|
|
|
# //daml-foundations/daml-ghc:daml-ghc-shake-test-ci
|
|
|
|
#
|
|
|
|
# Disabled due to scenario service issue mentioned above and
|
|
|
|
# encoding issues for daml-foundations/daml-ghc/tests/Unicode.daml
|
|
|
|
# See: https://github.com/digital-asset/daml/issues/1421
|
|
|
|
# //daml-foundations/daml-ghc:daml-ghc-test-all
|
|
|
|
# //daml-foundations/daml-ghc:daml-ghc-test-dev
|