mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-04 00:36:58 +03:00
decd74d57a
As suggested in [1] da-ghci will by default first try to build the repl with runfiles and if that fails fallback to no runfiles. If the user specifies --data yes or no, then this automatism will be disabled. [1]: https://github.com/digital-asset/daml/pull/996#issuecomment-490461209
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
set -euxo pipefail
|
|
|
|
eval "$($(dirname "$0")/dev-env/bin/dade-assist)"
|
|
|
|
execution_log_postfix=${1:-}
|
|
|
|
export LC_ALL=en_US.UTF-8
|
|
|
|
ARTIFACT_DIRS="${BUILD_ARTIFACTSTAGINGDIRECTORY:-$PWD}"
|
|
|
|
# Bazel test only builds targets that are dependencies of a test suite
|
|
# so do a full build first.
|
|
(
|
|
cd compiler
|
|
# Bazel also limits cache downloads by -j so increasing this to a ridiculous value
|
|
# helps. Bazel separately controls the number of jobs using CPUs so this should not
|
|
# overload machines.
|
|
# This also appears to be what Google uses internally, see
|
|
# https://github.com/bazelbuild/bazel/issues/6394#issuecomment-436234594.
|
|
bazel build -j 200 //... --experimental_execution_log_file "$ARTIFACT_DIRS/build_execution${execution_log_postfix}.log"
|
|
)
|
|
bazel test -j 200 //... --experimental_execution_log_file "$ARTIFACT_DIRS/test_execution${execution_log_postfix}.log"
|
|
# Make sure that Bazel query works.
|
|
bazel query 'deps(//...)' > /dev/null
|
|
# Check that we can load damlc in ghci
|
|
da-ghci --data yes damlc -e '()'
|