daml/daml-lf/scenario-interpreter/BUILD.bazel
Gary Verhaegen d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00

97 lines
2.5 KiB
Python

# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//bazel_tools:scala.bzl",
"da_scala_benchmark_jmh",
"da_scala_library",
"da_scala_test",
"da_scala_test_suite",
"lf_scalacopts",
"lf_scalacopts_stricter",
)
load(
"//rules_daml:daml.bzl",
"daml_compile",
)
load("@scala_version//:index.bzl", "scala_major_version")
da_scala_library(
name = "scenario-interpreter",
srcs = glob(["src/main/**/*.scala"]),
main_class = "com.daml.lf.speedy.Main",
scala_deps = ["@maven//:org_typelevel_paiges_core"],
scalacopts = lf_scalacopts_stricter,
tags = ["maven_coordinates=com.daml:daml-lf-scenario-interpreter:__VERSION__"],
visibility = [
"//visibility:public",
],
deps = [
"//daml-lf/data",
"//daml-lf/engine",
"//daml-lf/interpreter",
"//daml-lf/language",
"//daml-lf/transaction",
"//libs-scala/nameof",
"//libs-scala/scala-utils",
],
)
da_scala_test_suite(
name = "scenario-interpreter_tests",
size = "small",
srcs = glob(["src/test/**/*.scala"]),
scala_deps = ["@maven//:org_scalaz_scalaz_core"],
scalacopts = lf_scalacopts,
deps = [
":scenario-interpreter",
"//daml-lf/data",
"//daml-lf/engine",
"//daml-lf/interpreter",
"//daml-lf/language",
"//daml-lf/transaction",
],
)
daml_compile(
name = "CollectAuthority",
srcs = ["src/perf/resources/damls/CollectAuthority.daml"],
enable_scenarios = True,
visibility = ["//visibility:public"],
)
# TODO (MK) Figure out what to do about the benchmark.
da_scala_benchmark_jmh(
name = "scenario-perf",
srcs = glob(["src/perf/benches/**/*.scala"]),
data = [
":CollectAuthority.dar",
":CollectAuthority.dar.pp",
],
scala_deps = ["@maven//:org_scalaz_scalaz_core"],
visibility = ["//visibility:public"],
deps = [
"//bazel_tools/runfiles:scala_runfiles",
"//daml-lf/archive:daml_lf_1.dev_archive_proto_java",
"//daml-lf/archive:daml_lf_archive_reader",
"//daml-lf/data",
"//daml-lf/engine",
"//daml-lf/interpreter",
"//daml-lf/language",
"//daml-lf/scenario-interpreter",
"//daml-lf/transaction",
"@maven//:com_google_protobuf_protobuf_java",
],
)
da_scala_test(
name = "scenario-perf-test",
args = [
"-f",
"0",
],
main_class = "org.openjdk.jmh.Main",
deps = [":scenario-perf"],
)