diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d00d8f1..b47fcc6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: jobs: - build-and-run-tests: + build-and-run-tests-ubuntu: runs-on: ubuntu-latest env: OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install" @@ -14,7 +14,9 @@ jobs: with: path: opentelemetry-matlab - name: Install MATLAB - uses: matlab-actions/setup-matlab@v1 + uses: matlab-actions/setup-matlab@v2 + with: + products: MATLAB_Compiler - name: Build OpenTelemetry-Matlab run: | cd opentelemetry-matlab @@ -30,6 +32,58 @@ jobs: # Add the installation directory to the MATLAB Search Path by # setting the MATLABPATH environment variable. MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }} - uses: matlab-actions/run-tests@v1 + uses: matlab-actions/run-tests@v2 + with: + select-by-folder: opentelemetry-matlab/test + build-and-run-tests-windows: + runs-on: windows-latest + env: + OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install" + steps: + - name: Download OpenTelemetry-Matlab source + uses: actions/checkout@v3 + with: + path: opentelemetry-matlab + - name: Install MATLAB + uses: matlab-actions/setup-matlab@v2 + with: + products: MATLAB_Compiler + - name: Build OpenTelemetry-Matlab + run: | + cd opentelemetry-matlab + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }} + cmake --build build --config Release --target install + - name: Run tests + env: + # Add the installation directory to the MATLAB Search Path by + # setting the MATLABPATH environment variable. + MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }} + uses: matlab-actions/run-tests@v2 + with: + select-by-folder: opentelemetry-matlab/test + build-and-run-tests-macos: + runs-on: macos-latest + env: + OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install" + steps: + - name: Download OpenTelemetry-Matlab source + uses: actions/checkout@v3 + with: + path: opentelemetry-matlab + - name: Install MATLAB + uses: matlab-actions/setup-matlab@v2 + with: + products: MATLAB_Compiler + - name: Build OpenTelemetry-Matlab + run: | + cd opentelemetry-matlab + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }} + cmake --build build --config Release --target install + - name: Run tests + env: + # Add the installation directory to the MATLAB Search Path by + # setting the MATLABPATH environment variable. + MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }} + uses: matlab-actions/run-tests@v2 with: select-by-folder: opentelemetry-matlab/test diff --git a/examples/context_propagation/CMakeLists.txt b/examples/context_propagation/CMakeLists.txt index e1f9c6c..48693a5 100644 --- a/examples/context_propagation/CMakeLists.txt +++ b/examples/context_propagation/CMakeLists.txt @@ -20,7 +20,7 @@ set(CONTEXTPROP_EXAMPLE_DEPLOYNAME mymagic) set(CONTEXTPROP_EXAMPLE_MATLAB_SOURCE ${CMAKE_CURRENT_LIST_DIR}/matlab/${CONTEXTPROP_EXAMPLE_DEPLOYNAME}.m) set(CONTEXTPROP_EXAMPLE_ROUTES ../../../examples/context_propagation/matlab/routes.json) #somehow, only relative paths are allowed matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} Matlab_LIST_VERSION) -if(DEFINED Matlab_LIST_VERSION AND ${Matlab_LIST_VERSION} VERSION_GREATER_EQUAL 23.2.0) +if(Matlab_LIST_VERSION VERSION_GREATER_EQUAL 23.2.0) # since MATLAB R2023b, route mapping can be specified at the archive level set(ARCHIVE_ROUTES ",ROUTES:${CONTEXTPROP_EXAMPLE_ROUTES}") else()