diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e4dda49..80257d2 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -36,13 +36,11 @@ jobs: - name: Generate Source run: ./genSrc.sh --tjv="${{ vars.JAVA_VERSION }}" --log="INFO" --tl=2 --bdm=200 --nt=5 --sd="programs/src/main/java" --rpc="${{ secrets.RPC_URL }}" env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} + GITHUB_ACTOR: ${{ secrets.GPR_USER }} GITHUB_TOKEN: ${{ secrets.GPR_TOKEN }} - GITHUB_SAVA_USER: ${{ secrets.GPR_USER }} - GITHUB_SAVA_TOKEN: ${{ secrets.GPR_TOKEN }} - name: Gradle Check - run: ./gradlew -PtargetJava=${{ vars.JAVA_VERSION }} check --stacktrace --no-daemon + run: ./gradlew -PtargetJava=${{ vars.JAVA_VERSION }} check --stacktrace env: GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/genSrc.sh b/genSrc.sh index 72f7ec0..6916e20 100755 --- a/genSrc.sh +++ b/genSrc.sh @@ -80,15 +80,6 @@ do fi done -javaArgs+=("-D$moduleName.baseDelayMillis=$baseDelayMillis") -javaArgs+=("-D$moduleName.basePackageName=$basePackageName") -javaArgs+=("-D$moduleName.outputModuleName=$outputModuleName") -javaArgs+=("-D$moduleName.numThreads=$numThreads") -javaArgs+=("-D$moduleName.programsCSV=$programsCSV") -javaArgs+=("-D$moduleName.rpc=$rpc") -javaArgs+=("-D$moduleName.sourceDirectory=$sourceDirectory") -javaArgs+=("-D$moduleName.tabLength=$tabLength") - javaVersion=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | grep -oEi '^[0-9]+') readonly javaVersion if [[ "$javaVersion" -ne "$targetJavaVersion" ]]; then @@ -96,36 +87,26 @@ if [[ "$javaVersion" -ne "$targetJavaVersion" ]]; then exit 3 fi -osName="$(uname)" -readonly osName -if [[ "$osName" == "Linux" ]]; then - memTotalKB=$(grep MemTotal /proc/meminfo | awk '{print $2}') - readonly memTotalKB - if (( memTotalKB < 2000000 )); then - javaArgs+=( - '-Xms128M' - '-Xmx384M' - ) - gradleArgs+=('--no-daemon') - ./gradlew --no-daemon --stop - else - javaArgs+=( - '-Xms256M' - '-Xmx1024M' - ) - fi -else - gradleArgs+=('clean') -fi - -./gradlew --no-daemon "-PmainClassName=$mainClass" "${gradleArgs[@]}" ":$projectName:jlink" - -javaArgs+=('-m' "$moduleName/$mainClass") +./gradlew --stacktrace "-PmainClassName=$mainClass" ":$projectName:jlink" vcsRef="$(git rev-parse --short HEAD)" readonly vcsRef readonly javaExe="$projectDirectory/build/$vcsRef/bin/java" +javaArgs+=("-D$moduleName.baseDelayMillis=$baseDelayMillis") +javaArgs+=("-D$moduleName.basePackageName=$basePackageName") +javaArgs+=("-D$moduleName.outputModuleName=$outputModuleName") +javaArgs+=("-D$moduleName.numThreads=$numThreads") +javaArgs+=("-D$moduleName.programsCSV=$programsCSV") +javaArgs+=("-D$moduleName.rpc=$rpc") +javaArgs+=("-D$moduleName.sourceDirectory=$sourceDirectory") +javaArgs+=("-D$moduleName.tabLength=$tabLength") +javaArgs+=( + '-Xms256M' + '-Xmx1024M' +) +javaArgs+=('-m' "$moduleName/$mainClass") + if [[ "$screen" == 0 ]]; then set -x "$javaExe" "${javaArgs[@]}"