Skip to content

Commit 74f26fa

Browse files
authored
Merge pull request #713 from Systems-Modeling/ST6RI-882
ST6RI-882 Automatically build KPARs for the standard library
2 parents aa410d3 + fd59099 commit 74f26fa

File tree

8 files changed

+129
-2
lines changed

8 files changed

+129
-2
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
cache: maven
3030
- name: Build with Maven
3131
run: ./mvnw -B clean verify --file pom.xml
32+
- name: Upload SysML Library .kpar files
33+
uses: actions/upload-artifact@v5
34+
with:
35+
name: sysml-library-kpar
36+
path: sysml.library/output/*.kpar
3237
- name: Publish Test Report
3338
uses: mikepenz/action-junit-report@v5
3439
if: success() || failure() # always run even if the previous step fails

.github/workflows/maven-publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,40 @@ jobs:
3131
run: ./mvnw -B deploy -DskipTests=true
3232
env:
3333
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
34+
- name: Upload SysML Library .kpar files
35+
uses: actions/upload-artifact@v5
36+
with:
37+
name: sysml-library-kpar
38+
path: sysml.library/output/*.kpar
39+
40+
release:
41+
name: Release
42+
runs-on: ubuntu-latest
43+
needs: [build]
44+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
45+
permissions:
46+
# Use to sign the release artifacts
47+
id-token: write
48+
# Used to upload release artifacts
49+
contents: write
50+
# Used to generate artifact attestation
51+
attestations: write
52+
steps:
53+
- uses: actions/download-artifact@v6
54+
with:
55+
name: sysml-library-kpar
56+
path: kpars
57+
- name: Generate artifact attestation
58+
uses: actions/attest-build-provenance@v3
59+
with:
60+
subject-path: 'kpars/*.kpar'
61+
- name: Create a release
62+
uses: softprops/action-gh-release@v2
63+
with:
64+
make_latest: true
65+
files: |
66+
kpars/*
67+
overwrite_files: false
68+
body:
69+
append_body: true
70+
name: ${{ github.event.inputs.tag_name || github.event.release.tag_name }} - SysML v2 Pilot Implementation

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ dependency-reduced-pom.xml
3535
# MacOS Finder
3636
.DS_Store
3737

38+
# Built libraries
39+
*.kpar

pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<junit.version>3.5.3</junit.version>
2929
<asciidoctor.maven.plugin.version>3.2.0</asciidoctor.maven.plugin.version>
3030
<asciidoctorj.pdf.version>2.3.19</asciidoctorj.pdf.version>
31+
<sysand-maven-plugin.version>0.0.6</sysand-maven-plugin.version>
3132
</properties>
3233

3334
<modelVersion>4.0.0</modelVersion>
@@ -293,6 +294,23 @@
293294
</execution>
294295
</executions>
295296
</plugin>
297+
298+
<plugin>
299+
<groupId>com.sensmetry</groupId>
300+
<artifactId>sysand-maven-plugin</artifactId>
301+
<version>${sysand-maven-plugin.version}</version>
302+
<executions>
303+
<execution>
304+
<goals>
305+
<goal>build-kpar</goal>
306+
</goals>
307+
</execution>
308+
</executions>
309+
<configuration>
310+
<workspacePath>${maven.multiModuleProjectDirectory}/sysml.library</workspacePath>
311+
<outputPath>${maven.multiModuleProjectDirectory}/sysml.library/output</outputPath>
312+
</configuration>
313+
</plugin>
296314
</plugins>
297315
<pluginManagement>
298316
<plugins>

sysml.library/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/bin/
2+
/output/

sysml.library/.workspace.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"projects": [
3+
{
4+
"path": "Domain Libraries/Analysis",
5+
"iris": [
6+
"urn:kpar:SysML-Analysis-Library"
7+
]
8+
},
9+
{
10+
"path": "Domain Libraries/Cause and Effect",
11+
"iris": [
12+
"urn:kpar:SysML-Cause-and-Effect-Library"
13+
]
14+
},
15+
{
16+
"path": "Domain Libraries/Geometry",
17+
"iris": [
18+
"urn:kpar:SysML-Geometry-Library"
19+
]
20+
},
21+
{
22+
"path": "Domain Libraries/Metadata",
23+
"iris": [
24+
"urn:kpar:SysML-Metadata-Library"
25+
]
26+
},
27+
{
28+
"path": "Domain Libraries/Quantities and Units",
29+
"iris": [
30+
"urn:kpar:SysML-Quantities-and-Units-Library"
31+
]
32+
},
33+
{
34+
"path": "Domain Libraries/Requirement Derivation",
35+
"iris": [
36+
"urn:kpar:SysML-Requirement-Derivation-Library"
37+
]
38+
},
39+
{
40+
"path": "Kernel Libraries/Kernel Data Type Library",
41+
"iris": [
42+
"urn:kpar:Kernel-Data-Type-Library"
43+
]
44+
},
45+
{
46+
"path": "Kernel Libraries/Kernel Function Library",
47+
"iris": [
48+
"urn:kpar:Kernel-Function-Library"
49+
]
50+
},
51+
{
52+
"path": "Kernel Libraries/Kernel Semantic Library",
53+
"iris": [
54+
"urn:kpar:Kernel-Semantic-Library"
55+
]
56+
},
57+
{
58+
"path": "Systems Library",
59+
"iris": [
60+
"urn:kpar:SysML-Systems-Library"
61+
]
62+
}
63+
]
64+
}

sysml.library/Domain Libraries/Requirement Derivation/.meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"index": {
33
"DerivationConnections": "DerivationConnections.sysml",
4-
"RequirementsDerivation": "RequirementsDerivation.sysml"
4+
"RequirementDerivation": "RequirementDerivation.sysml"
55
},
66
"created": "2025-03-13T00:00:00Z",
77
"metamodel": "https://www.omg.org/spec/SysML/20250201"

sysml.library/Systems Library/.meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"index": {
33
"Actions": "Actions.sysml",
44
"Allocations": "Allocations.sysml",
5-
"AnalysisCases": "AnalysisCase.sysml",
5+
"AnalysisCases": "AnalysisCases.sysml",
66
"Attributes": "Attributes.sysml",
77
"Calculations": "Calculations.sysml",
88
"Cases": "Cases.sysml",

0 commit comments

Comments
 (0)