Skip to content

Commit

Permalink
Merge pull request #53 from mbeddr/feature/rerun-migrations-on-ci
Browse files Browse the repository at this point in the history
Run rerunnable migrations on CI
  • Loading branch information
sergej-koscejev authored Mar 20, 2024
2 parents 7ea1188 + fe7f8dc commit 8676fdf
Show file tree
Hide file tree
Showing 46 changed files with 1,531 additions and 511 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_mpsqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: >
build migrate
build migrate rerunMigrations
-Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}}
-Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}}
wrapper-cache-enabled: true
Expand Down
46 changes: 41 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ plugins {
id 'base'
id 'maven-publish'
id 'co.riiid.gradle' version '0.4.2'

id 'de.itemis.mps.gradle.launcher' version '2.2.0.+'
}

ext.jbrVers = '17.0.6-b469.82'
Expand Down Expand Up @@ -114,7 +116,7 @@ if (project.skipResolveMps) {
}
}
} else {
task resolveMps(type: Copy) {
task resolveMps(type: Sync) {
dependsOn configurations.mps
from {
configurations.mps.resolve().collect { zipTree(it) }
Expand All @@ -139,8 +141,6 @@ def defaultScriptArgs = [
'build.dir' : buildDir,
'version' : version,
'build.date' : new Date(),
//incremental build support
'mps.generator.skipUnmodifiedModels': true
]

// enables https://github.com/mbeddr/mps-gradle-plugin#providing-global-defaults
Expand Down Expand Up @@ -328,10 +328,12 @@ defaultTasks 'build'

task rebuild(dependsOn:[clean, build_allInOne_package])

ext.allProjectDirectories = { file('code/languages').listFiles({ File file -> file.directory } as FileFilter) }

tasks.register('migrate', MpsMigrate) {
dependsOn(resolveMps, 'downloadJbr', 'build_all_languages')
javaExecutable = layout.file(
tasks.named('downloadJbr', DownloadJbrForPlatform).map {it.javaExecutable })
tasks.named('downloadJbr', DownloadJbrForPlatform).map { it.javaExecutable })

haltOnPrecheckFailure = true
haltOnDependencyError = true
Expand All @@ -340,8 +342,42 @@ tasks.register('migrate', MpsMigrate) {

folderMacros.put('mpsqa.home', layout.projectDirectory)

projectDirectories.from({ file('code/languages').listFiles({ File file -> file.directory } as FileFilter) })
projectDirectories.from(allProjectDirectories)

pluginRoots.from(new File(mpsHomeDir, 'plugins/mps-build'))
pluginRoots.from(new File(mpsHomeDir, 'plugins/mps-console'))
}

configurations {
rerunMigrationsBackend
}

dependencies {
rerunMigrationsBackend("de.itemis.mps.build-backends:rerun-migrations:0.0.1.83.+")
}

tasks.register('rerunMigrations', JavaExec) {
mustRunAfter('migrate')
mustRunAfter('build_all_languages')

dependsOn(resolveMps, 'downloadJbr')
mpsBackendLauncher.builder()
.withMpsHome(mpsHomeDir)
.withJavaExecutable(tasks.named('downloadJbr', DownloadJbrForPlatform).map { it.javaExecutable.path })
.configure(it)

classpath(configurations.rerunMigrationsBackend)
classpath(fileTree(mpsHomeDir) {
include("lib/**/*.jar")
})
mainClass = 'de.itemis.mps.gradle.migrate.MainKt'

for (dir in allProjectDirectories()) {
args("--project=$dir")
}

args("--macro=mpsqa.home::${rootDir}")
args("--plugin=jetbrains.mps.console::mps-console")
args("--plugin=jetbrains.mps.trove::mps-trove")
args("--plugin=jetbrains.mps.ide.modelchecker::mps-modelchecker")
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<facet type="java">
<classes generated="true" path="${module}/classes_gen" />
</facet>
<facet type="tests" />
</facets>
<sourcePath />
<languageVersions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
<concept id="5253498789149585690" name="jetbrains.mps.build.mps.structure.BuildMps_ModuleDependencyOnModule" flags="ng" index="3bR9La">
<reference id="5253498789149547705" name="module" index="3bR37D" />
</concept>
<concept id="763829979718664966" name="jetbrains.mps.build.mps.structure.BuildMps_ModuleResources" flags="ng" index="3rtmxn">
<child id="763829979718664967" name="files" index="3rtmxm" />
</concept>
<concept id="4278635856200817744" name="jetbrains.mps.build.mps.structure.BuildMps_ModuleModelRoot" flags="ng" index="1BupzO">
<property id="8137134783396907368" name="convert2binary" index="1Hdu6h" />
<property id="8137134783396676838" name="extracted" index="1HemKv" />
Expand Down Expand Up @@ -188,6 +191,30 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7Jaw" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7Jax" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7Jay" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="55IIr" id="46QW9mm7Jaz" role="3LXTmr">
<node concept="2Ry0Ak" id="46QW9mm7Ja$" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="46QW9mm7Ja_" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7JaA" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build" />
<node concept="2Ry0Ak" id="46QW9mm7JaB" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="46QW9mm7JaC" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build.allScripts" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="1E1JtA" id="5Xjjs0Nf2r4" role="3989C9">
<property role="TrG5h" value="org.mpsqa.build" />
Expand Down Expand Up @@ -248,6 +275,30 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7JaE" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7JaF" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7JaG" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="55IIr" id="46QW9mm7JaH" role="3LXTmr">
<node concept="2Ry0Ak" id="46QW9mm7JaI" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="46QW9mm7JaJ" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7JaK" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build" />
<node concept="2Ry0Ak" id="46QW9mm7JaL" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="46QW9mm7JaM" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="2igEWh" id="3GDqItDloKJ" role="1hWBAP">
<property role="3UIfUI" value="1024" />
Expand Down Expand Up @@ -316,6 +367,30 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7JaO" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7JaP" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7JaQ" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="55IIr" id="46QW9mm7JaR" role="3LXTmr">
<node concept="2Ry0Ak" id="46QW9mm7JaS" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="46QW9mm7JaT" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7JaU" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build" />
<node concept="2Ry0Ak" id="46QW9mm7JaV" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="46QW9mm7JaW" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build.sandboxes" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="1E1JtA" id="2WwuhUZ0zPP" role="3989C9">
<property role="BnDLt" value="true" />
Expand Down Expand Up @@ -381,6 +456,30 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7JaY" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7JaZ" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7Jb0" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="55IIr" id="46QW9mm7Jb1" role="3LXTmr">
<node concept="2Ry0Ak" id="46QW9mm7Jb2" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="46QW9mm7Jb3" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7Jb4" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.clones" />
<node concept="2Ry0Ak" id="46QW9mm7Jb5" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="46QW9mm7Jb6" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.clones.build" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="1E1JtA" id="2WwuhUZ3iEo" role="3989C9">
<property role="BnDLt" value="true" />
Expand Down Expand Up @@ -446,6 +545,30 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7Jb8" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7Jb9" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7Jba" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="55IIr" id="46QW9mm7Jbb" role="3LXTmr">
<node concept="2Ry0Ak" id="46QW9mm7Jbc" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="46QW9mm7Jbd" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7Jbe" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.lint" />
<node concept="2Ry0Ak" id="46QW9mm7Jbf" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="46QW9mm7Jbg" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.lint.build" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="1E1JtA" id="2WwuhUZ0zTl" role="3989C9">
<property role="BnDLt" value="true" />
Expand Down Expand Up @@ -511,6 +634,30 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7Jbi" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7Jbj" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7Jbk" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="55IIr" id="46QW9mm7Jbl" role="3LXTmr">
<node concept="2Ry0Ak" id="46QW9mm7Jbm" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="46QW9mm7Jbn" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7Jbo" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.testing" />
<node concept="2Ry0Ak" id="46QW9mm7Jbp" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="46QW9mm7Jbq" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.testing.tests.build" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</model>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,25 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7Jbv" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7Jbw" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7Jbx" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="398BVA" id="46QW9mm7Jby" role="3LXTmr">
<ref role="398BVh" node="57r710zgQhu" resolve="languages" />
<node concept="2Ry0Ak" id="46QW9mm7Jbz" role="iGT6I">
<property role="2Ry0Am" value="org.mpsqa.mutant" />
<node concept="2Ry0Ak" id="46QW9mm7Jb$" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7Jb_" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.mutant.demolang" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="1E1JtD" id="57r710zgDbF" role="3989C9">
<property role="BnDLt" value="true" />
Expand Down Expand Up @@ -418,6 +437,25 @@
</node>
</node>
</node>
<node concept="3rtmxn" id="46QW9mm7JbB" role="3bR31x">
<node concept="3LXTmp" id="46QW9mm7JbC" role="3rtmxm">
<node concept="3qWCbU" id="46QW9mm7JbD" role="3LXTna">
<property role="3qWCbO" value="icons/**, resources/**" />
</node>
<node concept="398BVA" id="46QW9mm7JbE" role="3LXTmr">
<ref role="398BVh" node="57r710zgQhu" resolve="languages" />
<node concept="2Ry0Ak" id="46QW9mm7JbF" role="iGT6I">
<property role="2Ry0Am" value="org.mpsqa.deprecated" />
<node concept="2Ry0Ak" id="46QW9mm7JbG" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="46QW9mm7JbH" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.deprecated.example_lan" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="2sgV4H" id="57r710zgEGP" role="1l3spa">
<ref role="1l3spb" to="m9y5:1YSnQiVh0x1" resolve="org.mpsqa.unused" />
Expand Down
Loading

0 comments on commit 8676fdf

Please sign in to comment.