Modify testing and fix link in README #3
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 Build | |
| # Controls when the action will run. | |
| on: | |
| push: | |
| branches: [ release ] | |
| pull_request: | |
| branches: [ release ] | |
| workflow_dispatch: | |
| # Add permission to write GitHub pages | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| MATLABVersion: [R2024b,R2025a,R2025b] | |
| runs-on: ubuntu-latest | |
| env: | |
| LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
| steps: | |
| # Checks-out your repository | |
| - uses: actions/checkout@v4 | |
| # Sets up a display server | |
| - name: Start display server | |
| if: ${{ always() }} | |
| run: | | |
| sudo apt-get install xvfb | |
| Xvfb :99 & | |
| echo "DISPLAY=:99" >> $GITHUB_ENV | |
| # Sets up MATLAB | |
| - name: Setup MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| release: ${{ matrix.MATLABVersion }} | |
| products: Symbolic_Math_Toolbox | |
| cache: true | |
| # Run all the tests | |
| - name: Run SmokeTests | |
| uses: matlab-actions/run-command@v2 | |
| with: | |
| command: openProject(pwd); RunAllTests; | |
| # Upload the test results as artifact | |
| - name: Upload TestResults | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TestResults_${{ matrix.MATLABVersion }} | |
| path: ./public/* | |
| overwrite: true | |
| badge: | |
| if: ${{ always() }} | |
| needs: [test] | |
| strategy: | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks-out your repository | |
| - uses: actions/checkout@v4 | |
| # Sets latest MATLAB | |
| - name: Setup MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| release: latest | |
| # Download the test results from artifact | |
| - name: Download All TestResults | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: public | |
| pattern: TestResults_* | |
| merge-multiple: true | |
| # Create the test results badge | |
| - name: Run PostSmokeTest | |
| uses: matlab-actions/run-command@v2 | |
| with: | |
| command: openProject(pwd); PostSmokeTest; | |
| # Upload the badege as artifact | |
| - name: Upload Badge | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Badge-Artifact | |
| path: ./public/TestedWith.json | |
| overwrite: true | |
| # Deploy reports to GitHub pages | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: public | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |