-
Notifications
You must be signed in to change notification settings - Fork 35
140 lines (116 loc) · 4.06 KB
/
matlab-ci.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
# This is a basic workflow to help you get started with MATLAB Actions
name: MATLAB Build
# Controls when the action will run.
on:
push: # Runs on push events
pull_request: # Runs on pull requests
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
env:
PRODUCT_LIST: MATLAB MATLAB_Test MATLAB_Compiler MATLAB_Compiler_SDK
# MLM_LICENSE_TOKEN: ${{secrets.MLM_LICENSE_TOKEN}}
jobs:
mex-and-unittests:
# This job will run for each OS present in the matrix
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: latest-including-prerelease
cache: true
products: ${{ env.PRODUCT_LIST }}
- name: Run ${{ matrix.os }} build to create MEX files and run unit tests
uses: matlab-actions/run-build@v2
with:
tasks: test
- name: Uploads mex files, test results, and build traces
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ matrix.os }}
path: |
toolbox/**/*
results/
.buildtool/
release-toolbox:
# This job executes only after a successful completion of 'mex-and-unittests' job
needs: mex-and-unittests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: latest-including-prerelease
cache: true
products: ${{ env.PRODUCT_LIST }}
- name: Start display server (required for building doc in MATLAB)
run: |
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Download artifacts from Windows
uses: actions/download-artifact@v4
with:
pattern: build-artifacts-windows-latest
merge-multiple: true
- name: Download artifacts from Mac (Intel)
uses: actions/download-artifact@v4
with:
pattern: build-artifacts-macos-13
merge-multiple: true
- name: Download artifacts from Mac (Apple Silicon)
uses: actions/download-artifact@v4
with:
pattern: build-artifacts-macos-14
merge-multiple: true
- name: Download artifacts from Linux
uses: actions/download-artifact@v4
with:
pattern: build-artifacts-ubuntu-latest
merge-multiple: true
- name: Build the toolbox, including all OS specific files
uses: matlab-actions/run-build@v2
with:
tasks: release
- name: Upload Toolbox
uses: actions/upload-artifact@v4
with:
name: Mass-Spring-Damper Toolbox (All platforms)
path: release/Mass-Spring-Damper.mltbx
# deploy-service:
# # This job executes only after a successful completion of 'mex-and-unittests' job
# needs: mex-and-unittests
#
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup MATLAB
# uses: matlab-actions/setup-matlab@v2
# with:
# release: latest-including-prerelease
# cache: true
# products: ${{ env.PRODUCT_LIST }}
#
# - name: Download Linux artifacts(to benefit from incremental build)
# uses: actions/download-artifact@v4
# with:
# pattern: build-artifacts-ubuntu-latest
# merge-multiple: true
#
# - name: Build the ctf archive and run equivalence integration tests
# uses: matlab-actions/run-build@v2
# with:
# tasks: deploy
#
# - name: Upload Production Server Archive
# uses: actions/upload-artifact@v4
# with:
# name: Mass-Spring-Damper Production Server Archive
# path: results/ctf-archive