Only set --stacktrace --info if verbose logging is enabled (#1557)

This is a quality-of-life improvement; make our build logs more easy to
read through for the default case.

If we need more information, we can click on the "Enable debug logging"
checkbox when re-running a job, which then populates the `runner.debug`
context variable.
This commit is contained in:
Daniel Chao
2026-04-24 15:28:57 -07:00
committed by GitHub
parent e07ff96de8
commit 87b15f7a70
6 changed files with 172 additions and 86 deletions
+34 -17
View File
@@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -32,7 +33,7 @@ jobs:
with: {}
- name: check
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true check
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true check
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
@@ -51,6 +52,7 @@ jobs:
env:
LANG: en_US.UTF-8
JAVA_HOME: /jdk
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -65,7 +67,7 @@ jobs:
with: {}
- name: check
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true check
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true check
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
@@ -83,6 +85,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -96,11 +99,12 @@ jobs:
with: {}
- name: bench:jmh
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true bench:jmh
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true bench:jmh
gradle-compatibility:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -115,7 +119,7 @@ jobs:
with: {}
- name: :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
@@ -133,6 +137,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -150,7 +155,7 @@ jobs:
persist-credentials: false
- name: gradle build java executables
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-doc:build pkl-cli:build pkl-codegen-java:build pkl-codegen-kotlin:build
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-doc:build pkl-cli:build pkl-codegen-java:build pkl-codegen-kotlin:build
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -176,6 +181,7 @@ jobs:
- macos
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -189,7 +195,7 @@ jobs:
with: {}
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 "-Dpkl.native--native-compiler-path=${GITHUB_WORKSPACE}/.github/scripts/cc_macos_amd64.sh" pkl-cli:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 "-Dpkl.native--native-compiler-path=${GITHUB_WORKSPACE}/.github/scripts/cc_macos_amd64.sh" pkl-cli:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -212,6 +218,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- name: Install deps
run: dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en
@@ -229,7 +236,7 @@ jobs:
run: git status || git config --system --add safe.directory "$GITHUB_WORKSPACE"
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -257,6 +264,7 @@ jobs:
- macos
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -270,7 +278,7 @@ jobs:
with: {}
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -293,6 +301,7 @@ jobs:
runs-on: ubuntu-24.04-arm
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- name: Install deps
run: dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en
@@ -310,7 +319,7 @@ jobs:
run: git status || git config --system --add safe.directory "$GITHUB_WORKSPACE"
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -335,6 +344,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -421,7 +431,7 @@ jobs:
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -445,6 +455,7 @@ jobs:
env:
LANG: en_US.UTF-8
JAVA_HOME: /jdk
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -458,7 +469,7 @@ jobs:
with: {}
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-cli:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -484,6 +495,7 @@ jobs:
- macos
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -497,7 +509,7 @@ jobs:
with: {}
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 "-Dpkl.native--native-compiler-path=${GITHUB_WORKSPACE}/.github/scripts/cc_macos_amd64.sh" pkl-doc:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 "-Dpkl.native--native-compiler-path=${GITHUB_WORKSPACE}/.github/scripts/cc_macos_amd64.sh" pkl-doc:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -520,6 +532,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- name: Install deps
run: dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en
@@ -537,7 +550,7 @@ jobs:
run: git status || git config --system --add safe.directory "$GITHUB_WORKSPACE"
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -565,6 +578,7 @@ jobs:
- macos
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -578,7 +592,7 @@ jobs:
with: {}
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -601,6 +615,7 @@ jobs:
runs-on: ubuntu-24.04-arm
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- name: Install deps
run: dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en
@@ -618,7 +633,7 @@ jobs:
run: git status || git config --system --add safe.directory "$GITHUB_WORKSPACE"
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -643,6 +658,7 @@ jobs:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -729,7 +745,7 @@ jobs:
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
@@ -753,6 +769,7 @@ jobs:
env:
LANG: en_US.UTF-8
JAVA_HOME: /jdk
DEBUG_ARGS: ${{ case(runner.debug == '1', '--info --stacktrace', '') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
@@ -766,7 +783,7 @@ jobs:
with: {}
- name: gradle buildNative
shell: bash
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
run: ./gradlew $DEBUG_ARGS --no-daemon -DpklMultiJdkTesting=true pkl-doc:buildNative
- name: Upload executable artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with: