Skip to content

Commit 5695df0

Browse files
committed
ci: upload log for certain tests
1 parent 75a0458 commit 5695df0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
timeout-minutes: 15
2222
runs-on: ${{ matrix.os }}
2323

24-
# R2022b and older has a runner-only (not real computer) path bug where it looks inside example/java despite not being told to
2524
strategy:
2625
fail-fast: false
2726
matrix:

.github/workflows/composite-buildtool/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,26 @@ runs:
2424
if: ${{ matrix.release >= 'R2023a' || startsWith(matrix.release, 'latest') }}
2525
uses: matlab-actions/run-build@v2
2626
with:
27-
startup-options: ${{ matrix.startup-options }}
27+
startup-options: ${{ matrix.startup-options }} -logfile ${{ matrix.release }}-${{ runner.os }}-test.log
2828
tasks: mex test
2929

3030

31+
# note: "source-folder" is necessary, but watch out as it adds all subfolders to path too
32+
# https://github.com/matlab-actions/run-tests?tab=readme-ov-file#run-matlab-tests
3133
- name: Run tests (manual)
3234
if: ${{ matrix.release < 'R2023a' && !startsWith(matrix.release, 'latest') }}
3335
uses: matlab-actions/run-tests@v2
3436
with:
3537
source-folder: ${{ github.workspace }}
3638
select-by-folder: test
3739
strict: false
40+
startup-options: -logfile ${{ matrix.release }}-${{ runner.os }}-test.log
41+
42+
43+
- name: upload logfile
44+
if: ${{ hashFiles(matrix.release-runner.os-test.log) != '' }}
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: ${{ matrix.release }}-${{ runner.os }}-test-log
48+
path: ${{ matrix.release }}-${{ runner.os }}-test.log
49+
retention-days: 1

0 commit comments

Comments
 (0)