Skip to content

Commit

Permalink
Add IPOPT to MATLAB CI testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdzman committed Aug 25, 2021
1 parent d2c7430 commit b6cefa8
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,8 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Install MATLAB
if: matrix.platform == 'matlab'
uses: matlab-actions/setup-matlab@v1

- name: Install Octave (Linux)
if: matrix.platform == 'octave' && startsWith(matrix.os, 'ubuntu')
uses: MATPOWER/action-install-octave-linux@v1
with:
ipopt-libs: true

- name: Install Octave (macOS)
if: matrix.platform == 'octave' && startsWith(matrix.os, 'macos')
uses: MATPOWER/action-install-octave-macos@v1

- name: Configure MATLAB
if: matrix.platform == 'matlab'
uses: MATPOWER/action-configure-matlab@v1
with:
nojvm: false

- name: ${{ env.ML_NAME }} ${{ env.ML_VER }} Installed
run: $ML_CMD ver

- name: Include IPOPT?
if: matrix.platform == 'octave' && startsWith(env.OCTAVE_VER, '4.0') != 1
if: matrix.platform == 'matlab' || matrix.os != 'ubuntu-16.04'
run: echo "INCLUDE_IPOPT=1" >> $GITHUB_ENV

- name: Cache IPOPT Libs (macOS)
Expand All @@ -60,28 +37,54 @@ jobs:
uses: actions/cache@v2
with:
path: ~/install
key: ${{ matrix.os }}-${{ env.cache-name }}
key: ${{ env.cache-name }}-${{ matrix.os }}

- name: Build IPOPT (macOS)
if: env.INCLUDE_IPOPT && startsWith(matrix.os, 'macos') && steps.cache-ipopt-libs.outputs.cache-hit != 'true'
uses: MATPOWER/action-build-ipopt-macos@v1

- name: Cache IPOPT interface for Octave
- name: Cache IPOPT interface
if: env.INCLUDE_IPOPT
id: cache-ipopt
env:
cache-name: ipopt
uses: actions/cache@v2
with:
path: ~/build/ipopt
key: ${{ matrix.os }}-${{ env.cache-name }}
key: ${{ env.cache-name }}-${{ matrix.platform }}-${{ matrix.os }}

- name: Install Octave (Linux)
if: matrix.platform == 'octave' && startsWith(matrix.os, 'ubuntu')
uses: MATPOWER/action-install-octave-linux@v1
with:
ipopt-libs: ${{ env.INCLUDE_IPOPT == 1 }}

- name: Install Octave (macOS)
if: matrix.platform == 'octave' && startsWith(matrix.os, 'macos')
uses: MATPOWER/action-install-octave-macos@v1

- name: Install MATLAB
if: matrix.platform == 'matlab'
uses: matlab-actions/setup-matlab@v1

- name: Configure MATLAB
if: matrix.platform == 'matlab'
uses: MATPOWER/action-configure-matlab@v1
with:
os: ${{ matrix.os }}
nojvm: false
ipopt: ${{ env.INCLUDE_IPOPT == 1 }}
ipopt-cached: ${{ steps.cache-ipopt.outputs.cache-hit == 'true' }}

- name: Install IPOPT interface for Octave
if: env.INCLUDE_IPOPT
if: env.INCLUDE_IPOPT && matrix.platform == 'octave'
uses: MATPOWER/action-install-ipopt-octave@v1
with:
cached: ${{ steps.cache-ipopt.outputs.cache-hit == 'true' }}

- name: ${{ env.ML_NAME }} ${{ env.ML_VER }} Installed
run: $ML_CMD ver

- name: Install MP-Test, Set MPTEST_PATH
run: |
git clone --depth=1 https://github.com/MATPOWER/mptest.git $HOME/mptest
Expand Down

0 comments on commit b6cefa8

Please sign in to comment.