diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b03fb1b8..0b0642a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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\* diff --git a/Mog_RunProvidingMoreMemory.ps1 b/Mog_RunProvidingMoreMemory.ps1 new file mode 100644 index 00000000..f21ba53d --- /dev/null +++ b/Mog_RunProvidingMoreMemory.ps1 @@ -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 \ No newline at end of file