-
Notifications
You must be signed in to change notification settings - Fork 7
117 lines (103 loc) · 3.13 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
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-release: '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
fail-fast: false
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-release }}
- name: Build
run: >
bash scripts/ci/build-matlab-linux.sh
"${{ steps.matlab.outputs.matlabroot }}" ${{ matrix.host }} . staging
- name: Package
run: zip -r ../alpaqa-matlab-${{ matrix.name }}.zip ./*
working-directory: staging
- name: Upload
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
build-windows:
strategy:
matrix:
include:
- os: windows-2022
name: win64
matlab-release: '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-release }}
- name: Build
shell: cmd
run: >
call .\scripts\ci\build-matlab-windows.bat
"${{ steps.matlab.outputs.matlabroot }}" "${{ matrix.host }}" "." "staging"
- name: Package
shell: pwsh
run: Compress-Archive -Path staging\* alpaqa-matlab-${{ matrix.name }}.zip
- name: Upload
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