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

Merge/maintenance mps 2023 2 into master #134

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d19d1a2
distribution.build: enable distribution build based on MPS 2023.2.2
danielratiu Nov 7, 2024
92304b1
gradle.lockfile: updated dependency to platform and mpsqa
danielratiu Nov 8, 2024
c1da9ea
safety: fixed the dependencies in the distribution build
danielratiu Nov 11, 2024
56c8491
feature/plantuml integration (#116)
danielratiu Nov 20, 2024
30cffa6
com.mpsbasics: add a libraries.xml
alexanderpann Nov 14, 2024
a1c4699
feature/publish rcp as maven packages (#117)
danielratiu Nov 24, 2024
89aac03
upgrade docx4j to 11.4.11
alexanderpann Nov 21, 2024
27ca1f0
Merge pull request #118 from mbeddr/bugfix/upgrade_docx4j
alexanderpann Nov 25, 2024
4512cbc
safety: fixed "GenericNamedModelElementRefWord"
danielratiu Nov 30, 2024
25accd6
mpsbasics: enhanced the PDF exporter with navigatable links in PDF to…
danielratiu Nov 30, 2024
00c3afe
safety.build.distribution: add "mps::plugins/mps-migration" to RCP
danielratiu Nov 30, 2024
bbcf632
overall: File -> Force Save All
danielratiu Nov 30, 2024
13fcb48
pdfbox: make optional the support for saving links on PDF pages (#119)
danielratiu Dec 6, 2024
3fc70b3
mpsbasic: cleanup dependencies of pdfbox
ratiud Dec 6, 2024
c030c40
Revert "upgrade docx4j to 11.4.11"
ratiud Dec 6, 2024
08c3274
symo: enhance the support for plantuml diagrams (#120)
danielratiu Dec 10, 2024
cc32904
mpsbasics, safety: fix the doc2word tests (#121)
danielratiu Dec 10, 2024
6d79d76
pdfbox: support upstream links in PDF exports (#122)
danielratiu Dec 21, 2024
9f067f6
mpsbasics: support exporting of html snippets to pdf (#123)
danielratiu Dec 21, 2024
0f142e7
fix/restructure rcp build (#124)
danielratiu Dec 22, 2024
72a7705
gradle.build: mini fix (#125)
danielratiu Dec 22, 2024
7cdffde
tutorial.safety: enhance safety tutorial with oascf (#127)
ccarlan Dec 30, 2024
bee21f9
add plantuml support to distribution (#128)
danielratiu Jan 3, 2025
1617398
enhance SPIs and integrate into distribution (#129)
danielratiu Jan 4, 2025
e62da00
improve safety-argument-modelquery (#130)
danielratiu Jan 5, 2025
c296362
Added ODD to "New FASTEN Root Node" menu (#126)
danielratiu Jan 5, 2025
28403a9
fix rcp plugins dependency (#131)
danielratiu Jan 5, 2025
e08ecb8
cleanup odd examples (#132)
ccarlan Jan 12, 2025
3abb817
cleanup deprecated code; improved linters; updated dependency to mpsq…
danielratiu Jan 12, 2025
7f32f49
Merge remote-tracking branch 'refs/remotes/origin/maintenance/MPS-202…
ratiud Jan 12, 2025
b4d0e9d
overall: File -> Force Save All
ratiud Jan 12, 2025
be87d7d
overall: ran automated migrations
ratiud Jan 12, 2025
49941d4
gradle.lockfile: updated dependency to mpsqa
ratiud Jan 14, 2025
1cbab51
ran gradlew migrate
ratiud Jan 14, 2025
14f5d09
build.gradle: consider all files from the plugins directory when conf…
ratiud Jan 14, 2025
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
52 changes: 43 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ on:
publish:
description: Whether to publish the build result to Maven repositories
type: boolean
default: false
default: 'false'
required: false

publish_rcp:
description: Whether to publish the RCP to Github packages
type: boolean
default: 'false'
required: true
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +39,7 @@ jobs:

- name: Build
run: |
xvfb-run ./gradlew package_fasten_safety_distribution_win build_all_languages check \
xvfb-run ./gradlew build_all_languages check \
-Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}

- name: Publish test report
Expand Down Expand Up @@ -64,15 +68,15 @@ jobs:
exit 1
fi

- name: Upload distribution
uses: actions/upload-artifact@v4
with:
name: fasten-distribution-win-2024.1-${{ steps.time.outputs.time }}
path: build/distributions/fasten-2024.1-SNAPSHOT-Win-2024.1-SNAPSHOT.zip
#- name: Upload distribution
# uses: actions/upload-artifact@v4
# with:
# name: fasten-distribution-win-2023.2-${{ steps.time.outputs.time }}
# path: build/distributions/fasten-2023.2-SNAPSHOT-Win-2023.2-SNAPSHOT.zip

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

runs-on: ubuntu-latest
steps:
Expand All @@ -94,3 +98,33 @@ jobs:
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \
-Partifacts.itemis.cloud.user=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_USER }} \
-Partifacts.itemis.cloud.pw=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_PW }}

publish_rcps:
# Only publish on push (to maintenance or master) or on dispatch if requested
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_rcp == 'true' }}

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish FASTEN-Windows RCP to Github Packages
run: |
./gradlew publishFASTEN_WIN_RCPPublicationToGitHubPackagesRepository \
-Pgpr.user=${{ github.actor }} \
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \

- name: Publish FASTEN-Linux RCPs to Github Packages
run: |
./gradlew publishFASTEN_LINUX_RCPPublicationToGitHubPackagesRepository -x package_fasten_distribution_for_specific_platforms \
-Pgpr.user=${{ github.actor }} \
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \

84 changes: 64 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ plugins {
id("de.itemis.mps.gradle.common") version mpsGradlePluginVersion
}

val jbrVers = "17.0.11-b1207.30"
val jbrVers = "17.0.8.1-b1000.32"
val jbrWindowsVers = "jbr_jcef-17.0.8.1-windows-x64-b1000.32"
val jbrLinuxVers = "jbr_jcef-17.0.8.1-linux-x64-b1000.32"

downloadJbr {
jbrVersion = jbrVers
Expand Down Expand Up @@ -98,11 +100,19 @@ configurations {
dependencyLocking { lockAllConfigurations() }

repositories {
val dependencyRepositories = listOf("https://artifacts.itemis.cloud/repository/maven-mps")
val dependencyRepositories = listOf("https://artifacts.itemis.cloud/repository/maven-mps",
"https://maven.pkg.github.com/mbeddr/*")

for (repoUrl in dependencyRepositories) {
maven {
url = uri(repoUrl)

if (repoUrl.startsWith("https://maven.pkg.github.com/")) {
credentials {
username = project.property("gpr.user") as String
password = project.property("gpr.token") as String
}
}
}
}
mavenCentral()
Expand Down Expand Up @@ -153,6 +163,16 @@ val defaultScriptArgs = mapOf(

fun scriptFile(relativePath: String):File = File("$rootDir/build/scripts/patched/$relativePath")

fun unpackAndRenameJBR(archiveName : String, nameOfDirectoryInsideArchive : String, nameOfJbrDirectory : String) {
val jbrDownloadDir = jdkDir.toString() + "/../jbrDownload";
//project.delete(files("${jbrDownloadDir}"));
copy {
from(tarTree(resources.gzip(jdkDir.toString() + "/${archiveName}")))
into(jbrDownloadDir)
}
file(jbrDownloadDir + "/${nameOfDirectoryInsideArchive}").renameTo(file("${jbrDownloadDir}/${nameOfJbrDirectory}"))
}

tasks {
val configureJava by registering {
dependsOn(downloadJbr)
Expand Down Expand Up @@ -346,34 +366,48 @@ tasks {
val resolvedArtifact = configurations["jbrWin"].resolvedConfiguration.resolvedArtifacts.find { ra -> ra.file.name == filename }!!
resolvedArtifact.name + "-" + resolvedArtifact.classifier + "." + resolvedArtifact.extension
}

doLast {
unpackAndRenameJBR("jbr_jcef-windows-x64.tgz", jbrWindowsVers, "jbr_windows");
}
}

val unpackDistribution by registering(Copy::class) {
from(zipTree("$artifactsDir/com.mbeddr.formal.safetyDistribution/fasten-${version}.zip"))
into("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp")
val resolveJBR_Linux by registering(Copy::class) {
from(configurations["jbrLinux"])
into(jdkDir)
rename { filename ->
val resolvedArtifact = configurations["jbrLinux"].resolvedConfiguration.resolvedArtifacts.find { ra -> ra.file.name == filename }!!
resolvedArtifact.name + "-" + resolvedArtifact.classifier + "." + resolvedArtifact.extension
}

doLast {
unpackAndRenameJBR("jbr_jcef-linux-x64.tgz", jbrLinuxVers, "jbr_linux");
}
}

val deleteJBR by registering(Delete::class) {
dependsOn(unpackDistribution)
delete("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/fasten-${version}/jbr")
val package_fasten_distribution_for_specific_platforms by registering(BuildLanguages::class) {
dependsOn(resolveJBR_Win, resolveJBR_Linux, build_fasten_safety_distribution)
script = scriptFile("build-fasten-distribution-for-specific-platforms.xml")
}

val removeJBR by registering(Zip::class) {
dependsOn(deleteJBR)
from("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/fasten-${version}")
archiveFileName.set("fasten-${version}_with_removed_JBR.zip")
destinationDirectory.set(file("$artifactsDir/com.mbeddr.formal.safetyDistribution"))
val produce_fasten_distribution_win by registering(Zip::class) {
dependsOn(package_fasten_distribution_for_specific_platforms)
from(zipTree(artifactsDir.file("com.mbeddr.formal.safetyDistribution.platforms/fasten-${version}-Win.zip")))
destinationDirectory = artifactsDir
}

val package_fasten_safety_distribution_win by registering(Zip::class) {
dependsOn(resolveJBR_Win, build_fasten_safety_distribution, removeJBR)
archiveBaseName.set("fasten-${version}-Win")
from(zipTree("$artifactsDir/com.mbeddr.formal.safetyDistribution/fasten-${version}_with_removed_JBR.zip"))
from(tarTree("$jdkDir/jbr_jcef-windows-x64.tgz"))
val produce_fasten_distribution_linux by registering(Tar::class) {
dependsOn(package_fasten_distribution_for_specific_platforms)
compression = Compression.GZIP
from(tarTree(artifactsDir.file("com.mbeddr.formal.safetyDistribution.platforms/fasten-${version}-Linux.tar.gz")))
destinationDirectory = artifactsDir
archiveFileName = "fasten-${version}-Linux.tar.gz"
}

val build_all_languages by registering {
dependsOn(build_assurance_languages, build_formal_languages)
// as of 01.2025, all languages built by 'build_assurance_languages' are also built by 'build_formal_languages'
// commented out to avoid multiple building of the same languages
dependsOn(/*build_assurance_languages,*/ build_formal_languages)
}

assemble { dependsOn(package_formal, package_assurance) }
Expand Down Expand Up @@ -402,7 +436,7 @@ tasks {
"com.mbeddr.formal.safety",
).map { layout.projectDirectory.dir("code/languages/$it") }

val pluginRootsForMigration = listOf(mpsHomeDir.resolve("plugins"), dependenciesDir.asFile)
val pluginRootsForMigration = mpsHomeDir.listFiles()

val migrate by registering(MpsMigrate::class) {
dependsOn(resolveMps, downloadJbr, build_all_languages)
Expand Down Expand Up @@ -509,6 +543,16 @@ publishing {
}
}
}
create<MavenPublication>("FASTEN_WIN_RCP") {
groupId = "fasten"
artifactId = "win.rcp"
artifact(tasks.named("produce_fasten_distribution_win"))
}
create<MavenPublication>("FASTEN_LINUX_RCP") {
groupId = "fasten"
artifactId = "linux.rcp"
artifact(tasks.named("produce_fasten_distribution_linux"))
}
}
}

Expand Down
1 change: 1 addition & 0 deletions build/scripts/build_all_scripts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<language id="l:798100da-4f0a-421a-b991-71f8c50ce5d2:jetbrains.mps.build" />
<language id="l:0cf935df-4699-4e9c-a132-fa109541cba3:jetbrains.mps.build.mps" />
<language id="l:3600cb0a-44dd-4a5b-9968-22924406419e:jetbrains.mps.build.mps.tests" />
<language id="l:d5033cee-f632-44b6-b308-89d4fbde34ff:jetbrains.mps.build.startup" />
</uses>
<classpath>
<entry path="." />
Expand Down
17 changes: 17 additions & 0 deletions code/languages/com.fasten.symo/.mps/libraries.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLibraryManager">
<option name="libraries">
<map>
<entry key="dependencies">
<value>
<Library>
<option name="name" value="dependencies" />
<option name="path" value="${mbeddr.formal.home}/build/dependencies" />
</Library>
</value>
</entry>
</map>
</option>
</component>
</project>
4 changes: 4 additions & 0 deletions code/languages/com.fasten.symo/.mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<project version="4">
<component name="MPSProject">
<projectModules>
<modulePath path="$PROJECT_DIR$/devkits/fasten.symo.plantuml/fasten.symo.plantuml.devkit" folder="plantuml" />
<modulePath path="$PROJECT_DIR$/languages/com.fasten.symo.hw/com.fasten.symo.hw.mpl" folder="" />
<modulePath path="$PROJECT_DIR$/languages/com.symo.plantuml/com.symo.plantuml.mpl" folder="plantuml" />
<modulePath path="$PROJECT_DIR$/languages/com.symo.sysml.ibd/com.symo.sysml.ibd.mpl" folder="" />
<modulePath path="$PROJECT_DIR$/solutions/com.fasten.symo.hw.sandbox/com.fasten.symo.hw.sandbox.msd" folder="" />
<modulePath path="$PROJECT_DIR$/solutions/com.symo.plantuml.lib/com.symo.plantuml.lib.msd" folder="plantuml" />
<modulePath path="$PROJECT_DIR$/solutions/com.symo.plantuml.sandbox/com.symo.plantuml.sandbox.msd" folder="plantuml" />
<modulePath path="$PROJECT_DIR$/solutions/com.symo.sysml.ibd.sandbox/com.symo.sysml.ibd.sandbox.msd" folder="" />
</projectModules>
</component>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<dev-kit name="fasten.symo.plantuml" uuid="114acb95-50b2-4e9b-81c6-e0c665740eae">
<exported-language name="6f31bc85-cbcc-4dcf-ada4-35da43e6832c(com.symo.plantuml)" />
<exported-solutions>
<exported-solution>377bf088-4ffc-48ac-910f-fb1c66ffa60e(com.symo.plantuml.lib)</exported-solution>
</exported-solutions>
</dev-kit>

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<dependencies>
<dependency reexport="false">83ed2dfe-f724-46cc-852a-dce086daee3f(com.mbeddr.formal.base)</dependency>
<dependency reexport="true">1144260c-e9a5-49a2-9add-39a1a1a7077e(de.itemis.mps.editor.diagram.runtime)</dependency>
<dependency reexport="false">792be022-0a7a-4b28-bfd8-b1b2d347b772(com.mpsbasics.core)</dependency>
</dependencies>
<languageVersions>
<language slang="l:fa13cc63-c476-4d46-9c96-d53670abe7bc:de.itemis.mps.editor.diagram" version="1" />
Expand Down Expand Up @@ -60,6 +61,7 @@
<module reference="742f6602-5a2f-4313-aa6e-ae1cd4ffdc61(MPS.Platform)" version="0" />
<module reference="c2f3ae03-6a71-4e2a-88c9-c9e6eb4e20fa(com.fasten.symo.hw)" version="0" />
<module reference="83ed2dfe-f724-46cc-852a-dce086daee3f(com.mbeddr.formal.base)" version="0" />
<module reference="792be022-0a7a-4b28-bfd8-b1b2d347b772(com.mpsbasics.core)" version="0" />
<module reference="848ef45d-e560-4e35-853c-f35a64cc135c(de.itemis.mps.editor.celllayout.runtime)" version="0" />
<module reference="24c96a96-b7a1-4f30-82da-0f8e279a2661(de.itemis.mps.editor.celllayout.styles)" version="0" />
<module reference="7b45fa94-2707-4a1a-9e6a-ce40c4aaf35a(de.itemis.mps.editor.collapsible.runtime)" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<imports>
<import index="xnej" ref="r:bff9a19b-7e5d-44c3-8cfc-aec191022422(com.mbeddr.formal.base.editor)" />
<import index="nkm5" ref="r:095345ad-6627-42ca-9d3f-fc1b2d9fbd61(de.itemis.mps.editor.diagram.runtime.model)" />
<import index="1ks0" ref="r:3f04aa5b-eee7-48ea-a2c7-fc975c7f8656(com.mpsbasics.core.editor)" />
<import index="osta" ref="r:20be8470-9022-48a8-b125-64f3bb097af5(com.fasten.symo.hw.structure)" implicit="true" />
<import index="tpck" ref="r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)" implicit="true" />
<import index="wyt6" ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.lang(JDK/)" implicit="true" />
Expand Down Expand Up @@ -210,7 +211,7 @@
<ref role="1XX52x" to="osta:2gpUZARgYrl" resolve="PlatformArchitecture" />
<node concept="3EZMnI" id="2gpUZARgYI6" role="2wV5jI">
<node concept="PMmxH" id="2gpUZARgZ67" role="3EZMnx">
<ref role="PMmxG" to="xnej:4gtLUSMLjsp" resolve="HeaderComponent" />
<ref role="PMmxG" to="1ks0:4gtLUSMLjsp" resolve="HeaderComponent" />
</node>
<node concept="3F0ifn" id="2gpUZARgZdH" role="3EZMnx" />
<node concept="27vDVx" id="2gpUZARgZlo" role="3EZMnx">
Expand Down
Loading
Loading