diff --git a/gradle/nshm.gradle b/gradle/nshm.gradle index a925e004a056da68dafc3bb8329dca5c1b1912d6..57da084f240b286ecaeeb79d584775a25fefcdb0 100644 --- a/gradle/nshm.gradle +++ b/gradle/nshm.gradle @@ -22,26 +22,127 @@ ext { } } -/** - * Download the NSHMs - */ -task downloadNshms() { +// Download and unzip nshm-alaska tag for Alaska 2023 +task alaska2023() { doLast { - // Download and unzip nshm-alaska tag for Alaska 2023 downloadNshm("nshm-alaska", "3.a.0") + } +} - // Download and unzip nshm-conus tag for CONUS 2018 +// Download and unzip nshm-conus tag for CONUS 2018 +task conus2018() { + doLast { downloadNshm("nshm-conus", "5.2.0") + } +} - // Download and unzip nshm-conus tag for CONUS 2023 +// Download and unzip nshm-conus tag for CONUS 2023 +task conus2023() { + doLast { downloadNshm("nshm-conus", "6.a.3") + } +} - // Download and unzip nshm-hawaii tag for Hawaii 2021 +// Download and unzip nshm-hawaii tag for Hawaii 2021 +task hawaii2021() { + doLast { downloadNshm("nshm-hawaii", "2.0.2") } } +// Download all NSHMs +task nshms() { + dependsOn alaska2023 + dependsOn conus2018 + dependsOn conus2023 + dependsOn hawaii2021 +} + task cleanNshm(type: Delete) { delete nshmDir } clean.dependsOn cleanNshm + +// Test Alaska 2023 NSHM +task testAlaska2023(type: Test) { + description = "Test Alaska 2023 NSHM" + group = "verification" + dependsOn alaska2023 + + testLogging { + exceptionFormat "full" + } + + useJUnitPlatform() + jvmArgs( + "-Xms2g", + "-Xmx8g", + ) + + filter { + includeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTests.testAlaska2023" + } +} + +// Test CONUS 2018 NSHM +task testConus2018(type: Test) { + description = "Test CONUS 2018 NSHM" + group = "verification" + dependsOn conus2018 + + testLogging { + exceptionFormat "full" + } + + useJUnitPlatform() + jvmArgs( + "-Xms2g", + "-Xmx8g", + ) + + filter { + includeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTests.testConus2018" + } +} + +// Test CONUS 2023 NSHM +task testConus2023(type: Test) { + description = "Test CONUS 2023 NSHM" + group = "verification" + dependsOn conus2023 + + testLogging { + exceptionFormat "full" + } + + useJUnitPlatform() + jvmArgs( + "-Xms2g", + "-Xmx8g", + ) + + filter { + includeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTests.testConus2023" + } +} + +// Test Hawaii 2021 NSHM +task testHawaii2021(type: Test) { + description = "Test Hawaii 2021 NSHM" + group = "verification" + dependsOn hawaii2021 + + testLogging { + exceptionFormat "full" + } + + useJUnitPlatform() + jvmArgs( + "-Xms2g", + "-Xmx8g", + ) + + filter { + includeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTests.testHawaii2021" + } +}