File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 2424 type : string
2525 executor : <<parameters.os>>
2626 environment :
27- MATLAB_LOG_DIR : /home/circleci/project/logs
27+ MATLAB_LOG_DIR : /home/circleci/project/mw_logs
28+ MW_INSTALLER_DDUX_LOG : /home/circleci/project/mw_logs/mw_installer_ddux.log
2829 MW_DIAGNOSTIC_DEST : file
2930 MW_DIAGNOSTIC_SPEC : cppmicroservices::framework.*=all;install.*=all;
3031 MW_VERBOSE_HTTPCLIENT_CORE : 1
@@ -46,11 +47,11 @@ jobs:
4647 - matlab/run-tests :
4748 source-folder : code
4849 - run :
49- command : tar -cvzf matlab -logs.tar /home/circleci/project/logs
50+ command : tar --ignore-failed-read - cvzf mw -logs.tar /home/circleci/project/mw_logs "$TEMP"/mathworks_*.log "$TMPDIR"/mathworks_*.log /tmp/mathworks_*.log
5051 when : on_fail
5152 shell : bash
5253 - store_artifacts :
53- path : matlab -logs.tar
54+ path : mw -logs.tar
5455 when : on_fail
5556
5657workflows :
Original file line number Diff line number Diff line change 1818 runs-on : ${{ matrix.os }}
1919
2020 env :
21- MATLAB_LOG_DIR : ${{ github.workspace }}/logs
21+ MATLAB_LOG_DIR : ${{ github.workspace }}/mw_logs
22+ MW_INSTALLER_DDUX_LOG : ${{ github.workspace }}/mw_logs/mw_installer_ddux.log
2223 MW_DIAGNOSTIC_DEST : file
2324 MW_DIAGNOSTIC_SPEC : cppmicroservices::framework.*=all;install.*=all;
2425 MW_VERBOSE_HTTPCLIENT_CORE : 1
@@ -38,13 +39,24 @@ jobs:
3839 uses : matlab-actions/run-tests@v2
3940 with :
4041 source-folder : code
42+
43+ - name : Export TEMP and TMPDIR env vars for artifact upload
44+ if : ${{ failure() }}
45+ run : |
46+ echo "TEMP=$TEMP" >> $GITHUB_ENV
47+ echo "TMPDIR=$TMPDIR" >> $GITHUB_ENV
48+ shell : bash
4149
4250 - name : Upload MPM and MATLAB logs
4351 if : ${{ failure() }}
4452 uses : actions/upload-artifact@v4
4553 with :
46- name : matlab-logs-${{ github.job }}-${{ matrix.os }}
47- path : ${{ env.MATLAB_LOG_DIR }}
54+ name : mw-logs-${{ github.job }}-${{ matrix.os }}
55+ path : |
56+ ${{ env.MATLAB_LOG_DIR }}
57+ ${{ env.TEMP }}/mathworks_*.log
58+ ${{ env.TMPDIR }}/mathworks_*.log
59+ /tmp/mathworks_*.log
4860 if-no-files-found : ignore
4961
5062 - name : Send mail
Original file line number Diff line number Diff line change 66 pool :
77 vmImage : ${{ image }}
88 variables :
9- MATLAB_LOG_DIR : $(Build.SourcesDirectory)/logs
9+ MATLAB_LOG_DIR : $(Build.SourcesDirectory)/mw_logs
10+ MW_INSTALLER_DDUX_LOG : $(Build.SourcesDirectory)/mw_logs/mw_installer_ddux.log
1011 MW_DIAGNOSTIC_DEST : file
1112 MW_DIAGNOSTIC_SPEC : cppmicroservices::framework.*=all;install.*=all;
1213 MW_VERBOSE_HTTPCLIENT_CORE : 1
1920 - task : RunMATLABTests@1
2021 inputs :
2122 sourceFolder : code
23+ - bash : |
24+ mkdir -p $(Build.ArtifactStagingDirectory)/mw_logs
25+ cp -r $(MATLAB_LOG_DIR)/* $(Build.ArtifactStagingDirectory)/mw_logs/ || true
26+ cp -v /tmp/mathworks_*.log $(Build.ArtifactStagingDirectory)/mw_logs/ || true
27+ condition: failed()
28+ displayName: Gather MPM and MATLAB logs
2229 - task : PublishBuildArtifacts@1
2330 condition : failed()
2431 inputs :
25- PathtoPublish : $(MATLAB_LOG_DIR)
26- ArtifactName : matlab -logs
32+ PathtoPublish : $(Build.ArtifactStagingDirectory)/mw_logs
33+ ArtifactName : mw -logs
2734 displayName : Publish MPM and MATLAB logs
You can’t perform that action at this time.
0 commit comments