-
Notifications
You must be signed in to change notification settings - Fork 35
128 lines (102 loc) · 3.81 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
# 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
schedule:
- cron: '7 6 * * 3' # schedule a weekly build to keep caches warm
env:
PRODUCT_LIST: MATLAB MATLAB_Test MATLAB_Compiler MATLAB_Compiler_SDK Parallel_Computing_Toolbox
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
build-options: -parallel
- 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: Setup display (required for building doc in MATLAB)
uses: pyvista/setup-headless-display-action@v2
with:
pyvista: false
- name: Download artifacts from all platforms
uses: actions/download-artifact@v4
with:
pattern: build-artifacts-*
merge-multiple: true
- name: Download artifacts from the running platform last to guarantee incremental build
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/glnxa64/ctf-archive