Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,30 @@ jobs:

- name: Build with Maven
run: mvn -B package --file pom.xml


- name: Copy File
run: |
mkdir MOG
cp ${{github.workspace}}/Mog_RunProvidingMoreMemory.ps1 ${{github.workspace}}/MOG/
cp ${{github.workspace}}/target/*.jar ${{github.workspace}}/MOG/

- name: Upload Jar - macOS
if: ${{ matrix.os == 'macos-latest'}}
uses: actions/upload-artifact@v2
with:
name: 'Artifacts-MacOS'
path: /Users/runner/work/MetaOmGraph/MetaOmGraph/target/*.jar
path: ${{github.workspace}}/MOG/*

- name: Upload Jar - Linux
if: ${{ matrix.os == 'ubuntu-latest'}}
uses: actions/upload-artifact@v2
with:
name: 'Artifacts-Linux'
path: /home/runner/work/MetaOmGraph/MetaOmGraph/target/*.jar

path: ${{github.workspace}}/MOG/*
- name: Upload Jar - Windows
if: ${{ matrix.os == 'windows-latest'}}
uses: actions/upload-artifact@v2
with:
name: 'Artifacts-Windows'
path: D:\a\MetaOmGraph\MetaOmGraph\target\*.jar
path: ${{github.workspace}}\MOG\*
11 changes: 11 additions & 0 deletions Mog_RunProvidingMoreMemory.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$minMemory = Read-Host -Prompt "Enter the minimum memory(RAM) MOG should use in GB (Ex: 1)"
$maxMemory = Read-Host -Prompt "Enter the maximum memory(RAM) MOG can use in GB (Ex: 4)"
$minMemory = $minMemory + 'g'
$maxMemory = $maxMemory + 'g'

$mogJarFile = Get-ChildItem -Path $PSScriptRoot -Filter *.jar | Select Name

$jarPath = Join-Path -Path $PSScriptRoot -ChildPath $mogJarFile.name

$javaRunCommand = "java -Xms" + $minMemory + " -Xmx" + $maxMemory + " -jar " + $jarPath
Invoke-Expression $javaRunCommand