Skip to content

Version 1.2.5

Version 1.2.5 #129

Workflow file for this run

name: Matlab Package
on:
workflow_dispatch:
push:
tags-ignore:
- '**'
branches:
- '**'
release:
types: ['released', 'prereleased']
jobs:
build-linux:
runs-on: ubuntu-latest
env:
HOST: 'x86_64-centos7-linux-gnu'
TOOLS_VERSION: '0.1.0-beta3'
TOOLS_URL: 'https://github.com/tttapa/cross-python/releases/download'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@64144ac4bb7c754f9ef7642f693671c873701c60
with:
release: R2020b
- name: Download toolchain
run: wget "${{ env.TOOLS_URL }}/${{ env.TOOLS_VERSION }}/full-${{ env.HOST }}.tar.xz" -O- | sudo tar xJ -C /opt
- name: Configure
run: |
host="${{ env.HOST }}"
staging="/opt/$host"
cmake -B build -S QPALM \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D QPALM_WITH_MEX=On \
-D CMAKE_POSITION_INDEPENDENT_CODE=On \
-D CMAKE_C_COMPILER="$staging/x-tools/$host/bin/$host-gcc" \
-D CMAKE_CXX_COMPILER="$staging/x-tools/$host/bin/$host-g++" \
-D CMAKE_Fortran_COMPILER="$staging/x-tools/$host/bin/$host-gfortran"
env:
CXXFLAGS: "-march=skylake -static-libstdc++ -static-libgcc"
LDFLAGS: "-static-libstdc++ -static-libgcc"
CFLAGS: "-march=skylake -static-libgcc"
- name: Build
run: |
cmake --build build \
--config RelWithDebInfo \
-j
- name: Install
run: |
cmake --install build \
--config RelWithDebInfo \
--component mex_interface \
--prefix staging
- name: Package
run: |
zip -r ../qpalm-matlab-glnxa64.zip ./*
working-directory: staging
- name: Upload
uses: actions/upload-artifact@v4
with:
name: qpalm-matlab-glnxa64
path: qpalm-matlab-glnxa64.zip
- name: Release
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
uses: softprops/action-gh-release@73e673b2dead314c6b971e962dd8e84e230ae99d
with:
files: qpalm-matlab-glnxa64.zip
build-macos:
runs-on: macos-${{ matrix.macos-version }}
strategy:
matrix:
macos-version: ['13', '14']
include:
- macos-version: '14'
arch: 'maca64'
matlab-release: 'R2023b'
- macos-version: '13'
arch: 'maci64'
matlab-release: 'R2021a'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@64144ac4bb7c754f9ef7642f693671c873701c60
with:
release: ${{ matrix.matlab-release }}
- name: Configure
run: |
cmake -B build -S QPALM \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D QPALM_WITH_MEX=On \
-D CMAKE_POSITION_INDEPENDENT_CODE=On
- name: Build
run: |
cmake --build build \
--config RelWithDebInfo \
-j
- name: Install
run: |
cmake --install build \
--config RelWithDebInfo \
--component mex_interface \
--prefix staging
- name: Package
run: |
zip -r ../qpalm-matlab-${{ matrix.arch }}.zip ./*
working-directory: staging
- name: Upload
uses: actions/upload-artifact@v4
with:
name: qpalm-matlab-${{ matrix.arch }}
path: qpalm-matlab-${{ matrix.arch }}.zip
- name: Release
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
uses: softprops/action-gh-release@73e673b2dead314c6b971e962dd8e84e230ae99d
with:
files: qpalm-matlab-${{ matrix.arch }}.zip
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@64144ac4bb7c754f9ef7642f693671c873701c60
with:
release: R2021a
- name: Configure
shell: pwsh
run: |
cmake -B build -S QPALM `
-D CMAKE_BUILD_TYPE=RelWithDebInfo `
-D QPALM_WITH_MEX=On `
-D CMAKE_POSITION_INDEPENDENT_CODE=On
- name: Build
shell: pwsh
run: |
cmake --build build `
--config RelWithDebInfo `
-j
- name: Install
shell: pwsh
run: |
cmake --install build `
--config RelWithDebInfo `
--component mex_interface `
--prefix staging
- name: Package
shell: pwsh
run: |
Compress-Archive -Path staging\* qpalm-matlab-win64.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: qpalm-matlab-win64
path: qpalm-matlab-win64.zip
- name: Release
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
uses: softprops/action-gh-release@73e673b2dead314c6b971e962dd8e84e230ae99d
with:
files: qpalm-matlab-win64.zip