Skip to content

initial octave support #52

initial octave support

initial octave support #52

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
jobs:
build-mex:
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@v4
with:
fetch-depth: 0
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.os == 'macos-14' && 'R2023b' || ( matrix.os == 'windows-latest' && 'R2021b' || 'R2021a' ) }}
- name: Build MEX files
uses: matlab-actions/run-command@v2
with:
command: install_sdpt3 -rebuild
- uses: actions/upload-artifact@v4
with:
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@v4
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 liboctave-dev
elif [ "${{ matrix.os }}" = windows-latest ]; then
choco install octave.portable
else
brew install octave
fi
- name: Build Octave mex files
if: matrix.os != 'windows-latest'
run: |
octave --eval 'computer'
octave --eval 'install_sdpt3 -rebuild'
- name: Build Octave mex files
if: matrix.os == 'windows-latest'
shell: cmd
run: |
set PATH=C:\ProgramData\Chocolatey\bin:%PATH%
echo "%PATH%"
octave.exe --eval 'computer'
if %errorlevel% neq 0 exit /b %errorlevel%
octave.exe --eval 'install_sdpt3 -rebuild'
if %errorlevel% neq 0 exit /b %errorlevel%
- uses: actions/upload-artifact@v4
with:
name: mexfiles-oct-${{ matrix.os }}
path: |
Solver/Mexfun/*.mex
package:
needs: [build-mex,build-oct]
runs-on: ubuntu-latest
steps:
- name: Retrieve the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: mexfiles-ubuntu-latest
- uses: actions/download-artifact@v4
with:
name: mexfiles-windows-latest
- uses: actions/download-artifact@v4
with:
name: mexfiles-macos-latest
- uses: actions/download-artifact@v4
with:
name: mexfiles-macos-14
- name: Show files, build archives
run: |
mv *.mex* Solver/Mexfun/
mkdir ../archives
zip -r ../archives/sdpt3.zip . -x '.git/*' -x '.github/*'
tar cfz ../archives/sdpt3.tgz --exclude "./.git" --exclude "./.github" .
echo "--------"
tar tfz ../archives/sdpt3.tgz
echo "--------"
zipinfo ../archives/sdpt3.zip
echo "--------"
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
../archives/sdpt3.tgz
../archives/sdpt3.zip