Skip to content

Commit 6889bc2

Browse files
committed
ci: add pipeline for eclipse-less jar build
1 parent 2662610 commit 6889bc2

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,31 @@ name: Build Updatesite
33
on: workflow_dispatch
44

55
jobs:
6-
DataFlowAnalysis-Product:
6+
build-product:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Repository
10+
uses: actions/checkout@v4
11+
with:
12+
submodules: true
13+
14+
- name: Set up JDK
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: 'temurin'
18+
java-version: 17
19+
- name: Setup Maven
20+
uses: stCarolas/setup-maven@v5
21+
with:
22+
maven-version: 3.9.6
23+
- name: Verify with Maven
24+
shell: bash
25+
run: mvn clean verify
26+
27+
- name: Create jar-only build
28+
shell: bash
29+
run: scripts/create-jar-only-build.sh
30+
deploy-product:
731
uses: PalladioSimulator/Palladio-Build-ActionsPipeline/.github/workflows/build.yml@master
832
with:
933
use-display-output: true

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
shell: bash
3030
run: mvn clean verify
3131

32+
- name: Create jar-only build
33+
shell: bash
34+
run: scripts/create-jar-only-build.sh
3235
- name: Add artifacts to release
3336
uses: softprops/action-gh-release@v2
3437
env:
@@ -41,3 +44,4 @@ jobs:
4144
products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.macosx.cocoa.x86_64.tar.gz
4245
products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.win32.win32.x86_64.zip
4346
products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.macosx.cocoa.aarch64.tar.gz
47+
products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.jars.tar.gz

scripts/create-jar-only-build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env sh
2+
3+
# Unpack linux build to get jars
4+
tar -xz products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.linux.gtk.x86_64.tar.gz -C products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis
5+
6+
# Rename jars to remove date of build (only name and version should be in the name)
7+
for file in products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis/plugins/*.jar; do
8+
if [ -e "$file" ]; then
9+
newname=$(echo "$file" | sed -r 's|(.*)\_([0-9]+\.[0-9]+\.[0-9]+).*$|\1\2.jar|')
10+
mv "$file" "$newname"
11+
fi
12+
done
13+
14+
# Pack the jars into an archive
15+
tar -cs products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.jars.tar.gz products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis/plugins
16+
17+
# Cleanup files
18+
rm -rf products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis

0 commit comments

Comments
 (0)