mirror of
https://github.com/enso-org/enso.git
synced 2024-11-29 12:02:28 +03:00
Make sure that runtime/benchmarks are dry-run in CI tests (#8330)
Ensure that `-Dbench.compileOnly` system property is correctly forwarded to the benchmarks' runner. So that in the CI Engine tests, benchmarks are *dry run*. # Important Notes - Fixes dry run benchmarks in Engine Test Action - Fixes Engine Benchmark Action
This commit is contained in:
parent
b224f95639
commit
1c936cc69f
31
build.sbt
31
build.sbt
@ -1394,12 +1394,6 @@ lazy val runtime = (project in file("engine/runtime"))
|
||||
version := ensoVersion,
|
||||
commands += WithDebugCommand.withDebug,
|
||||
inConfig(Compile)(truffleRunOptionsSettings),
|
||||
inConfig(Benchmark)(Defaults.testSettings),
|
||||
Benchmark / javacOptions --= Seq(
|
||||
"-source",
|
||||
frgaalSourceLevel,
|
||||
"--enable-preview"
|
||||
),
|
||||
Test / parallelExecution := false,
|
||||
Test / logBuffered := false,
|
||||
Test / testOptions += Tests.Argument(
|
||||
@ -1470,7 +1464,15 @@ lazy val runtime = (project in file("engine/runtime"))
|
||||
.value
|
||||
)
|
||||
.settings(
|
||||
bench := (Benchmark / test).tag(Exclusive).value,
|
||||
bench := (Benchmark / test)
|
||||
.tag(Exclusive)
|
||||
.dependsOn(
|
||||
// runtime.jar fat jar needs to be assembled as it is used in the
|
||||
// benchmarks. This dependency is here so that `runtime/bench` works
|
||||
// after clean build.
|
||||
LocalProject("runtime-with-instruments") / assembly
|
||||
)
|
||||
.value,
|
||||
benchOnly := Def.inputTaskDyn {
|
||||
import complete.Parsers.spaceDelimited
|
||||
val name = spaceDelimited("<name>").parsed match {
|
||||
@ -1480,12 +1482,21 @@ lazy val runtime = (project in file("engine/runtime"))
|
||||
Def.task {
|
||||
(Benchmark / testOnly).toTask(" -- -z " + name).value
|
||||
}
|
||||
}.evaluated,
|
||||
Benchmark / parallelExecution := false
|
||||
}.evaluated
|
||||
)
|
||||
/** Benchmark settings */
|
||||
.settings(
|
||||
inConfig(Benchmark)(Defaults.testSettings),
|
||||
Benchmark / javacOptions --= Seq(
|
||||
"-source",
|
||||
frgaalSourceLevel,
|
||||
"--enable-preview"
|
||||
),
|
||||
(Benchmark / javaOptions) :=
|
||||
(LocalProject("std-benchmarks") / Benchmark / run / javaOptions).value
|
||||
(LocalProject("std-benchmarks") / Benchmark / run / javaOptions).value,
|
||||
(Benchmark / javaOptions) ++= benchOnlyOptions,
|
||||
Benchmark / fork := true,
|
||||
Benchmark / parallelExecution := false
|
||||
)
|
||||
.dependsOn(`common-polyglot-core-utils`)
|
||||
.dependsOn(`edition-updater`)
|
||||
|
@ -165,9 +165,7 @@ In order to build and run Enso you will need the following tools:
|
||||
[`project/build.properties`](../project/build.properties).
|
||||
- [Maven](https://maven.apache.org/) with version at least 3.6.3.
|
||||
- [GraalVM](https://www.graalvm.org/) with the same version as described in the
|
||||
[`build.sbt`](../build.sbt) file, configured as your default JVM. GraalVM is
|
||||
distributed for different Java versions, so you need a GraalVM distribution
|
||||
for the same Java version as specified in [`build.sbt`](../build.sbt).
|
||||
[`build.sbt`](../build.sbt) file, configured as your default JVM.
|
||||
- [Flatbuffers Compiler](https://google.github.io/flatbuffers) with version
|
||||
1.12.0.
|
||||
- [Rustup](https://rustup.rs), the rust toolchain management utility.
|
||||
@ -259,24 +257,6 @@ working on modern macOS properly. Thus, we've developed a replacement, the
|
||||
simply export the `USE_CARGO_WATCH_PLUS=1` in your shell and the build system
|
||||
will pick it up instead of the `cargo-watch`.
|
||||
|
||||
### Getting Set Up (JVM)
|
||||
|
||||
In order to properly build the `runtime` component, the JVM running SBT needs to
|
||||
have some dependency JARs available in its module path at startup. To ensure
|
||||
they are available, before running any compilation or other tasks, these
|
||||
dependencies should be prepared. To do so, run the following command in the
|
||||
repository root directory:
|
||||
|
||||
```bash
|
||||
sbt bootstrap
|
||||
```
|
||||
|
||||
It is preferred to not run this command from the sbt shell, but in batch mode,
|
||||
because SBT has to be launched again anyway to pick up these JARs at startup.
|
||||
|
||||
Bootstrap has to be run only when building the project for the first time
|
||||
**and** after each change of Graal version.
|
||||
|
||||
### Getting Set Up (Documentation)
|
||||
|
||||
We enforce automated formatting of all of our documentation and configuration
|
||||
|
Loading…
Reference in New Issue
Block a user