Skip to content

Commit 2a498fa

Browse files
committed
add a new workflow to experiment with building in a container
1 parent dfd352e commit 2a498fa

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Experiment with building in a Linux container"
2+
on:
3+
push:
4+
tags:
5+
- '[0-9]+.[0-9]+.[0-9]+'
6+
jobs:
7+
build-ubuntu:
8+
runs-on: ubuntu-22.04
9+
container:
10+
image: ubuntu:20.04
11+
env:
12+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
13+
steps:
14+
- name: Download OpenTelemetry-Matlab source
15+
uses: actions/checkout@v3
16+
with:
17+
path: opentelemetry-matlab
18+
- name: Install compiler and cmake
19+
run: sudo apt install -y build-essential cmake
20+
- name: Install ninja-build
21+
run: sudo apt-get install ninja-build
22+
- name: Install MATLAB
23+
uses: matlab-actions/setup-matlab@v2
24+
with:
25+
release: R2025a
26+
products: MATLAB_Compiler
27+
- name: Build OpenTelemetry-Matlab
28+
working-directory: opentelemetry-matlab
29+
run: |
30+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_OTLP_GRPC=ON -DWITH_OTLP_FILE=ON -DOTEL_MATLAB_VERSION=${{ github.ref_name }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
31+
cmake --build build --config Release --target install
32+
- name: Compress into single artifact
33+
working-directory: ${{ github.workspace }}
34+
run: tar -czf otel-matlab-ubuntu.tar.gz otel_matlab_install
35+
- name: Upload artifacts
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: otel-matlab-ubuntu.tar.gz
39+
path: ${{ github.workspace }}/otel-matlab-ubuntu.tar.gz

0 commit comments

Comments
 (0)