Skip to content

Commit

Permalink
Merge pull request #46 from mbeddr/merge/MPS-2022.3
Browse files Browse the repository at this point in the history
Merge maintenance/MPS-2022.2 into maintenance/MPS-2022.3
  • Loading branch information
sergej-koscejev authored Feb 21, 2024
2 parents 1ff39c2 + 14da2bc commit 8820173
Show file tree
Hide file tree
Showing 29 changed files with 1,087 additions and 202 deletions.
51 changes: 46 additions & 5 deletions .github/workflows/build_mpsqa.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@

name: MPS-QA_CI

on: [push, pull_request, workflow_dispatch]
on:
push:
branches:
- master
- 'maintenance/*'
pull_request:
workflow_dispatch:
inputs:
publish:
description: Whether to publish the build result to Maven repositories
type: boolean
default: false
required: false

env:
GITHUB_TOKEN: ${{ secrets.MPSQA_GITHUB_PKG_REGISTRY }}
Expand All @@ -24,10 +36,39 @@ jobs:
with:
java-version: 11

- name: Build MPS-QA and Publish to Github Maven
- name: Build MPS-QA and migrate
uses: gradle/gradle-build-action@v2
with:
arguments: build publish -Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}} -Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}}
arguments: >
build migrate
-Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}}
-Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true

- name: Check for no dirty files after build and migration
run: |
if [[ -n $(git status --porcelain | head --lines=1) ]]
then
echo "Dirty files detected after build/migration, run './gradlew migrate' and/or update .gitignore to fix:"
git status
exit 1
fi
- name: Publish
uses: gradle/gradle-build-action@v2

# Only publish on push (to maintenance or master) or when explicitly requested
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish == 'true') }}

with:
arguments: >
publish -x build_allInOne_package
-Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}}
-Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
Expand All @@ -37,5 +78,5 @@ jobs:
- name: Archive distribution
uses: actions/upload-artifact@v2
with:
name: mpsqa-distribution-2020.3-${{ steps.time.outputs.time }}
path: build/artifacts/org.mpsqa.allInOne/org.mpsqa.allInOne.zip
name: org.mpsqa.allInOne
path: build/artifacts/org.mpsqa.allInOne/
65 changes: 57 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import de.itemis.mps.gradle.*
import de.itemis.mps.gradle.downloadJBR.*
import de.itemis.mps.gradle.tasks.*

plugins {
id 'de.itemis.mps.gradle.common' version '1.17.+'
id 'de.itemis.mps.gradle.common' version '1.23.+'
id 'download-jbr' version '1.23.+'
id 'base'
id 'maven-publish'
id 'co.riiid.gradle' version '0.4.2'
}

apply plugin: 'download-jbr'

ext.jbrVers = '17.0.3-b469.32'
ext.jbrVers = '17.0.6-b653.34'

downloadJbr {
jbrVersion = jbrVers
Expand Down Expand Up @@ -57,7 +58,7 @@ ext.dependencyRepositories = [
]

// Dependency versions
ext.mpsVersion = '2022.3'
ext.mpsVersion = '2022.3.1'

// Project versions
ext.major = '2022'
Expand Down Expand Up @@ -231,15 +232,32 @@ task build_lint_analysis_languages(type: BuildLanguages, dependsOn: []) {
script scriptFile("build-lint-analysis-languages.xml")
}

task build_allInOne_package(type: BuildLanguages, dependsOn: [build_allScripts]) {
task build_sandboxes(type: BuildLanguages) {
dependsOn 'build_base_languages'
dependsOn 'build_unused_languages'

script "$buildDir/scripts/build-sandboxes.xml"
}

tasks.register('build_main_languages') {
dependsOn 'build_base_languages'
dependsOn 'build_testing_languages'
dependsOn 'build_clones_languages'
dependsOn 'build_mutant_languages'
dependsOn 'build_unused_languages'
dependsOn 'build_arch_languages'
dependsOn 'build_deprecation_analysis_languages'
dependsOn 'build_lint_analysis_languages'
dependsOn 'build_deprecation_analysis_languages'
dependsOn 'build_lint_analysis_languages'
}

tasks.register('build_all_languages') {
dependsOn 'build_main_languages'

dependsOn 'build_sandboxes'
}

task build_allInOne_package(type: BuildLanguages, dependsOn: [build_allScripts]) {
dependsOn 'build_main_languages'
script scriptFile("build-allInOne-package.xml")
}

Expand All @@ -259,6 +277,19 @@ task test_lint(type: TestLanguages, dependsOn: build_lint_analysis_languages) {
script scriptFile("build-lint-tests.xml")
}

tasks.register('check_lint', MpsCheck) {
dependsOn(resolveMps)

dependsOn(build_lint_analysis_languages)
projectLocation = file('code/languages/org.mpsqa.lint')
mpsHome = mpsHomeDir

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

pluginRoots.add(layout.dir(provider { new File(mpsHomeDir, 'plugins/mps-console') }))
pluginRoots.add(layout.dir(provider { new File(mpsHomeDir, 'plugins/mps-modelchecker') }))
}

check.dependsOn(tasks.withType(TestLanguages))

assemble.dependsOn(tasks.withType(BuildLanguages))
Expand Down Expand Up @@ -320,3 +351,21 @@ clean.dependsOn cleanMps
defaultTasks 'build'

task rebuild(dependsOn:[clean, build_allInOne_package])

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

haltOnPrecheckFailure = true
haltOnDependencyError = true

mpsHome = mpsHomeDir

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

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

pluginRoots.from(new File(mpsHomeDir, 'plugins/mps-build'))
pluginRoots.from(new File(mpsHomeDir, 'plugins/mps-console'))
}
19 changes: 18 additions & 1 deletion build/scripts/build_all_scripts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<delete dir="${build.layout}" />
</target>

<target name="compileJava" depends="java.compile.org.mpsqa.build.allScripts, java.compile.org.mpsqa.build, java.compile.org.mpsqa.clones.build, java.compile.org.mpsqa.lint.build, java.compile.org.mpsqa.testing.tests.build" />
<target name="compileJava" depends="java.compile.org.mpsqa.build.allScripts, java.compile.org.mpsqa.build, java.compile.org.mpsqa.build.sandboxes, java.compile.org.mpsqa.clones.build, java.compile.org.mpsqa.lint.build, java.compile.org.mpsqa.testing.tests.build" />

<target name="processResources" />

Expand Down Expand Up @@ -156,6 +156,7 @@
<chunk>
<module file="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build/org.mpsqa.build.msd" />
<module file="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.allScripts/org.mpsqa.build.allScripts.msd" />
<module file="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.sandboxes/org.mpsqa.build.sandboxes.msd" />
<module file="${basedir}/code/languages/org.mpsqa.clones/solutions/org.mpsqa.clones.build/org.mpsqa.clones.build.msd" />
<module file="${basedir}/code/languages/org.mpsqa.lint/solutions/org.mpsqa.lint.build/org.mpsqa.lint.build.msd" />
<module file="${basedir}/code/languages/org.mpsqa.testing/solutions/org.mpsqa.testing.tests.build/org.mpsqa.testing.tests.build.msd" />
Expand Down Expand Up @@ -203,6 +204,21 @@
</copy>
</target>

<target name="java.compile.org.mpsqa.build.sandboxes" depends="java.compile.org.mpsqa.build">
<mkdir dir="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.sandboxes/source_gen" />
<mkdir dir="${build.tmp}/java/out/org.mpsqa.build.sandboxes" />
<javac destdir="${build.tmp}/java/out/org.mpsqa.build.sandboxes" fork="false" encoding="utf8" includeantruntime="false" debug="true">
<compilerarg value="-Xlint:none" />
<src>
<path location="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.sandboxes/source_gen" />
</src>
<classpath path="${build.tmp}/java/out/org.mpsqa.build" />
</javac>
<copy todir="${build.tmp}/java/out/org.mpsqa.build.sandboxes">
<fileset dir="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.sandboxes/source_gen" excludes="**/*.java" />
</copy>
</target>

<target name="java.compile.org.mpsqa.clones.build" depends="java.compile.org.mpsqa.build">
<mkdir dir="${basedir}/code/languages/org.mpsqa.clones/solutions/org.mpsqa.clones.build/source_gen" />
<mkdir dir="${build.tmp}/java/out/org.mpsqa.clones.build" />
Expand Down Expand Up @@ -251,6 +267,7 @@
<target name="cleanSources">
<delete dir="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build/source_gen" />
<delete dir="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.allScripts/source_gen" />
<delete dir="${basedir}/code/languages/org.mpsqa.build/solutions/org.mpsqa.build.sandboxes/source_gen" />
<delete dir="${basedir}/code/languages/org.mpsqa.clones/solutions/org.mpsqa.clones.build/source_gen" />
<delete dir="${basedir}/code/languages/org.mpsqa.lint/solutions/org.mpsqa.lint.build/source_gen" />
<delete dir="${basedir}/code/languages/org.mpsqa.testing/solutions/org.mpsqa.testing.tests.build/source_gen" />
Expand Down
1 change: 1 addition & 0 deletions code/languages/org.mpsqa.build/.mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<component name="MPSProject">
<projectModules>
<modulePath path="$PROJECT_DIR$/solutions/org.mpsqa.build.allScripts/org.mpsqa.build.allScripts.msd" folder="" />
<modulePath path="$PROJECT_DIR$/solutions/org.mpsqa.build.sandboxes/org.mpsqa.build.sandboxes.msd" folder="" />
<modulePath path="$PROJECT_DIR$/solutions/org.mpsqa.build/org.mpsqa.build.msd" folder="" />
</projectModules>
</component>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
<property id="927724900262033861" name="generateDebugInfo" index="2_Ic$$" />
<property id="927724900262033862" name="copyResources" index="2_Ic$B" />
</concept>
<concept id="4380385936562003279" name="jetbrains.mps.build.structure.BuildString" flags="ng" index="NbPM2">
<child id="4903714810883783243" name="parts" index="3MwsjC" />
</concept>
<concept id="8618885170173601777" name="jetbrains.mps.build.structure.BuildCompositePath" flags="nn" index="2Ry0Ak">
<property id="8618885170173601779" name="head" index="2Ry0Am" />
<child id="8618885170173601778" name="tail" index="2Ry0An" />
Expand Down Expand Up @@ -55,14 +52,10 @@
<concept id="4701820937132344003" name="jetbrains.mps.build.structure.BuildLayout_Container" flags="ng" index="1y1bJS">
<child id="7389400916848037006" name="children" index="39821P" />
</concept>
<concept id="841011766566059607" name="jetbrains.mps.build.structure.BuildStringNotEmpty" flags="ng" index="3_J27D" />
<concept id="5248329904287794596" name="jetbrains.mps.build.structure.BuildInputFiles" flags="ng" index="3LXTmp">
<child id="5248329904287794598" name="dir" index="3LXTmr" />
<child id="5248329904287794679" name="selectors" index="3LXTna" />
</concept>
<concept id="4903714810883702019" name="jetbrains.mps.build.structure.BuildTextStringPart" flags="ng" index="3Mxwew">
<property id="4903714810883755350" name="text" index="3MwjfP" />
</concept>
</language>
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
Expand All @@ -73,20 +66,6 @@
<concept id="6503355885715333289" name="jetbrains.mps.build.mps.structure.BuildMpsAspect" flags="ng" index="2igEWh">
<property id="7981469545489178349" name="generationMaxHeapSizeInMb" index="3UIfUI" />
</concept>
<concept id="6592112598314498932" name="jetbrains.mps.build.mps.structure.BuildMps_IdeaPlugin" flags="ng" index="m$_wf">
<property id="6592112598314498927" name="id" index="m$_wk" />
<child id="6592112598314498931" name="version" index="m$_w8" />
<child id="6592112598314499050" name="content" index="m$_yh" />
<child id="6592112598314499028" name="dependencies" index="m$_yJ" />
<child id="6592112598314499021" name="name" index="m$_yQ" />
<child id="6592112598314855574" name="containerName" index="m_cZH" />
</concept>
<concept id="6592112598314499036" name="jetbrains.mps.build.mps.structure.BuildMps_IdeaPluginModule" flags="ng" index="m$_yB">
<reference id="6592112598314499037" name="target" index="m$_yA" />
</concept>
<concept id="6592112598314499027" name="jetbrains.mps.build.mps.structure.BuildMps_IdeaPluginDependency" flags="ng" index="m$_yC">
<reference id="6592112598314499066" name="target" index="m$_y1" />
</concept>
<concept id="868032131020265945" name="jetbrains.mps.build.mps.structure.BuildMPSPlugin" flags="ng" index="3b7kt6" />
<concept id="5253498789149381388" name="jetbrains.mps.build.mps.structure.BuildMps_Module" flags="ng" index="3bQrTs">
<child id="5253498789149547825" name="sources" index="3bR31x" />
Expand Down Expand Up @@ -210,30 +189,6 @@
</node>
</node>
</node>
<node concept="m$_wf" id="fm3v0X36My" role="3989C9">
<property role="m$_wk" value="org.mpsqa.build" />
<node concept="3_J27D" id="fm3v0X36M$" role="m$_yQ">
<node concept="3Mxwew" id="fm3v0X36MW" role="3MwsjC">
<property role="3MwjfP" value="org.mpsqa.build" />
</node>
</node>
<node concept="3_J27D" id="fm3v0X36MA" role="m_cZH">
<node concept="3Mxwew" id="fm3v0X36MY" role="3MwsjC">
<property role="3MwjfP" value="org.mpsqa.build" />
</node>
</node>
<node concept="3_J27D" id="fm3v0X36MC" role="m$_w8">
<node concept="3Mxwew" id="fm3v0X36N0" role="3MwsjC">
<property role="3MwjfP" value="0.1" />
</node>
</node>
<node concept="m$_yB" id="fm3v0X36N2" role="m$_yh">
<ref role="m$_yA" node="5Xjjs0Nf2r4" resolve="org.mpsqa.build" />
</node>
<node concept="m$_yC" id="fm3v0X36N4" role="m$_yJ">
<ref role="m$_y1" to="ffeo:5HVSRHdVm9a" resolve="jetbrains.mps.build" />
</node>
</node>
<node concept="1E1JtA" id="5Xjjs0Nf2r4" role="3989C9">
<property role="TrG5h" value="org.mpsqa.build" />
<property role="3LESm3" value="11d4368a-a7e8-4dd9-bfc6-c2de268d1994" />
Expand Down Expand Up @@ -297,6 +252,71 @@
<node concept="2igEWh" id="3GDqItDloKJ" role="1hWBAP">
<property role="3UIfUI" value="1024" />
</node>
<node concept="1E1JtA" id="57r710zgTIN" role="3989C9">
<property role="BnDLt" value="true" />
<property role="TrG5h" value="org.mpsqa.build.sandboxes" />
<property role="3LESm3" value="597901b4-55d9-4f1d-923a-6bff55b6cc3e" />
<node concept="55IIr" id="57r710zgTIP" role="3LF7KH">
<node concept="2Ry0Ak" id="57r710zgTKH" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="57r710zgTKM" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="57r710zgTKU" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build" />
<node concept="2Ry0Ak" id="57r710zgTKZ" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="57r710zgTL4" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build.sandboxes" />
<node concept="2Ry0Ak" id="57r710zgTL9" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build.sandboxes.msd" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="1SiIV0" id="57r710zgTLI" role="3bR37C">
<node concept="3bR9La" id="57r710zgTLJ" role="1SiIV1">
<ref role="3bR37D" node="5Xjjs0Nf2r4" resolve="org.mpsqa.build" />
</node>
</node>
<node concept="1SiIV0" id="57r710zgTLK" role="3bR37C">
<node concept="3bR9La" id="57r710zgTLL" role="1SiIV1">
<ref role="3bR37D" to="ffeo:78GwwOvB3tw" resolve="jetbrains.mps.ide.build" />
</node>
</node>
<node concept="1BupzO" id="57r710zgTLT" role="3bR31x">
<property role="3ZfqAx" value="models" />
<property role="1Hdu6h" value="true" />
<property role="1HemKv" value="true" />
<node concept="3LXTmp" id="57r710zgTLU" role="1HemKq">
<node concept="55IIr" id="57r710zgTLM" role="3LXTmr">
<node concept="2Ry0Ak" id="57r710zgTLN" role="iGT6I">
<property role="2Ry0Am" value="code" />
<node concept="2Ry0Ak" id="57r710zgTLO" role="2Ry0An">
<property role="2Ry0Am" value="languages" />
<node concept="2Ry0Ak" id="57r710zgTLP" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build" />
<node concept="2Ry0Ak" id="57r710zgTLQ" role="2Ry0An">
<property role="2Ry0Am" value="solutions" />
<node concept="2Ry0Ak" id="57r710zgTLR" role="2Ry0An">
<property role="2Ry0Am" value="org.mpsqa.build.sandboxes" />
<node concept="2Ry0Ak" id="57r710zgTLS" role="2Ry0An">
<property role="2Ry0Am" value="models" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="3qWCbU" id="57r710zgTLV" role="3LXTna">
<property role="3qWCbO" value="**/*.mps, **/*.mpsr, **/.model" />
</node>
</node>
</node>
</node>
<node concept="1E1JtA" id="2WwuhUZ0zPP" role="3989C9">
<property role="BnDLt" value="true" />
<property role="TrG5h" value="org.mpsqa.clones.build" />
Expand Down
Loading

0 comments on commit 8820173

Please sign in to comment.