From 0fdcb74d62a60ed9dd63d92196967c94b60686fd Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Tue, 9 Apr 2024 17:31:44 -0500 Subject: [PATCH] initial octave support --- .github/workflows/main.yaml | 46 +++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 452f107..388d950 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,7 +9,7 @@ on: branches: - master jobs: - build: + build-mex: runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -33,8 +33,50 @@ jobs: name: mexfiles-${{ matrix.os }} path: | Solver/Mexfun/*.mex* + build-oct: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest,windows-latest,macos-latest,macos-14] + steps: + - name: Retrieve the source code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install Octave + shell: bash + run: | + if [ "${{ matrix.os }}" = ubuntu-latest ]; then + sudo apt update + sudo apt install --no-install-recommends octave + octave_dir=o_lin + elif [ "${{ matrix.os }}" = windows-latest ]; then + choco install octave.portable + octave_dir=o_win + else + brew install octave + if [ "${{ matrix.os }}" = macos-latest ]; then + octave_dir=o_maci + else + octave_dir=o_maca + fi + fi + echo "OCTAVE_DIR=$octave_dir" >> $GITHUB_ENV + - name: Build Octave mex files + shell: bash + run: | + octave_dir=Solver/Mexfun/$OCTAVE_DIR + octave --eval 'install_sdpt3' + mkdir -p $octave_dir + mv Solver/Mexfun/*.mex $octave_dir + - uses: actions/upload-artifact@v4 + with: + name: mexfiles-oct-${{ matrix.os }} + path: | + Solver/Mexfun/$OCTAVE_DIR/*.mex* package: - needs: build + needs: [build-mex,build-oct] runs-on: ubuntu-latest steps: - name: Retrieve the source code