Blocksparse Stagewise KKT Solver #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Matlab interface and upload to release | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build_test_release: | |
name: Build, test and release Matlab interface | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-12, macos-14, windows-latest ] | |
include: | |
- os: ubuntu-latest | |
platform: linux | |
- os: macos-12 | |
platform: maci | |
- os: macos-14 | |
platform: maca | |
- os: windows-latest | |
platform: windows | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup external build directory | |
run: mkdir -p build_external | |
- name: Install Eigen | |
working-directory: build_external | |
run: bash ../ci/install_eigen.sh | |
- name: Setup Ninja | |
if: runner.os == 'Windows' | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install blasfeo | |
working-directory: build_external | |
run: | | |
bash ../ci/download_blasfeo.sh | |
bash ../ci/build_install_blasfeo.sh GENERIC generic | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
release: R2023b | |
- name: Build and package interface | |
uses: matlab-actions/run-command@v2 | |
with: | |
command: cd interfaces/matlab, make_piqp | |
- name: Run tests in MATLAB | |
uses: matlab-actions/run-command@v2 | |
with: | |
command: cd interfaces/matlab, runtest_piqp | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ./interfaces/matlab/piqp-matlab-${{ matrix.platform}}64.tar.gz | |
- name: Upload tarballs | |
if: github.event_name == 'release' && github.event.action == 'published' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./interfaces/matlab/piqp-matlab-${{ matrix.platform}}64.tar.gz | |
asset_name: piqp-matlab-${{ matrix.platform}}64.tar.gz | |
asset_content_type: application/gzip |