forked from Benny44/QPALM_vLADEL
-
Notifications
You must be signed in to change notification settings - Fork 4
166 lines (162 loc) · 4.98 KB
/
matlab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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