|
5 | 5 | push: |
6 | 6 | branches: |
7 | 7 | - main |
| 8 | + - testing |
8 | 9 | env: |
9 | 10 | MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }} |
10 | 11 | jobs: |
|
56 | 57 | uses: matlab-actions/run-tests@v2 |
57 | 58 | with: |
58 | 59 | select-by-folder: opentelemetry-matlab/test |
| 60 | + code-coverage-build-and-run-tests-ubuntu: |
| 61 | + # Running on ubuntu-latest would use a glibc version that is incompatible when using the built mex files on a Debian 11 |
| 62 | + # Instead, run on ubuntu-20.04 |
| 63 | + runs-on: ubuntu-20.04 |
| 64 | + needs: get_version |
| 65 | + env: |
| 66 | + OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install" |
| 67 | + SYSTEM_LIBSTDCPP_PATH: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6" |
| 68 | + steps: |
| 69 | + - name: Download OpenTelemetry-Matlab source |
| 70 | + uses: actions/checkout@v3 |
| 71 | + with: |
| 72 | + path: opentelemetry-matlab |
| 73 | + - name: Install ninja-build |
| 74 | + run: sudo apt-get install ninja-build |
| 75 | + - name: Install MATLAB |
| 76 | + uses: matlab-actions/setup-matlab@v2 |
| 77 | + with: |
| 78 | + products: MATLAB_Compiler MATLAB_Compiler_SDK |
| 79 | + - name: Build OpenTelemetry-Matlab |
| 80 | + working-directory: opentelemetry-matlab |
| 81 | + run: | |
| 82 | + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DWITH_OTLP_GRPC=ON -DUSE_BATCH_FOR_MCC=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 & get coverage |
| 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 | + source-folder: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }} |
| 92 | + code-coverage-cobertura: cobertura.xml |
| 93 | + - name: Upload Codecov |
| 94 | + uses: codecov/codecov-action@v4 |
| 95 | + with: |
| 96 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 97 | + slug: mathworks/OpenTelemetry-Matlab |
| 98 | + file: cobertura.xml |
59 | 99 | build-and-run-tests-windows: |
60 | 100 | runs-on: windows-latest |
61 | 101 | needs: get_version |
|
0 commit comments