96
96
with :
97
97
name : otel-matlab-${{ matrix.os }}.tar.gz
98
98
path : ${{ github.workspace }}/otel-matlab-${{ matrix.os }}.tar.gz
99
+ nogrpc-ubuntu : # without gRPC exporter
100
+ runs-on : ubuntu-22.04
101
+ env :
102
+ OPENTELEMETRY_MATLAB_INSTALL : " ${{ github.workspace }}/otel_matlab_install"
103
+ steps :
104
+ - name : Download OpenTelemetry-Matlab source
105
+ uses : actions/checkout@v3
106
+ with :
107
+ path : opentelemetry-matlab
108
+ - name : Install ninja-build
109
+ run : sudo apt-get install ninja-build
110
+ - name : Install MATLAB
111
+ uses : matlab-actions/setup-matlab@v2
112
+ with :
113
+ release : R2025a
114
+ products : MATLAB_Compiler
115
+ - name : Build OpenTelemetry-Matlab
116
+ working-directory : opentelemetry-matlab
117
+ run : |
118
+ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_OTLP_GRPC=OFF -DWITH_OTLP_FILE=ON -DOTEL_MATLAB_VERSION=${{ github.ref_name }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
119
+ cmake --build build --config Release --target install
120
+ - name : Compress into single artifact
121
+ working-directory : ${{ github.workspace }}
122
+ run : tar -czf otel-matlab-nogrpc-ubuntu.tar.gz otel_matlab_install
123
+ - name : Upload artifacts
124
+ uses : actions/upload-artifact@v4
125
+ with :
126
+ name : otel-matlab-nogrpc-ubuntu.tar.gz
127
+ path : ${{ github.workspace }}/otel-matlab-nogrpc-ubuntu.tar.gz
128
+ nogrpc-windows : # without gRPC exporter
129
+ runs-on : windows-latest
130
+ env :
131
+ OPENTELEMETRY_MATLAB_INSTALL : " ${{ github.workspace }}/otel_matlab_install"
132
+ steps :
133
+ - name : Download OpenTelemetry-Matlab source
134
+ uses : actions/checkout@v3
135
+ with :
136
+ path : opentelemetry-matlab
137
+ - name : Install ninja-build
138
+ run : choco install ninja
139
+ - name : Install MATLAB
140
+ uses : matlab-actions/setup-matlab@v2
141
+ with :
142
+ release : R2025a
143
+ products : MATLAB_Compiler
144
+ - name : Build OpenTelemetry-Matlab
145
+ working-directory : opentelemetry-matlab
146
+ shell : cmd
147
+ run : |
148
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
149
+ cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_OTLP_GRPC=OFF -DWITH_OTLP_FILE=ON -DFETCH_VCPKG=ON -DOTEL_MATLAB_VERSION=${{ github.ref_name }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
150
+ cmake --build build --config Release --target install
151
+ - name : Compress into single artifact
152
+ working-directory : ${{ github.workspace }}
153
+ run : tar -czf otel-matlab-nogrpc-windows.tar.gz otel_matlab_install
154
+ - name : Upload artifacts
155
+ uses : actions/upload-artifact@v4
156
+ with :
157
+ name : otel-matlab-nogrpc-windows.tar.gz
158
+ path : ${{ github.workspace }}/otel-matlab-nogrpc-windows.tar.gz
159
+ nogrpc-macos : # without gRPC exporter
160
+ runs-on : ${{ matrix.os }}
161
+ strategy :
162
+ matrix :
163
+ os : [macos-13, macos-14] # runs on Mac with both Intel (macos-13) and Apple Silicon (macos-14) processors
164
+ env :
165
+ OPENTELEMETRY_MATLAB_INSTALL : " ${{ github.workspace }}/otel_matlab_install"
166
+ steps :
167
+ - name : Download OpenTelemetry-Matlab source
168
+ uses : actions/checkout@v3
169
+ with :
170
+ path : opentelemetry-matlab
171
+ - name : Install ninja-build
172
+ run : brew install ninja
173
+ - name : Install MATLAB
174
+ uses : matlab-actions/setup-matlab@v2
175
+ with :
176
+ release : R2025a
177
+ products : MATLAB_Compiler
178
+ - name : Build OpenTelemetry-Matlab
179
+ working-directory : opentelemetry-matlab
180
+ run : |
181
+ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_OTLP_GRPC=OFF -DWITH_OTLP_FILE=ON -DOTEL_MATLAB_VERSION=${{ github.ref_name }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
182
+ cmake --build build --config Release --target install
183
+ - name : Compress into single artifact
184
+ working-directory : ${{ github.workspace }}
185
+ run : tar -czf otel-matlab-nogrpc-${{ matrix.os }}.tar.gz otel_matlab_install
186
+ - name : Upload artifacts
187
+ uses : actions/upload-artifact@v4
188
+ with :
189
+ name : otel-matlab-nogrpc-${{ matrix.os }}.tar.gz
190
+ path : ${{ github.workspace }}/otel-matlab-nogrpc-${{ matrix.os }}.tar.gz
99
191
package-mltbx :
100
192
name : Package MATLAB Toolbox (MLTBX) Files
101
193
runs-on : ubuntu-22.04
@@ -105,8 +197,13 @@ jobs:
105
197
- build-ubuntu
106
198
- build-windows
107
199
- build-macos
200
+ - nogrpc-ubuntu
201
+ - nogrpc-windows
202
+ - nogrpc-macos
108
203
env :
109
204
OPENTELEMETRY_MATLAB_INSTALL : " ${{ github.workspace }}/otel_matlab_install"
205
+ WITHGRPC_FOLDER : " ${{ github.workspace }}/withgrpc"
206
+ NOGRPC_FOLDER : " ${{ github.workspace }}/nogrpc"
110
207
steps :
111
208
- name : Checkout OpenTelemetry-Matlab
112
209
uses : actions/checkout@v3
@@ -118,28 +215,61 @@ jobs:
118
215
path : artifacts-downloaded
119
216
- name : Decompress Artifacts
120
217
run : |
121
- mv artifacts-downloaded/*/*.tar.gz .
218
+ mkdir $WITHGRPC_FOLDER
219
+ cd $WITHGRPC_FOLDER
220
+ mv ../artifacts-downloaded/*/otel-matlab-ubuntu.tar.gz .
221
+ mv ../artifacts-downloaded/*/otel-matlab-macos*.tar.gz .
222
+ mv ../artifacts-downloaded/*/otel-matlab-windows.tar.gz .
122
223
tar -xzvf otel-matlab-ubuntu.tar.gz
123
224
tar -xzvf otel-matlab-macos-13.tar.gz
124
225
tar -xzvf otel-matlab-macos-14.tar.gz
125
226
tar -xzvf otel-matlab-windows.tar.gz
227
+ - name : Decompress Artifacts without gRPC exporter
228
+ run : |
229
+ mkdir $NOGRPC_FOLDER
230
+ cd $NOGRPC_FOLDER
231
+ mv ../artifacts-downloaded/*/*nogrpc*.tar.gz .
232
+ tar -xzvf otel-matlab-nogrpc-ubuntu.tar.gz
233
+ tar -xzvf otel-matlab-nogrpc-macos-13.tar.gz
234
+ tar -xzvf otel-matlab-nogrpc-macos-14.tar.gz
235
+ tar -xzvf otel-matlab-nogrpc-windows.tar.gz
126
236
- name : Install MATLAB
127
237
uses : matlab-actions/setup-matlab@v2
128
238
with :
129
239
release : R2025a
130
- - name : Run commands
240
+ - name : Package Toolbox
241
+ env :
242
+ MATLABPATH : OpenTelemetry-Matlab/tools
243
+ WORKING_FOLDER : ${{ env.WITHGRPC_FOLDER }}
244
+ OTEL_MATLAB_TOOLBOX_FOLDER : otel_matlab_install
245
+ OTEL_MATLAB_TOOLBOX_OUTPUT_FOLDER : ${{ env.WITHGRPC_FOLDER }}
246
+ OTEL_MATLAB_TOOLBOX_VERSION : ${{ github.ref_name }}
247
+ OTEL_MATLAB_TOOLBOX_NAME : otel-matlab
248
+ uses : matlab-actions/run-command@v1
249
+ with :
250
+ command : packageMatlabInterface
251
+ - name : Package Toolbox without gRPC exporter
131
252
env :
132
253
MATLABPATH : OpenTelemetry-Matlab/tools
254
+ WORKING_FOLDER : ${{ env.NOGRPC_FOLDER }}
133
255
OTEL_MATLAB_TOOLBOX_FOLDER : otel_matlab_install
134
- OTEL_MATLAB_TOOLBOX_OUTPUT_FOLDER :
256
+ OTEL_MATLAB_TOOLBOX_OUTPUT_FOLDER : ${{ env.NOGRPC_FOLDER }}
135
257
OTEL_MATLAB_TOOLBOX_VERSION : ${{ github.ref_name }}
258
+ OTEL_MATLAB_TOOLBOX_NAME : otel-matlab-nogrpc
136
259
uses : matlab-actions/run-command@v1
137
260
with :
138
261
command : packageMatlabInterface
262
+ - name : Compress Toolbox without gRPC exporter
263
+ working-directory : ${{ env.NOGRPC_FOLDER }}
264
+ run : tar -czf otel-matlab-nogrpc.mltbx.tar.gz otel-matlab-nogrpc.mltbx
139
265
- name : Create release
140
266
uses : softprops/action-gh-release@v2
267
+ # Upload toolbox without gRPC exporter in compressed format
268
+ # This is to avoid multiple .mltbx files, which will cause issues in MATLAB File Exchange
141
269
with :
142
- files : ./otel-matlab.mltbx
270
+ files : |
271
+ ${{ env.WITHGRPC_FOLDER }}/otel-matlab.mltbx
272
+ ${{ env.NOGRPC_FOLDER }}/otel-matlab-nogrpc.mltbx.tar.gz
143
273
name : " Version ${{ github.ref_name }}"
144
274
fail_on_unmatched_files : true
145
275
generate_release_notes : false
0 commit comments