Skip to content

Commit 8ef3d9e

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

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,35 @@ 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
32+
needs: build-product
833
with:
34+
skip-branch-deploy: false
935
use-display-output: true
1036
no-caching: true
1137
java-version: 17

.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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env sh
2+
3+
# Unpack linux build to get jars
4+
echo "Unpacking product"
5+
mkdir -p products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis
6+
tar -xf products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.linux.gtk.x86_64.tar.gz -C products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis
7+
echo "Finished unpacking product"
8+
9+
# Rename jars to remove date of build (only name and version should be in the name)
10+
echo "Renaming jars..."
11+
for file in products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis/plugins/*.jar; do
12+
if [ -e "$file" ]; then
13+
newname=$(echo "$file" | sed -r 's|(.*)\_([0-9]+\.[0-9]+\.[0-9]+).*$|\1\2.jar|')
14+
mv "$file" "$newname"
15+
fi
16+
done
17+
echo "Finished renaming jars!"
18+
19+
# Pack the jars into an archive
20+
echo "Repacking archive"
21+
tar -cf products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis.jars.tar.gz products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis/plugins
22+
echo "Repacked archive"
23+
24+
# Cleanup files
25+
rm -rf products/org.dataflowanalysis.product/target/deploy/DataFlowAnalysis

0 commit comments

Comments
 (0)