Skip to content

Commit d763f6d

Browse files
committed
change workflows to run a simplified version on push
1 parent 4ecf53b commit d763f6d

File tree

2 files changed

+108
-1
lines changed

2 files changed

+108
-1
lines changed

.github/workflows/build_and_test.yml renamed to .github/workflows/build_and_test_full.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
name: "Build and Run Tests"
1+
# Full build-and-test with gRPC exporter, only run when pushed to main
2+
name: "Build and Run Tests Full"
23
on:
34
workflow_dispatch:
45
push:
6+
branches:
7+
- main
58
env:
69
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
710
jobs:
+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Simplified build-and-test without gRPC exporter, run when pushed to any branches other than main or release branches
2+
name: "Build and Run Tests Simple"
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- '**'
8+
- '!main'
9+
- '!v*.*'
10+
env:
11+
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
12+
jobs:
13+
build-and-run-tests-ubuntu:
14+
# Running on ubuntu-latest would use a glibc version that is incompatible when using the built mex files on a Debian 11
15+
# Instead, run on ubuntu-20.04
16+
runs-on: ubuntu-20.04
17+
env:
18+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
19+
SYSTEM_LIBSTDCPP_PATH: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
20+
steps:
21+
- name: Download OpenTelemetry-Matlab source
22+
uses: actions/checkout@v3
23+
with:
24+
path: opentelemetry-matlab
25+
- name: Install ninja-build
26+
run: sudo apt-get install ninja-build
27+
- name: Install MATLAB
28+
uses: matlab-actions/setup-matlab@v2
29+
with:
30+
products: MATLAB_Compiler MATLAB_Compiler_SDK
31+
- name: Build OpenTelemetry-Matlab
32+
working-directory: opentelemetry-matlab
33+
run: |
34+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
35+
cmake --build build --config Release --target install
36+
- name: Run tests
37+
env:
38+
# Add the installation directory to the MATLAB Search Path by
39+
# setting the MATLABPATH environment variable.
40+
MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
41+
uses: matlab-actions/run-tests@v2
42+
with:
43+
select-by-folder: opentelemetry-matlab/test
44+
build-and-run-tests-windows:
45+
runs-on: windows-latest
46+
env:
47+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
48+
steps:
49+
- name: Download OpenTelemetry-Matlab source
50+
uses: actions/checkout@v3
51+
with:
52+
path: opentelemetry-matlab
53+
- name: Install ninja-build
54+
run: choco install ninja
55+
- name: Install MATLAB
56+
uses: matlab-actions/setup-matlab@v2
57+
with:
58+
products: MATLAB_Compiler MATLAB_Compiler_SDK
59+
- name: Build OpenTelemetry-Matlab
60+
working-directory: opentelemetry-matlab
61+
shell: cmd
62+
run: |
63+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
64+
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DFETCH_VCPKG=ON -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
65+
cmake --build build --config Release --target install
66+
- name: Run tests
67+
env:
68+
# Add the installation directory to the MATLAB Search Path by
69+
# setting the MATLABPATH environment variable.
70+
MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
71+
uses: matlab-actions/run-tests@v2
72+
with:
73+
select-by-folder: opentelemetry-matlab/test
74+
build-and-run-tests-macos:
75+
runs-on: ${{ matrix.os }}
76+
strategy:
77+
matrix:
78+
os: [macos-13, macos-14] # runs on Mac with both Intel (macos-13) and Apple Silicon (macos-14) processors
79+
env:
80+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
81+
steps:
82+
- name: Download OpenTelemetry-Matlab source
83+
uses: actions/checkout@v3
84+
with:
85+
path: opentelemetry-matlab
86+
- name: Install ninja-build
87+
run: brew install ninja
88+
- name: Install MATLAB
89+
uses: matlab-actions/setup-matlab@v2
90+
with:
91+
products: MATLAB_Compiler MATLAB_Compiler_SDK
92+
- name: Build OpenTelemetry-Matlab
93+
working-directory: opentelemetry-matlab
94+
run: |
95+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
96+
cmake --build build --config Release --target install
97+
- name: Run tests
98+
env:
99+
# Add the installation directory to the MATLAB Search Path by
100+
# setting the MATLABPATH environment variable.
101+
MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
102+
uses: matlab-actions/run-tests@v2
103+
with:
104+
select-by-folder: opentelemetry-matlab/test

0 commit comments

Comments
 (0)