Full nosnoc pipeline for pss using the Stewart reformulation #388
This file contains 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: NOSNOC Test suite | |
on: | |
pull_request: | |
jobs: | |
# Main job that runs all the tests for NOSNOC in matlab. | |
test_nosnoc: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checkout repo | |
- name: Checkout NOSNOC | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
# Install matlab to run tests. | |
- name: Install MATLAB | |
uses: matlab-actions/setup-matlab@v2.1 | |
with: | |
# NOTE: no longer earliest version to support more property validation functions | |
release: R2021b | |
# Download relevant matlab release artifacts for the casadi release we are using. | |
# TODO: Definitely cache this. | |
- name: Download CasADi release | |
uses: robinraju/release-downloader@v1.6 | |
with: | |
repository: "casadi/casadi" | |
tag: "3.5.5" | |
fileName: "casadi-linux-matlabR2014b-v3.5.5.tar.gz" | |
# untar the casadi 3.5.5 release and then add it to the matlab path. | |
- name: Install CasADi | |
shell: bash | |
run: | | |
mkdir casadi | |
cd casadi | |
tar -zxvf $GITHUB_WORKSPACE/casadi-linux-matlabR2014b-v3.5.5.tar.gz . | |
echo "MATLABPATH=$MATLABPATH:$GITHUB_WORKSPACE/casadi" >> $GITHUB_ENV | |
# Run matlab tests from the test directory and dump the results in junit format. | |
- name: Install NOSNOC | |
uses: matlab-actions/run-command@v2.1 | |
with: | |
command: install_nosnoc | |
# Run matlab tests from the test directory and dump the results in junit format. | |
- name: Run NOSNOC tests | |
uses: matlab-actions/run-tests@v2.1 | |
with: | |
source-folder: src; . | |
select-by-folder: test | |
test-results-junit: test-results/matlab-results.xml | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: test-results/ |