-
Notifications
You must be signed in to change notification settings - Fork 283
159 lines (138 loc) · 5.4 KB
/
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# This workflow runs a matrix build with both versions of setup MATLAB action
name: MATLAB matrix build
# Controls when the action will run.
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-v1:
strategy:
matrix:
# Run this workflow on different os
os: [ubuntu-latest]
fail-fast: false
# 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@v4
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v1
# Runs a set of commands using the runners shell
- name: Run tests and generate artifacts
uses: matlab-actions/run-tests@v1
with:
source-folder: code
- name: Send mail
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
to: ${{ secrets.CI_INTERNAL_EMAIL }}
from: ${{ secrets.MAIL_USERNAME }}
secure: true
body: ${{ github.job }} job in workflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
build-v2:
strategy:
matrix:
# Run this workflow on different os
os: [windows-latest, ubuntu-latest, macos-latest, macos-13]
fail-fast: false
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
env:
MATLAB_LOG_DIR: ${{ github.workspace }}/logs
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
# 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
- name: Check out repository
uses: actions/checkout@v4
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
products: Optimization_Toolbox Curve_Fitting_Toolbox
# Runs a set of commands using the runners shell
- name: Run tests and generate artifacts
uses: matlab-actions/run-tests@v2
with:
source-folder: code
- name: Upload MPM and MATLAB logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: matlab-logs-${{ github.job }}-${{ matrix.os }}
path: ${{ env.MATLAB_LOG_DIR }}
if-no-files-found: ignore
- name: Send mail
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
to: ${{ secrets.CI_INTERNAL_EMAIL }}
from: ${{ secrets.MAIL_USERNAME }}
secure: true
body: ${{ github.job }} job in workflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
build-v2-with-cache:
strategy:
matrix:
# Run this workflow on different os
os: [windows-latest, ubuntu-latest, macos-latest, macos-13]
fail-fast: false
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
env:
MATLAB_LOG_DIR: ${{ github.workspace }}/logs
MW_DIAGNOSTIC_DEST: file
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all;
MW_VERBOSE_HTTPCLIENT_CORE: 1
# 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
- name: Check out repository
uses: actions/checkout@v4
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
products: Optimization_Toolbox Curve_Fitting_Toolbox
cache: true
# Runs a set of commands using the runners shell
- name: Run tests and generate artifacts
uses: matlab-actions/run-tests@v2
with:
source-folder: code
- name: Upload MPM and MATLAB logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: matlab-logs-${{ github.job }}-${{ matrix.os }}
path: ${{ env.MATLAB_LOG_DIR }}
if-no-files-found: ignore
- name: Send mail
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
to: ${{ secrets.CI_INTERNAL_EMAIL }}
from: ${{ secrets.MAIL_USERNAME }}
secure: true
body: ${{ github.job }} job in workflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}