Skip to content

Commit 8d77e9e

Browse files
committed
Update readme and github workflow to use simplified build instructions
1 parent cfede70 commit 8d77e9e

File tree

2 files changed

+6
-24
lines changed

2 files changed

+6
-24
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@ jobs:
99
OPENTELEMETRY_CPP_INSTALL: "${{ github.workspace }}/otel_cpp_install"
1010
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
1111
OPENTELEMETRY_COLLECTOR_INSTALL: "${{ github.workspace }}/otelcol"
12+
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
1213
SYSTEM_LIBSTDCPP_PATH: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
1314
steps:
1415
- name: Download OpenTelemetry-Matlab source
1516
uses: actions/checkout@v3
1617
with:
1718
path: opentelemetry-matlab
18-
- name: Download OpenTelemetry-cpp source
19-
uses: actions/checkout@v3
20-
with:
21-
repository: open-telemetry/opentelemetry-cpp
22-
path: opentelemetry-cpp
23-
ref: v1.9.0
2419
- name: Download vcpkg
2520
uses: actions/checkout@v3
2621
with:
@@ -38,16 +33,10 @@ jobs:
3833
mkdir otelcol && cd otelcol
3934
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.75.0/otelcol_0.75.0_linux_amd64.tar.gz
4035
tar -xzf otelcol_0.75.0_linux_amd64.tar.gz
41-
- name: Build OpenTelemetry-cpp
42-
run: |
43-
cd opentelemetry-cpp
44-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_STANDARD=20 -DWITH_OTLP=ON -DWITH_OTLP_HTTP=ON -DWITH_OTLP_GRPC=OFF -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_INSTALL=ON -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake
45-
cmake --build build --config Release --target all
46-
cmake --install build --prefix ${{ env.OPENTELEMETRY_CPP_INSTALL }}
4736
- name: Build OpenTelemetry-Matlab
4837
run: |
4938
cd opentelemetry-matlab
50-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }} -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH=${{ env.OPENTELEMETRY_CPP_INSTALL }}/lib/cmake/opentelemetry-cpp
39+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
5140
cmake --build build --config Release --target install
5241
- name: Run tests
5342
env:

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,16 @@ Before proceeding, ensure that the below products are installed:
2727
- protobuf
2828
- zlib
2929

30-
2. Download, build and install [OpenTelemetry C++](https://github.com/open-telemetry/opentelemetry-cpp)
31-
```
32-
cd <opentelemetry-cpp-root>
33-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_STANDARD=20 -DWITH_OTLP_HTTP=ON -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_INSTALL=ON -DCMAKE_TOOLCHAIN_FILE=<vcpkg_root>\scripts\buildsystems\vcpkg.cmake
34-
cmake --build build --config Release --target ALL_BUILD
35-
cmake --install build --prefix <opentelemetry-cpp-installdir>
36-
```
37-
3. Download OpenTelemetry MATLAB
30+
2. Set VCPKG_ROOT environment variable to point to installed location of vcpkg.
3831

39-
4. Build and install OpenTelemetry MATLAB
32+
3. Download, Build and install OpenTelemetry MATLAB
4033
```
4134
cd <opentelemetry-matlab-root>
42-
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<opentelemetry-matlab-installdir> -DCMAKE_TOOLCHAIN_FILE=<vcpkg_root>\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=<path to opentelemetry-cpp-config.cmake>
35+
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<opentelemetry-matlab-installdir>
4336
cmake --build build --config Release --target install
4437
4538
```
46-
5. Download [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases/releases). You can just obtain a pre-built binary for your platform.
39+
4. Download [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases/releases). You can just obtain a pre-built binary for your platform.
4740

4841
## Getting Started
4942
1. Start OpenTelemetry Collector

0 commit comments

Comments
 (0)