File tree Expand file tree Collapse file tree 4 files changed +41
-32
lines changed
.github/workflows/composite-buildtool Expand file tree Collapse file tree 4 files changed +41
-32
lines changed Original file line number Diff line number Diff line change @@ -13,18 +13,32 @@ runs:
1313 startup-options : ${{ matrix.startup-options }}
1414 tasks : check
1515
16- - name : Test task
17- if : ${{ matrix.release >= 'R2022b' || startsWith( matrix.release, 'latest') }}
16+ - name : Legacy Mex Test
17+ if : ${{ matrix.release >= 'R2022b' && matrix.release < 'R2024b' }}
1818 uses : matlab-actions/run-build@v2
1919 with :
2020 startup-options : ${{ matrix.startup-options }}
21- tasks : test
21+ tasks : legacyMex test
2222
23+ - name : Non-Mex Test
24+ if : ${{ matrix.release >= 'R2024b' || startsWith(matrix.release, 'latest') }}
25+ uses : matlab-actions/run-build@v2
26+ with :
27+ startup-options : ${{ matrix.startup-options }}
28+ tasks : test
2329
24- - name : Run tests (manual)
25- if : ${{ matrix.release < 'R2022b' && ! startsWith(matrix.release, 'latest') }}
26- uses : matlab-actions/run-tests @v2
30+ - name : Mex Group Test
31+ if : ${{ matrix.release >= 'R2024b' || startsWith(matrix.release, 'latest') }}
32+ uses : matlab-actions/run-build @v2
2733 with :
28- source-folder : ${{ github.workspace }}
29- select-by-folder : test
30- strict : true
34+ startup-options : ${{ matrix.startup-options }}
35+ tasks : mex test
36+
37+
38+ # - name: Run tests (manual)
39+ # if: ${{ matrix.release < 'R2022b' && !startsWith(matrix.release, 'latest') }}
40+ # uses: matlab-actions/run-tests@v2
41+ # with:
42+ # source-folder: ${{ github.workspace }}
43+ # select-by-folder: test
44+ # strict: true
Original file line number Diff line number Diff line change 99 plan(" check" ) = matlab .buildtool .tasks .CodeIssuesTask(pkg_name , IncludeSubfolders= true );
1010end
1111
12- if isMATLABReleaseOlderThan(" R2024b" )
13- plan(" test" ).Dependencies = " legacyMex" ;
14- else
12+ if ~isMATLABReleaseOlderThan(" R2024b" )
1513
16- plan(" test" ).Dependencies = " mex" ;
1714 plan(" clean" ) = matlab .buildtool .tasks .CleanTask ;
1815
1916 [compiler_id , compiler_opt ] = get_compiler_options();
Original file line number Diff line number Diff line change 33 top (1 ,1 ) string % package directory
44end
55
6- %% source C++
6+ win = " " ;
7+ if ispc
8+ win = fullfile(top , " src/windows.cpp" );
9+ end
10+
11+ mac = fullfile(top , " src/macos.cpp" );
712
8- % Matlab and Java don't have these functions
913srcs = {fullfile(top , " src/is_char_device.cpp" ), ...
1014 fullfile(top , " src/set_permissions.cpp" ), ...
11- fullfile(top , " src/is_rosetta.cpp" ), ...
15+ [fullfile(top , " src/is_rosetta.cpp" ), mac ], ...
16+ [fullfile(top , " src/windows_shortname.cpp" ), win ]
1217};
1318
14- s = fullfile(top , " src/windows_shortname.cpp" );
15- if ispc
16- s(end + 1 ) = fullfile(top , " src/windows.cpp" );
17- end
18- srcs{end + 1 } = s ;
19-
20-
21- % isSymbolicLink() new in R2024b
19+ %% isSymbolicLink() new in R2024b
2220if ~isMATLABReleaseOlderThan(" R2024b" )
23-
24- s = fullfile(top , " src/is_symlink.cpp" );
25- if ispc
26- s(end + 1 ) = fullfile(top , " src/windows.cpp" );
27- end
28- srcs{end + 1 } = s ;
29-
21+ srcs{end + 1 } = [fullfile(top , " src/is_symlink.cpp" ), win ];
3022end
3123
3224end
Original file line number Diff line number Diff line change 33methods (Test )
44
55function test_is_char_device(tc )
6- % /dev/stdin may not be available on CI systems
6+ import matlab .unittest .fixtures .CurrentFolderFixture
7+
8+ tc .applyFixture(CurrentFolderFixture(" .." ))
9+ % matlab exist() doesn't work for MEX detection with ".." leading path
710
11+ tc .assumeEqual(exist(" +stdlib/is_char_device" , " file" ), 3 )
12+
13+ % /dev/stdin may not be available on CI systems
814if ispc
915 n = " NUL" ;
1016else
You can’t perform that action at this time.
0 commit comments