Fix for MSVC ambiguity issue #47
This file contains hidden or 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: MATLAB | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: {} | |
| env: | |
| MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }} | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v3 | |
| with: | |
| release: latest | |
| cache: true | |
| - name: Run MATLAB build | |
| uses: matlab-actions/run-build@v3 | |
| with: | |
| tasks: test | |
| - name: Upload MEX binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mex-${{ runner.os }} | |
| path: toolbox/derived/ | |
| - name: Upload coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-${{ matrix.os }}-latest | |
| path: coverage/ | |
| if-no-files-found: error | |
| compatibility-test: | |
| runs-on: ${{ matrix.os }} | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| # macos-latest is ARM; R2022b predates Apple Silicon support (R2023b+). | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download MEX binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mex-${{ runner.os }} | |
| path: toolbox/derived/ | |
| - name: Mark MEX binaries as current | |
| shell: bash | |
| run: touch toolbox/derived/* | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v3 | |
| with: | |
| release: R2022b | |
| cache: true | |
| - name: Run MATLAB build | |
| uses: matlab-actions/run-build@v3 | |
| with: | |
| tasks: test | |
| - name: Upload coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-${{ matrix.os }}-R2022b | |
| path: coverage/ | |
| if-no-files-found: error | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: [test, compatibility-test] | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all coverage artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: coverage-* | |
| path: coverage-reports/ | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v3 | |
| with: | |
| release: latest | |
| cache: true | |
| - name: Merge coverage reports | |
| uses: matlab-actions/run-command@v3 | |
| with: | |
| command: | | |
| addpath("buildUtilities"); | |
| mergeCoverageReports("coverage-reports", "coverage-combined/summary.md"); | |
| - name: Write summary to job page | |
| run: cat coverage-combined/summary.md >> "$GITHUB_STEP_SUMMARY" | |
| package: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download MEX binaries (all platforms) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: mex-* | |
| path: toolbox/derived/ | |
| merge-multiple: true | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v3 | |
| with: | |
| release: latest | |
| cache: true | |
| - name: Build toolbox | |
| uses: matlab-actions/run-build@v3 | |
| with: | |
| tasks: mltbx | |
| - name: Upload toolbox artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MATLAB_Toolbox_for_TOML_and_YAML.mltbx | |
| path: release/MATLAB_Toolbox_for_TOML_and_YAML.mltbx |