From a54d2b5a7c189823b2030c0a56a05dfb97b9d10a Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 9 Jul 2024 15:05:21 -0500 Subject: [PATCH 1/6] Use ACTIONS_RUNNER_DEBUG for diagnostics flag --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12bccde0..e0e8f8cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ on: env: DOTNET_VERSION: ${{ '8.0.201' }} - ENABLE_DIAGNOSTICS: true + ENABLE_DIAGNOSTICS: ${{ env.ACTIONS_RUNNER_DEBUG }} MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log From aa91144806e96b61b8e4ee1b079d624bf8e31000 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 9 Jul 2024 17:09:11 -0500 Subject: [PATCH 2/6] Use github instead of env for ACTIONS_RUNNER_DEBUG flag --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0e8f8cf..e9461766 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ on: env: DOTNET_VERSION: ${{ '8.0.201' }} - ENABLE_DIAGNOSTICS: ${{ env.ACTIONS_RUNNER_DEBUG }} + ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_RUNNER_DEBUG }} MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log From 2f3e626fefed87fd627cf184715b6abd0e3de23d Mon Sep 17 00:00:00 2001 From: "Michael Hawker MSFT (XAML Llama)" <24302614+michael-hawker@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:55:51 -0700 Subject: [PATCH 3/6] Update .github/workflows/build.yml Co-authored-by: Arlo --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9461766..7110a865 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,8 @@ on: env: DOTNET_VERSION: ${{ '8.0.201' }} + # Debug logging enabled via GitHub UI during reruns or set as repo secret. + # See also https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_RUNNER_DEBUG }} MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 From 0b50ad70a44c4ae5354411a61888d569171b9bf1 Mon Sep 17 00:00:00 2001 From: Arlo Date: Thu, 11 Jul 2024 14:24:07 -0500 Subject: [PATCH 4/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7110a865..6e42e434 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ env: DOTNET_VERSION: ${{ '8.0.201' }} # Debug logging enabled via GitHub UI during reruns or set as repo secret. # See also https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging - ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_RUNNER_DEBUG }} + ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_STEP_DEBUG }} MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log From f4653a2ea03cf181dedddebad8b67a24836e13a2 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 24 Jul 2024 18:50:00 -0500 Subject: [PATCH 5/6] Use runner.debug flag for diagnostics --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e42e434..4f9ee19c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ env: DOTNET_VERSION: ${{ '8.0.201' }} # Debug logging enabled via GitHub UI during reruns or set as repo secret. # See also https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging - ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_STEP_DEBUG }} + ENABLE_DIAGNOSTICS: ${{ runner.debug }} MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log From 08318c15bbb2b665aca050ae6377b5ec6ab2efcc Mon Sep 17 00:00:00 2001 From: Arlo Date: Sat, 4 Jan 2025 00:33:56 +0000 Subject: [PATCH 6/6] Use ACTIONS_RUNNER_DEBUG instead of ENABLE_DIAGNOSTICS --- .github/workflows/build.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5b6a945..e5efe9f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,6 @@ on: env: DOTNET_VERSION: ${{ '9.0.x' }} - ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log @@ -83,7 +82,7 @@ jobs: disk-root: "C:" - name: Enable User-Mode Dumps collecting - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }} + if: ${{ env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '' }} shell: powershell run: | New-Item '${{ github.workspace }}\CrashDumps' -Type Directory @@ -97,7 +96,7 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: .NET Info (if diagnostics) - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + if: ${{ env.ACTIONS_RUNNER_DEBUG == 'true' }} run: dotnet --info # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -131,7 +130,7 @@ jobs: # Generate full solution with all projects (sample gallery heads, components, tests) - name: Generate solution with ${{ matrix.multitarget }} gallery, components and tests working-directory: ./ - run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop + run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ACTIONS_RUNNER_DEBUG == 'true' && ' -UseDiagnostics' || '' }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop # Build solution - name: MSBuild @@ -139,7 +138,7 @@ jobs: msbuild.exe /restore /nowarn:MSB4011 /p:Configuration=Release /m - ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} + ${{ env.ACTIONS_RUNNER_DEBUG == 'true' && '/bl' || '' }} /v:${{ env.MSBUILD_VERBOSITY }} CommunityToolkit.AllComponents.sln @@ -168,14 +167,14 @@ jobs: - name: Artifact - Diagnostic Logs uses: actions/upload-artifact@v4 - if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + if: ${{ (env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: build-logs-${{ matrix.multitarget }}-winui${{ matrix.winui }} path: ./**/*.*log - name: Artifact - ILC Repro uses: actions/upload-artifact@v4 - if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + if: ${{ (env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: ilc-repro path: ./*.zip @@ -190,13 +189,13 @@ jobs: - name: Artifact - WER crash dumps uses: actions/upload-artifact@v4 - if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + if: ${{ (env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: CrashDumps-${{ matrix.multitarget }}-winui${{ matrix.winui }} path: '${{ github.workspace }}/CrashDumps' - name: Analyze Dump - if: ${{ steps.detect-dump.outputs.DUMP_FILE != '' && (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + if: ${{ steps.detect-dump.outputs.DUMP_FILE != '' && (env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '') && always() }} run: | dotnet tool install --global dotnet-dump dotnet-dump analyze ${{ steps.detect-dump.outputs.DUMP_FILE }} -c "clrstack" -c "pe -lines" -c "exit" @@ -219,7 +218,7 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: .NET Info (if diagnostics) - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + if: ${{ env.ACTIONS_RUNNER_DEBUG == 'true' }} run: dotnet --info # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -273,7 +272,7 @@ jobs: # Build and pack component nupkg - name: Build and pack component packages - run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release + run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ACTIONS_RUNNER_DEBUG == 'true' && '-EnableBinlogs' || '' }} ${{ env.ACTIONS_RUNNER_DEBUG == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release # Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config) - name: Push Pull Request Packages (if not fork) @@ -305,7 +304,7 @@ jobs: - name: Artifact - Diagnostic Logs uses: actions/upload-artifact@v4 - if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + if: ${{ (env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: build-logs-winui${{ matrix.winui }} path: ./*.*log @@ -417,7 +416,7 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: .NET Info (if diagnostics) - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + if: ${{ env.ACTIONS_RUNNER_DEBUG == 'true' }} run: dotnet --info # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -438,7 +437,7 @@ jobs: - name: Generate solution shell: pwsh working-directory: ./ - run: ./tooling/GenerateAllSolution.ps1${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} + run: ./tooling/GenerateAllSolution.ps1${{ env.ACTIONS_RUNNER_DEBUG == 'true' && ' -UseDiagnostics' || '' }} - name: Install ninja for WASM native dependencies run: sudo apt-get install ninja-build @@ -453,7 +452,7 @@ jobs: - name: Artifact - Diagnostic Logs uses: actions/upload-artifact@v4 - if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + if: ${{ (env.ACTIONS_RUNNER_DEBUG == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: linux-logs path: ./**/*.*log