Skip to content

Commit 446d88c

Browse files
committed
add all applicable versions and platforms to new workflow
1 parent 9163791 commit 446d88c

File tree

1 file changed

+71
-1
lines changed

1 file changed

+71
-1
lines changed

.github/workflows/build_and_test_supported_versions.yml

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,82 @@ jobs:
1919
shell: bash
2020
working-directory: opentelemetry-matlab
2121
run: echo "latest_tag=$(sed -re 's/^v?([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)?.*/\1/' <<< $(git describe --tags --abbrev=0))" >> $GITHUB_OUTPUT
22+
build-and-run-tests-ubuntu:
23+
runs-on: ubuntu-22.04
24+
strategy:
25+
matrix:
26+
release: [R2025a, R2024b, R2024a, R2023b, R2023a, R2022b]
27+
needs: get_version
28+
env:
29+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
30+
SYSTEM_LIBSTDCPP_PATH: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
31+
steps:
32+
- name: Download OpenTelemetry-Matlab source
33+
uses: actions/checkout@v3
34+
with:
35+
path: opentelemetry-matlab
36+
- name: Install ninja-build
37+
run: sudo apt-get install ninja-build
38+
- name: Install MATLAB
39+
uses: matlab-actions/setup-matlab@v2
40+
with:
41+
release: ${{ matrix.release }}
42+
products: MATLAB_Compiler MATLAB_Compiler_SDK
43+
- name: Build OpenTelemetry-Matlab
44+
working-directory: opentelemetry-matlab
45+
run: |
46+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DWITH_OTLP_GRPC=ON -DWITH_OTLP_FILE=ON -DUSE_BATCH_FOR_MCC=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
47+
cmake --build build --config Release --target install
48+
- name: Run tests
49+
env:
50+
# Add the installation directory to the MATLAB Search Path by
51+
# setting the MATLABPATH environment variable.
52+
MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
53+
uses: matlab-actions/run-tests@v2
54+
with:
55+
select-by-folder: opentelemetry-matlab/test
56+
build-and-run-tests-windows:
57+
runs-on: windows-latest
58+
strategy:
59+
matrix:
60+
release: [R2025a, R2024b, R2024a, R2023b, R2023a, R2022b]
61+
needs: get_version
62+
env:
63+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
64+
steps:
65+
- name: Download OpenTelemetry-Matlab source
66+
uses: actions/checkout@v3
67+
with:
68+
path: opentelemetry-matlab
69+
- name: Install ninja-build
70+
run: choco install ninja
71+
- name: Install MATLAB
72+
uses: matlab-actions/setup-matlab@v2
73+
with:
74+
# pin to R2024b because R2025a has an issue that causes a failure when building the context_propagation example
75+
release: ${{ matrix.release }}
76+
products: MATLAB_Compiler MATLAB_Compiler_SDK
77+
- name: Build OpenTelemetry-Matlab
78+
working-directory: opentelemetry-matlab
79+
shell: cmd
80+
run: |
81+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
82+
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DWITH_OTLP_GRPC=ON -DUSE_BATCH_FOR_MCC=ON -DFETCH_VCPKG=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
83+
cmake --build build --config Release --target install
84+
- name: Run tests
85+
env:
86+
# Add the installation directory to the MATLAB Search Path by
87+
# setting the MATLABPATH environment variable.
88+
MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
89+
uses: matlab-actions/run-tests@v2
90+
with:
91+
select-by-folder: opentelemetry-matlab/test
2292
build-and-run-tests-macos:
2393
runs-on: ${{ matrix.os }}
2494
strategy:
2595
matrix:
2696
os: [macos-13, macos-14] # runs on Mac with both Intel (macos-13) and Apple Silicon (macos-14) processors
27-
release: [R2025a, R2024b]
97+
release: [R2025a, R2024b, R2024a, R2023b, R2023a, R2022b]
2898
needs: get_version
2999
env:
30100
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"

0 commit comments

Comments
 (0)