Debug #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Debug parfor Errors | |
run-name: Debug | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
jobs: | |
compatability: | |
name: Legacy & OS Compatability Syntax Tests | |
strategy: | |
matrix: | |
platform: [macos-latest] | |
release: [R2023a] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
release: ${{matrix.release}} | |
products: Signal_Processing_Toolbox Parallel_Computing_Toolbox | |
- name: Run Tests on Legacy version | |
uses: matlab-actions/run-command@v2 | |
with: | |
command: | | |
clogdir = fullfile(pwd, 'logs','client'), | |
wlogdir = fullfile(pwd, 'logs','workers'), | |
mkdir(clogdir); | |
mkdir(wlogdir); | |
parallel.internal.logging.enableClientLogging(clogdir, 6) | |
setSchedulerMessageHandler(@disp); | |
setenv('MDCE_DEBUG','true'); | |
try pctconfig('preservejobs',true); catch ME, disp(ME), end | |
try parpool local; catch ME, disp(ME), end | |
setup cache; addpath build; | |
res = runProjectTests("verbosity", "Verbose"), | |
i = find([res.Failed]); res(i).Name, | |
rep = arrayfun(@(r) r.Details.DiagnosticRecord.Report, res(i), 'UniformOutput', false); | |
rep{:} | |
c = parcluster('local'), | |
fld = c.JobStorageLocation, | |
fls = dir(fullfile(fld,'**','*log*')); | |
fls = string(fullfile({fls.folder}, {fls.name})); | |
arrayfun(@(s) copyfile(s, wlogdir), fls); | |
- name: Upload Logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Logs-${{runner.os}} | |
path: logs/ | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
timeout-minutes: 15 | |