Skip to content

debug

debug #7

name: "Test packaging"
on:
push:
branches:
- 'missing_symlinks'
jobs:
build-ubuntu:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
OPENTELEMETRY_MATLAB_INSTALL_FOLDER: "otel_matlab_install" # not including the context github.workspace since it doesn't work inside a container due to a bug
steps:
- name: Download OpenTelemetry-Matlab source
uses: actions/checkout@v3
with:
path: opentelemetry-matlab
- name: Install compiler and other tools
env:
DEBIAN_FRONTEND: "noninteractive"
run: apt update && apt install -y build-essential git curl pkg-config zip python3 ninja-build
- name: Install CMake
env:
MY_CMAKE_VERSION: 4.1.2
run: |
curl -LO https://github.com/Kitware/CMake/releases/download/v$MY_CMAKE_VERSION/cmake-$MY_CMAKE_VERSION-linux-x86_64.tar.gz
tar -xvzf cmake-$MY_CMAKE_VERSION-linux-x86_64.tar.gz
echo "$GITHUB_WORKSPACE/cmake-$MY_CMAKE_VERSION-linux-x86_64/bin" >> "$GITHUB_PATH"
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2025a
products: MATLAB_Compiler
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
run: |
mkdir ../otel_matlab_install
touch ../otel_matlab_install/one.txt
- name: Compress into single artifact
run: tar -czf otel-matlab-ubuntu.tar.gz otel_matlab_install
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: otel-matlab-ubuntu.tar.gz
path: ./otel-matlab-ubuntu.tar.gz
build-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 ninja-build
run: choco install ninja
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2025a
products: MATLAB_Compiler
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
shell: cmd
run: |
mkdir ..\otel_matlab_install
type nul > ..\otel_matlab_install\two.txt
- name: Compress into single artifact
working-directory: ${{ github.workspace }}
run: tar -czf otel-matlab-windows.tar.gz otel_matlab_install
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: otel-matlab-windows.tar.gz
path: ${{ github.workspace }}/otel-matlab-windows.tar.gz
build-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14] # runs on Mac with both Intel (macos-13) and Apple Silicon (macos-14) processors
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 ninja-build
run: brew install ninja
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2025a
products: MATLAB_Compiler
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5 # required by upb because its cmake requirement is not compatible with cmake 4
run: |
mkdir ../otel_matlab_install
touch ../otel_matlab_install/three_${{ matrix.os }}
- name: Compress into single artifact
working-directory: ${{ github.workspace }}
run: tar -czf otel-matlab-${{ matrix.os }}.tar.gz otel_matlab_install
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: otel-matlab-${{ matrix.os }}.tar.gz
path: ${{ github.workspace }}/otel-matlab-${{ matrix.os }}.tar.gz
package-mltbx:
name: Package MATLAB Toolbox (MLTBX) Files
runs-on: windows-latest
permissions:
contents: write
needs:
- build-ubuntu
- build-windows
- build-macos
env:
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
WITHGRPC_FOLDER: "${{ github.workspace }}/withgrpc"
NOGRPC_FOLDER: "${{ github.workspace }}/nogrpc"
steps:
- name: Checkout OpenTelemetry-Matlab
uses: actions/checkout@v3
with:
path: OpenTelemetry-Matlab
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts-downloaded
- name: Decompress Artifacts
shell: cmd
run: |
mkdir ${{ env.WITHGRPC_FOLDER }}
echo "one"
cd ${{ env.WITHGRPC_FOLDER }}
echo "two"
move ../artifacts-downloaded/*/otel-matlab-ubuntu.tar.gz .
echo "three"
move ../artifacts-downloaded/*/otel-matlab-macos*.tar.gz .
echo "four"
move ../artifacts-downloaded/*/otel-matlab-windows.tar.gz .
echo "five"
tar -xzvf otel-matlab-ubuntu.tar.gz
echo "six"
tar -xzvf otel-matlab-macos-13.tar.gz
echo "seven"
tar -xzvf otel-matlab-macos-14.tar.gz
echo "eight"
tar -xzvf otel-matlab-windows.tar.gz
echo "nine"
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2025a
- name: Package Toolbox
env:
MATLABPATH: OpenTelemetry-Matlab/tools
WORKING_FOLDER: ${{ env.WITHGRPC_FOLDER }}
OTEL_MATLAB_TOOLBOX_FOLDER: otel_matlab_install
OTEL_MATLAB_TOOLBOX_OUTPUT_FOLDER: ${{ env.WITHGRPC_FOLDER }}
OTEL_MATLAB_TOOLBOX_VERSION: ${{ github.ref_name }}
OTEL_MATLAB_TOOLBOX_NAME: otel-matlab
uses: matlab-actions/run-command@v1
with:
command: packageMatlabInterface
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: otel-matlab.mltbx.tar.gz
path: ${{ github.workspace }}/otel-matlab.mltbx