Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged experiment-scenario with experiment-base #236

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions opendc-experiments/opendc-experiments-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ plugins {
`kotlin-library-conventions`
`testing-conventions`
`jacoco-conventions`
distribution
kotlin("plugin.serialization") version "1.9.22"
}

Expand All @@ -35,6 +36,8 @@ dependencies {
api(projects.opendcCompute.opendcComputeService)
api(projects.opendcCompute.opendcComputeSimulator)

implementation(libs.clikt)

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation(libs.progressbar)
implementation(project(mapOf("path" to ":opendc-simulator:opendc-simulator-core")))
Expand All @@ -48,3 +51,36 @@ dependencies {
runtimeOnly(libs.log4j.core)
runtimeOnly(libs.log4j.slf4j)
}

val createScenarioApp by tasks.creating(CreateStartScripts::class) {
dependsOn(tasks.jar)

applicationName = "OpenDCScenarioRunner"
mainClass.set("org.opendc.experiments.base.ScenarioCLI")
classpath = tasks.jar.get().outputs.files + configurations["runtimeClasspath"]
outputDir = project.buildDir.resolve("scripts")
}

// Create custom Scenario distribution
distributions {
main {
distributionBaseName.set("OpenDCScenarioRunner")

contents {
from("README.md")
from("LICENSE.txt")
from("../../LICENSE.txt") {
rename { "LICENSE-OpenDC.txt" }
}

into("bin") {
from(createScenarioApp)
}

into("lib") {
from(tasks.jar)
from(configurations["runtimeClasspath"])
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@

@file:JvmName("ScenarioCli")

package org.opendc.experiments.scenario
package org.opendc.experiments.base.runner

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.defaultLazy
import com.github.ajalt.clikt.parameters.options.option
import com.github.ajalt.clikt.parameters.types.file
import com.github.ajalt.clikt.parameters.types.int
import org.opendc.experiments.base.runner.runScenarios
import org.opendc.experiments.base.scenario.getScenarios
import java.io.File

Expand Down
96 changes: 0 additions & 96 deletions opendc-experiments/opendc-experiments-scenario/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading