Skip to content

Commit

Permalink
Increase logging to aid with failure debugging in nightly (#45)
Browse files Browse the repository at this point in the history
* Increase logging to aid with failure debugging

* Fix indentation and shell definition
  • Loading branch information
mcafaro authored Nov 4, 2024
1 parent 8c3cbf5 commit 7001841
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@ jobs:
release:
type: string
executor: <<parameters.os>>
environment:
MATLAB_LOG_DIR: /home/circleci/project/logs
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
steps:
- checkout
- matlab/install:
release: <<parameters.release>>
products: Optimization_Toolbox Curve_Fitting_Toolbox
- matlab/run-tests:
source-folder: code
- run:
command: tar -cvzf matlab-logs.tar /home/circleci/project/logs
when: on_fail
shell: bash
- store_artifacts:
path: matlab-logs.tar
when: on_fail

workflows:
all-builds:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}

env:
MATLAB_LOG_DIR: ${{ github.workspace }}/logs
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1

steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -31,6 +37,14 @@ jobs:
uses: matlab-actions/run-tests@v2
with:
source-folder: code

- name: Upload MPM and MATLAB logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: matlab-logs-${{ github.job }}-${{ matrix.os }}
path: ${{ env.MATLAB_LOG_DIR }}
if-no-files-found: ignore

- name: Send mail
if: ${{ failure() }}
Expand Down
13 changes: 12 additions & 1 deletion azure-pipelines-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ jobs:
displayName: ${{ format('{0} {1}', image, release) }}
pool:
vmImage: ${{ image }}
variables:
MATLAB_LOG_DIR: $(Build.SourcesDirectory)/logs
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
steps:
- task: InstallMATLAB@1
inputs:
release: ${{ release }}
products: Optimization_Toolbox Curve_Fitting_Toolbox
- task: RunMATLABTests@1
inputs:
sourceFolder: code
sourceFolder: code
- task: PublishBuildArtifacts@1
condition: failed()
inputs:
PathtoPublish: $(MATLAB_LOG_DIR)
ArtifactName: matlab-logs
displayName: Publish MPM and MATLAB logs

0 comments on commit 7001841

Please sign in to comment.