Skip to content

package into mltbx file #202

package into mltbx file

package into mltbx file #202

Workflow file for this run

name: "OpenTelemetry-Matlab"
on:
workflow_dispatch:
push:
jobs:
build-and-run-tests-ubuntu:
runs-on: ubuntu-latest
env:
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
SYSTEM_LIBSTDCPP_PATH: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
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:
# The version of libstdc++ that is bundled with MATLAB is used when building MEX files.
# This version of libstdc++ is incompatible with the system version of libstdc++.
# As a workaround, set LD_PRELOAD to use the system version of libstdc++ with MATLAB.
LD_PRELOAD: ${{ env.SYSTEM_LIBSTDCPP_PATH }}
# 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
- name: Compress into single artifact
run: tar -czf otel-matlab-ubuntu.tar.gz ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: otel-matlab-ubuntu.tar.gz
path: otel-matlab-ubuntu.tar.gz
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
- name: Compress into single artifact
run: tar -czf otel-matlab-windows.tar.gz ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: otel-matlab-windows.tar.gz
path: otel-matlab-windows.tar.gz
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
- name: Compress into single artifact
run: tar -czf otel-matlab-macos.tar.gz ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: otel-matlab-macos.tar.gz
path: otel-matlab-macos.tar.gz
package-mltbx:
name: Package MATLAB Toolbox (MLTBX) Files
runs-on: ubuntu-latest
needs:
- build-and-run-tests-ubuntu
- build-and-run-tests-windows
- build-and-run-tests-macos
env:
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
steps:
- name: Checkout OpenTelemetry-Matlab
uses: actions/checkout@v4
with:
path: OpenTelemetry-Matlab
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts-downloaded
- name: Decompress Artifacts
run: |
mv artifacts-downloaded/*/*.tar.gz .
tar -xzf otel-matlab-ubuntu.tar.gz
tar -xzf otel-matlab-macos.tar.gz
tar -xzf otel-matlab-windows.tar.gz
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2023a
- name: Run commands
env:
MATLABPATH: OpenTelemetry-Matlab/tools
OTEL_MATLAB_TOOLBOX_FOLDER: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
OTEL_MATLAB_TOOLBOX_OUTPUT_FOLDER:
OTEL_MATLAB_TOOLBOX_VERSION: 1.6.0
uses: matlab-actions/run-command@v1
with:
command: packageMatlabInterface
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: otel-matlab.mltbx
path: otel-matlab.mltbx