[CI] temporarily install Matlab dependencies only #153
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: 'CI: Matlab' | |
on: | |
workflow_dispatch: | |
push: | |
tags-ignore: | |
- '**' | |
branches: | |
- '**' | |
release: | |
types: ['released', 'prereleased'] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
name: glnxa64 | |
matlab-version: 'R2021a' | |
host: x86_64-bionic-linux-gnu | |
- os: macos-14 | |
name: maca64 | |
matlab-release: 'R2023b' | |
host: macos | |
- os: macos-13 | |
name: maci64 | |
matlab-release: 'R2021a' | |
host: macos | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Conan and sccache | |
uses: ./.github/workflows/setup-conan | |
with: | |
python-version: '3.12' | |
cache-key: build-matlab-${{ matrix.name }} | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@64144ac4bb7c754f9ef7642f693671c873701c60 | |
id: matlab | |
with: | |
release: ${{ matrix.matlab-version }} | |
- name: Build | |
run: > | |
bash scripts/ci/build-matlab-linux.sh | |
"${{ steps.matlab.outputs.matlabroot }}" ${{ matrix.host }} . staging | |
- name: Package | |
if: false | |
run: zip -r ../alpaqa-matlab-${{ matrix.name }}.zip ./* | |
working-directory: staging | |
- name: Upload | |
if: false | |
uses: actions/upload-artifact@v4 | |
with: | |
name: alpaqa-matlab-${{ matrix.name }} | |
path: alpaqa-matlab-${{ matrix.name }}.zip | |
- name: Release | |
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }} | |
uses: softprops/action-gh-release@17cd0d34deddf848fc0e7d9be5202c148c270a0a | |
with: | |
files: alpaqa-matlab-${{ matrix.name }}.zip | |
build-windows: | |
strategy: | |
matrix: | |
include: | |
- os: windows-2022 | |
name: win64 | |
matlab-version: 'R2021a' | |
host: amd64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Conan and sccache | |
uses: ./.github/workflows/setup-conan | |
with: | |
python-version: '3.12' | |
cache-key: build-matlab-${{ matrix.name }} | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@64144ac4bb7c754f9ef7642f693671c873701c60 | |
id: matlab | |
with: | |
release: ${{ matrix.matlab-version }} | |
- name: Build | |
shell: cmd | |
run: > | |
call scripts\ci\build-matlab-windows.bat | |
"${{ steps.matlab.outputs.matlabroot }}" "${{ matrix.host }}" "." "staging" | |
- name: Package | |
if: false | |
shell: pwsh | |
run: Compress-Archive -Path staging\* alpaqa-matlab-${{ matrix.name }}.zip | |
- name: Upload | |
if: false | |
uses: actions/upload-artifact@v4 | |
with: | |
name: alpaqa-matlab-${{ matrix.name }} | |
path: alpaqa-matlab-${{ matrix.name }}.zip | |
- name: Release | |
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }} | |
uses: softprops/action-gh-release@17cd0d34deddf848fc0e7d9be5202c148c270a0a | |
with: | |
files: alpaqa-matlab-${{ matrix.name }}.zip | |
- run: conan cache clean |