Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ jobs:
machine:
image: ubuntu-2204:current
environment:
MATLAB_LOG_DIR: /home/circleci/project/logs
MATLAB_LOG_DIR: /home/circleci/project/mw_logs
MW_INSTALLER_DDUX_LOG: /home/circleci/project/mw_logs/mw_installer_ddux.log
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
Expand All @@ -23,10 +24,10 @@ jobs:
- matlab/run-tests:
source-folder: code
- run:
command: tar -cvzf matlab-logs.tar /home/circleci/project/logs
command: tar --ignore-failed-read -cvzf mw-logs.tar /home/circleci/project/mw_logs /tmp/mathworks_*.log
when: on_fail
- store_artifacts:
path: matlab-logs.tar
- store_artifacts:
path: mw-logs.tar
when: on_fail

# As an alternative to run-tests, you can use run-command to execute a MATLAB script, function, or statement.
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
runs-on: ${{ matrix.os }}

env:
MATLAB_LOG_DIR: ${{ github.workspace }}/logs
MATLAB_LOG_DIR: ${{ github.workspace }}/mw_logs
MW_INSTALLER_DDUX_LOG: ${{ github.workspace }}/mw_logs/mw_installer_ddux.log
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
Expand All @@ -83,12 +84,23 @@ jobs:
with:
source-folder: code

- name: Export TEMP and TMPDIR env vars for artifact upload
if: ${{ failure() }}
run: |
echo "TEMP=$TEMP" >> $GITHUB_ENV
echo "TMPDIR=$TMPDIR" >> $GITHUB_ENV
shell: bash

- 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 }}
name: mw-logs-${{ github.job }}-${{ matrix.os }}
path: |
${{ env.MATLAB_LOG_DIR }}
${{ env.TEMP }}/mathworks_*.log
${{ env.TMPDIR }}/mathworks_*.log
/tmp/mathworks_*.log
if-no-files-found: ignore

- name: Send mail
Expand All @@ -115,7 +127,8 @@ jobs:
runs-on: ${{ matrix.os }}

env:
MATLAB_LOG_DIR: ${{ github.workspace }}/logs
MATLAB_LOG_DIR: ${{ github.workspace }}/mw_logs
MW_INSTALLER_DDUX_LOG: ${{ github.workspace }}/mw_logs/mw_installer_ddux.log
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
Expand All @@ -139,12 +152,23 @@ jobs:
with:
source-folder: code

- name: Export TEMP and TMPDIR env vars for artifact upload
if: ${{ failure() }}
run: |
echo "TEMP=$TEMP" >> $GITHUB_ENV
echo "TMPDIR=$TMPDIR" >> $GITHUB_ENV
shell: bash

- 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 }}
name: mw-logs-${{ github.job }}-${{ matrix.os }}
path: |
${{ env.MATLAB_LOG_DIR }}
${{ env.TEMP }}/mathworks_*.log
${{ env.TMPDIR }}/mathworks_*.log
/tmp/mathworks_*.log
if-no-files-found: ignore

- name: Send mail
Expand Down
13 changes: 10 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pool:
vmImage: ubuntu-latest
variables:
MATLAB_LOG_DIR: $(Build.SourcesDirectory)/logs
MATLAB_LOG_DIR: $(Build.SourcesDirectory)/mw_logs
MW_INSTALLER_DDUX_LOG: $(Build.SourcesDirectory)/mw_logs/mw_installer_ddux.log
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
Expand All @@ -26,11 +27,17 @@ steps:
codeCoverageTool: Cobertura
summaryFileLocation: code-coverage/coverage.xml
pathToSources: code/
- bash: |
mkdir -p $(Build.ArtifactStagingDirectory)/mw_logs
cp -r $(MATLAB_LOG_DIR)/* $(Build.ArtifactStagingDirectory)/mw_logs/ || true
cp -v /tmp/mathworks_*.log $(Build.ArtifactStagingDirectory)/mw_logs/ || true
condition: failed()
displayName: Gather MPM and MATLAB logs
- task: PublishBuildArtifacts@1
condition: failed()
inputs:
PathtoPublish: $(MATLAB_LOG_DIR)
ArtifactName: matlab-logs
PathtoPublish: $(Build.ArtifactStagingDirectory)/mw_logs
ArtifactName: mw-logs
displayName: Publish MPM and MATLAB logs

# As an alternative to RunMATLABTests, you can use RunMATLABCommand to execute a MATLAB script, function, or statement.
Expand Down
Loading