GitHub Action to build and install the OSQP interface for
Builds and installs the Octave interface for OSQP and defines
the OSQP_PATH
environment variable to point to the directory
containing the OSQP MEX- and M-files.
Note: This action depends on Octave being installed first, using either
MATPOWER/action-install-octave-linux@v1
or
MATPOWER/action-install-octave-macos@v1
.
Tested on Linux and macOS runners.
cached
- (defaultfalse
) set totrue
to indicate that you are installing from a cached build, i.e. skip the building and just defineOSQP_PATH
and install it in the Octave path.
None.
steps:
- name: Install Octave
uses: MATPOWER/action-install-octave-linux@v1
- name: Octave ${{ env.ML_VER }} Installed
run: $ML_CMD ver
- name: Cache OSQP interface for Octave
id: cache-osqp
env:
cache-name: osqp
uses: actions/cache@v3
with:
path: ~/build/osqp-matlab
key: ${{ matrix.os }}-${{ env.cache-name }}
- name: Install OSQP interface for Octave
uses: MATPOWER/action-install-osqp-octave@v1
with:
cached: ${{ steps.cache-osqp.outputs.cache-hit == 'true' }}
- name: Run OSQP code in Octave
run: |
export OSQP_TEST_PATH=<directory-with-code-that-calls-OSQP>
env $ML_PATHVAR=$OSQP_TEST_PATH $ML_CMD "<code-that-calls-OSQP>"
ls -al $OSQP_PATH