From b6cefa8504b854599bb1f4237fd209b579cda471 Mon Sep 17 00:00:00 2001 From: Ray Zimmerman Date: Wed, 25 Aug 2021 13:06:37 -0500 Subject: [PATCH] Add IPOPT to MATLAB CI testing. --- .github/workflows/continuous-integration.yml | 59 ++++++++++---------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 5683222..777b0cb 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -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) @@ -60,13 +37,13 @@ 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: @@ -74,14 +51,40 @@ jobs: 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