forked from ranford/Mass-Spring-Damper
-
Notifications
You must be signed in to change notification settings - Fork 6
145 lines (118 loc) · 4.21 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
141
142
143
144
145
# 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: '49/61 22/25 4/6 * *' # schedule a weekly-ish build
env:
MATHWORKS_LICENSING_ENDPOINT: dev
jobs:
# This workflow contains a single job called "build"
compile-and-test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2-rc0
with:
release: R2022b
cache: true
# Runs a set of commands using the runners shell
- name: Generate mex files & run tests
uses: matlab-actions/run-build@v2-rc0
with:
tasks: test
- name: Upload Mex Files
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
# Artifact name
name: Mex-Artifacts-${{ matrix.os }}
# A file, directory or wildcard pattern that describes what to upload
path: toolbox/**/*.mex*64
- name: Upload Build traces on linux
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
# Artifact name
name: build-traces
# A file, directory or wildcard pattern that describes what to upload
path: .buildtool
create-R2022b-toolbox:
needs: compile-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Start display server
run: |
sudo apt-get install xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2-rc0
with:
release: R2022b
cache: true
- name: Download mac artifacts
uses: actions/download-artifact@v3
with:
name: Mex-Artifacts-macos-latest
path: toolbox
- name: Download windows artifacts
uses: actions/download-artifact@v3
with:
name: Mex-Artifacts-windows-latest
path: toolbox
- name: Download linux artifacts
uses: actions/download-artifact@v3
with:
name: Mex-Artifacts-ubuntu-latest
path: toolbox
# - name: Download build traces
# uses: actions/download-artifact@v3
# with:
# name: build-traces
# path: .
# Runs a set of commands using the runners shell
- name: Run toolbox build
uses: matlab-actions/run-build@v2-rc0
with:
tasks: toolbox
- name: Upload cross platform toolbox
uses: actions/upload-artifact@v3
with:
# Artifact name
name: Cross Platform Toolbox File
# A file, directory or wildcard pattern that describes what to upload
path: ./**/*.mltbx
canary-tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2-rc0
with:
release: latest
# Runs a set of commands using the runners shell
- name: Generate mex files & run tests
uses: matlab-actions/run-build@v2-rc0
with:
tasks: test