Skip to content

Commit 7001841

Browse files
authored
Increase logging to aid with failure debugging in nightly (#45)
* Increase logging to aid with failure debugging * Fix indentation and shell definition
1 parent 8c3cbf5 commit 7001841

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.circleci/config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,25 @@ jobs:
2323
release:
2424
type: string
2525
executor: <<parameters.os>>
26+
environment:
27+
MATLAB_LOG_DIR: /home/circleci/project/logs
28+
MW_DIAGNOSTIC_DEST: file
29+
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
30+
MW_VERBOSE_HTTPCLIENT_CORE: 1
2631
steps:
2732
- checkout
2833
- matlab/install:
2934
release: <<parameters.release>>
3035
products: Optimization_Toolbox Curve_Fitting_Toolbox
3136
- matlab/run-tests:
3237
source-folder: code
38+
- run:
39+
command: tar -cvzf matlab-logs.tar /home/circleci/project/logs
40+
when: on_fail
41+
shell: bash
42+
- store_artifacts:
43+
path: matlab-logs.tar
44+
when: on_fail
3345

3446
workflows:
3547
all-builds:

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ jobs:
1717
fail-fast: false
1818
runs-on: ${{ matrix.os }}
1919

20+
env:
21+
MATLAB_LOG_DIR: ${{ github.workspace }}/logs
22+
MW_DIAGNOSTIC_DEST: file
23+
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
24+
MW_VERBOSE_HTTPCLIENT_CORE: 1
25+
2026
steps:
2127
- name: Check out repository
2228
uses: actions/checkout@v4
@@ -31,6 +37,14 @@ jobs:
3137
uses: matlab-actions/run-tests@v2
3238
with:
3339
source-folder: code
40+
41+
- name: Upload MPM and MATLAB logs
42+
if: ${{ failure() }}
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: matlab-logs-${{ github.job }}-${{ matrix.os }}
46+
path: ${{ env.MATLAB_LOG_DIR }}
47+
if-no-files-found: ignore
3448

3549
- name: Send mail
3650
if: ${{ failure() }}

azure-pipelines-template.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,22 @@ jobs:
55
displayName: ${{ format('{0} {1}', image, release) }}
66
pool:
77
vmImage: ${{ image }}
8+
variables:
9+
MATLAB_LOG_DIR: $(Build.SourcesDirectory)/logs
10+
MW_DIAGNOSTIC_DEST: file
11+
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
12+
MW_VERBOSE_HTTPCLIENT_CORE: 1
813
steps:
914
- task: InstallMATLAB@1
1015
inputs:
1116
release: ${{ release }}
1217
products: Optimization_Toolbox Curve_Fitting_Toolbox
1318
- task: RunMATLABTests@1
1419
inputs:
15-
sourceFolder: code
20+
sourceFolder: code
21+
- task: PublishBuildArtifacts@1
22+
condition: failed()
23+
inputs:
24+
PathtoPublish: $(MATLAB_LOG_DIR)
25+
ArtifactName: matlab-logs
26+
displayName: Publish MPM and MATLAB logs

0 commit comments

Comments
 (0)