Skip to content

Commit

Permalink
Update structure and testing framework
Browse files Browse the repository at this point in the history
  • Loading branch information
eszmw committed May 21, 2024
1 parent 969508e commit 13fc85e
Show file tree
Hide file tree
Showing 172 changed files with 98 additions and 1,575 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: MATLAB Build

# Controls when the action will run.
on:
push:
branches: [ release ]
pull_request:
branches: [ release ]
workflow_dispatch:

jobs:
test:
strategy:
fail-fast: false
matrix:
MATLABVersion: [R2021a,R2021b,R2022a,R2022b,R2023a,R2023b]
runs-on: ubuntu-latest
steps:
# Checks-out your repository
- uses: actions/checkout@v3

# 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 Image_Processing_and_Computer_Vision_Toolbox Statistics_and_Machine_Learning_Toolbox Curve_Fitting_Toolbox Automated_Driving_Toolbox
# List required products above in the format shown (and uncomment them)
# List of product strings:
# Simulink
# Statistics_and_Machine_Learning_Toolbox
# Simulink_Coder
# Econometrics_Toolbox
# Deep_Learning_Toolbox


# 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
uses: actions/[email protected]
with:
name: TestResults
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt

badge:
if: ${{ always() }}
needs: [test]
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:

# Checks-out your repository
- uses: actions/checkout@v3

# Sets up R2023b
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2023b

# Download the test results from artifact
- name: Download TestResults
uses: actions/[email protected]
with:
name: TestResults
path: ./SoftwareTests/

# Create the test results badge
- name: Run CreateBadge
uses: matlab-actions/run-command@v1
with:
command: openProject(pwd); CreateBadge;

# Commit the JSON for the MATLAB releases badge
- name: Commit changed files
continue-on-error: true
run: |
git config user.name "${{ github.workflow }} by ${{ github.actor }}"
git config user.email "<>"
git pull
git add Images/TestedWith.json
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
git fetch
git push
Binary file removed Data/loadStormData.mlx
Binary file not shown.
Binary file removed Derivatives/approximatingDerivatives.mlx
Binary file not shown.
Binary file removed HelperFunctions/Navigation.mlx
Binary file not shown.
13 changes: 0 additions & 13 deletions HelperFunctions/OpenOverview.m

This file was deleted.

Loading

0 comments on commit 13fc85e

Please sign in to comment.