forked from urmi-21/MetaOmGraph
-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (79 loc) · 4.72 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#CI to test MOG build
#Contributor Sumanth
name: Maven CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Downloading l2f-prod-common-all zip file
run: curl -O http://www.java2s.com/Code/JarDownload/l2fprod/l2fprod-common-all.jar.zip
- name: Extracting jar file
run: unzip l2fprod-common-all.jar.zip
- name: Installing l2f-prod-common-all dependency
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: mvn install:install-file -Dfile=l2fprod-common-all.jar -DgroupId=com.l2fprod -DartifactId=l2fprod-common-all -Dversion=0.1 -Dpackaging=jar -DgeneratePom=true
- name: Installing l2f-prod-common-all dependency windows
if: ${{ matrix.os == 'windows-latest' }}
run: mvn install:install-file `-Dfile=l2fprod-common-all.jar `-DgroupId=com.l2fprod `-DartifactId=l2fprod-common-all `-Dversion=0.1 `-Dpackaging=jar `-DgeneratePom=true
- name: Installing CustomBrowserLauncher dependency
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: mvn install:install-file -Dfile=src/lib/CustomBrowserLauncher.jar -DgroupId=edu.iastate.metnet -DartifactId=custombrowserlauncher -Dversion=0.0.1 -Dpackaging=jar -DgeneratePom=true
- name: Installing CustomBrowserLauncher dependency windows
if: ${{ matrix.os == 'windows-latest'}}
run: mvn install:install-file `-Dfile=src/lib/CustomBrowserLauncher.jar `-DgroupId=edu.iastate.metnet `-DartifactId=custombrowserlauncher `-Dversion=0.0.1 `-Dpackaging=jar `-DgeneratePom=true
- name: Downloading hierarchical-clustering zip file
run: curl -LJO https://github.com/lbehnke/hierarchical-clustering-java/releases/download/v1.2.0/hierarchical-clustering-1.2.0.jar
- name: Installing hierarchical-clustering dependency
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: mvn install:install-file -Dfile=hierarchical-clustering-1.2.0.jar -DgroupId=com.apporiented -DartifactId=hierarchical-clustering -Dversion=1.2.0 -Dpackaging=jar -DgeneratePom=true
- name: Installing hierarchical-clustering dependency windows
if: ${{ matrix.os == 'windows-latest' }}
run: mvn install:install-file `-Dfile=hierarchical-clustering-1.2.0.jar `-DgroupId=com.apporiented `-DartifactId=hierarchical-clustering `-Dversion=1.2.0 `-Dpackaging=jar `-DgeneratePom=true
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Package macOS
if: ${{ matrix.os == 'macos-latest'}}
run: $JAVA_HOME/bin/jpackage --input target/ --dest installer --app-version 2.0 --name MetaOmGraph --main-jar metaomgraph.jar --main-class edu.iastate.metnet.metaomgraph.MetaOmGraph --icon src/resource/MetaOmGraph.icns --type pkg --java-options '-Xms32g --enable-preview'
- name: Package Linux
if: ${{ matrix.os == 'ubuntu-latest'}}
run: $JAVA_HOME/bin/jpackage --input target/ --dest installer --app-version 2.0 --name MetaOmGraph --main-jar metaomgraph.jar --main-class edu.iastate.metnet.metaomgraph.MetaOmGraph --icon src/resource/MetaOmGraph.icns --type deb --java-options '-Xms32g --enable-preview'
- name: Package Windows
if: ${{ matrix.os == 'windows-latest'}}
run: "C:\\hostedtoolcache\\windows\\jdk\\15.0.7\\x64\\bin\\jpackage --input target\\ --dest installer --app-version 2.0 --name MetaOmGraph --main-jar metaomgraph.jar --main-class edu.iastate.metnet.metaomgraph.MetaOmGraph --icon src\\resource\\MetaOmGraph.icns --type msi --java-options '-Xms32g --enable-preview'"
- name: Upload installer - macOS
if: ${{ matrix.os == 'macos-latest'}}
uses: actions/upload-artifact@v2
with:
name: 'Artifacts-MacOS'
path: /Users/runner/work/MetaOmGraph/MetaOmGraph/installer/*.pkg
- name: Upload installer - Linux
if: ${{ matrix.os == 'ubuntu-latest'}}
uses: actions/upload-artifact@v2
with:
name: 'Artifacts-Linux'
path: /home/runner/work/MetaOmGraph/MetaOmGraph/installer/*.deb
- name: Upload installer - Windows
if: ${{ matrix.os == 'windows-latest'}}
uses: actions/upload-artifact@v2
with:
name: 'Artifacts-Windows'
path: D:\a\MetaOmGraph\MetaOmGraph\installer\*.msi