Skip to content

Commit bedc91f

Browse files
committed
Updated robotics files for github repo. Updated readme.
1 parent 0e2692d commit bedc91f

File tree

164 files changed

+1188
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+1188
-0
lines changed

.gitattributes

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.fig binary
2+
*.mat binary
3+
*.mdl binary diff merge=mlAutoMerge
4+
*.mdlp binary
5+
*.mexa64 binary
6+
*.mexw64 binary
7+
*.mexmaci64 binary
8+
*.mlapp binary linguist-language=MATLAB
9+
*.mldatx binary
10+
*.mlproj binary
11+
*.mlx binary merge=mlAutoMerge linguist-language=MATLAB
12+
*.p binary
13+
*.sfx binary
14+
*.sldd binary
15+
*.slreqx binary merge=mlAutoMerge
16+
*.slmx binary merge=mlAutoMerge
17+
*.sltx binary
18+
*.slxc binary
19+
*.slx binary merge=mlAutoMerge
20+
*.slxp binary
21+
22+
## Other common binary file types
23+
*.docx binary
24+
*.exe binary
25+
*.jpg binary
26+
*.pdf binary
27+
*.png binary
28+
*.xlsx binary
29+
30+
# Ignore HTML
31+
32+
*.html linguist-detectable=false

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: MATLAB Build
2+
3+
# Controls when the action will run.
4+
on:
5+
push:
6+
branches: [ release ]
7+
pull_request:
8+
branches: [ release ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
MATLABVersion: [R2023a,R2023b]
17+
runs-on: ubuntu-latest
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v3
21+
22+
# Sets up MATLAB on the GitHub Actions runner
23+
- name: Setup MATLAB
24+
uses: matlab-actions/setup-matlab@v1
25+
with:
26+
release: ${{ matrix.MATLABVersion }}
27+
28+
# Run SmokeTests
29+
- name: Run SmokeTests
30+
uses: matlab-actions/run-command@v1
31+
with:
32+
command: openProject(pwd); results = runtests(fullfile("SoftwareTests","SmokeTests.m")); assertSuccess(results);
33+
34+
# Run FunctionTests
35+
- name: Run FunctionTests
36+
uses: matlab-actions/run-command@v1
37+
with:
38+
command: openProject(pwd); results = runtests(fullfile("SoftwareTests","FunctionTests.m")); assertSuccess(results);
39+
40+
# Upload the test results as artifact
41+
- name: Upload TestResults
42+
uses: actions/[email protected]
43+
with:
44+
name: TestResults
45+
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt
46+
47+
# Download the test results from artifact
48+
- name: Download TestResults
49+
uses: actions/[email protected]
50+
with:
51+
name: TestResults
52+
path: ./SoftwareTests/
53+
54+
# Create the test results badge
55+
- name: Run CreateBadge
56+
uses: matlab-actions/run-command@v1
57+
with:
58+
command: openProject(pwd); results = runtests(fullfile("SoftwareTests","CreateBadge.m"));
59+
60+
# Commit the JSON for the MATLAB releases badge
61+
- name: Commit changed files
62+
continue-on-error: true
63+
run: |
64+
git config user.name "${{ github.workflow }} by ${{ github.actor }}"
65+
git config user.email "<>"
66+
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
67+
git fetch
68+
git push

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# List of untracked files to ignore
2+
3+
# Autosave files
4+
*.asv
5+
*.m~
6+
*.autosave
7+
*.slx.r*
8+
*.mdl.r*
9+
10+
# MATLAB Drive
11+
*.MATLABDriveTag
12+
13+
# Compiled files
14+
*.mex*
15+
*.p
16+
17+
# Compressed files
18+
*.zip
19+
20+
# Packaged app and toolbox files
21+
*.mlappinstall
22+
*.mltbx
23+
24+
# Deployable archives
25+
*.ctf
26+
27+
# Generated helpsearch folders
28+
helpsearch*/
29+
30+
# Defined Simulink cache folder
31+
Utilities/SimulinkCache/*
32+
33+
# Standard code generation folders
34+
slprj/
35+
sccprj/
36+
codegen/
37+
38+
# Code generation file
39+
*.eep
40+
*.elf
41+
*.hex
42+
*.bin
43+
44+
# Cache files
45+
*.slxc
46+
47+
# Project settings
48+
Utilities/ProjectSettings.mat
49+
50+
# Test results
51+
SoftwareTests/TestResults_*

.gitlab-ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
stages:
2+
# Set up two testing paths
3+
- setup
4+
- test
5+
- release
6+
7+
setup-job:
8+
tags:
9+
- matlab
10+
stage: setup
11+
script:
12+
- cd ..
13+
- if (test-path utilities) { rm -r -force utilities }
14+
- git clone [email protected]:modular-curriculum-content/utilities.git
15+
- cd $CI_PROJECT_NAME
16+
allow_failure: false
17+
18+
19+
smoke-test:
20+
# Smoke tests should run all the time
21+
tags:
22+
# Add additional tags like (e.g. - arduino) as required
23+
# Make sure that the runner you plan to use matches the tags
24+
- matlab
25+
stage: test
26+
script:
27+
- matlab -batch "openProject(pwd);
28+
results = runtests(fullfile('SoftwareTests','SmokeTests.m'));
29+
disp(table(results)); assertSuccess(results);"
30+
when: always
31+
allow_failure: true
32+
33+
smoke-test-solution:
34+
tags:
35+
- matlab
36+
stage: release
37+
script:
38+
- matlab -batch "proj = openProject(pwd);
39+
addpath(genpath(proj.RootFolder));
40+
results = runtests(fullfile('InternalFiles','Tests','CI','SolnSmokeTests.m'));
41+
disp(table(results)); assertSuccess(results);"
42+
rules:
43+
# This test should always run when merging to main
44+
# And be available for manual running on any push
45+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
46+
when: always
47+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
48+
when: manual
49+
allow_failure: true
50+
51+
file-test:
52+
tags:
53+
- matlab
54+
stage: release
55+
script:
56+
- matlab -batch "proj = openProject(pwd);
57+
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
58+
results = runtests('OpenCloseFileTest.m');
59+
disp(table(results)); assertSuccess(results);"
60+
rules:
61+
# This test should always run when merging to main
62+
# And be available for manual running on any push
63+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
64+
when: always
65+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
66+
when: manual
67+
allow_failure: true
68+
69+
release-testing:
70+
tags:
71+
- matlab
72+
stage: release
73+
script:
74+
- matlab -batch "proj = openProject(pwd);
75+
cd ..;
76+
addpath(genpath(fullfile('utilities','TestingResources')));
77+
runCMTests"
78+
rules:
79+
# This test should always run when merging to main
80+
# And be available for manual running on any push
81+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
82+
when: always
83+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
84+
when: manual
85+
allow_failure: true

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions

Data/.gitkeep

Whitespace-only changes.

Data/DH_Exercise.mat

535 Bytes
Binary file not shown.

Data/FK_Exercise.mat

1 KB
Binary file not shown.
683 KB
Binary file not shown.

Data/Geometry/arm.STL

401 KB

0 commit comments

Comments
 (0)