Skip to content

Commit

Permalink
refactors release creation workflow, fixes #142, fixes #129
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanpo committed Jul 23, 2024
1 parent d56311f commit b7b0431
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build_and_test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ env:
jobs:
get_version:
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.getversion.outputs.latest_tag }}
steps:
# need fetch-depth:0 to also download the tags
- name: Download OpenTelemetry-Matlab source
Expand Down Expand Up @@ -44,7 +46,7 @@ jobs:
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
run: |
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.getversion.outputs.latest_tag }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
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 }}
cmake --build build --config Release --target install
- name: Run tests
env:
Expand Down Expand Up @@ -75,7 +77,7 @@ jobs:
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DWITH_OTLP_GRPC=ON -DUSE_BATCH_FOR_MCC=ON -DFETCH_VCPKG=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.getversion.outputs.latest_tag }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DWITH_OTLP_GRPC=ON -DUSE_BATCH_FOR_MCC=ON -DFETCH_VCPKG=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake --build build --config Release --target install
- name: Run tests
env:
Expand Down Expand Up @@ -107,7 +109,7 @@ jobs:
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
run: |
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.getversion.outputs.latest_tag }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
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 }}
cmake --build build --config Release --target install
- name: Run tests
env:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/build_and_test_simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ env:
jobs:
get_version:
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.getversion.outputs.latest_tag }}
steps:
# need fetch-depth:0 to also download the tags
- name: Download OpenTelemetry-Matlab source
uses: actions/checkout@v3
with:
path: opentelemetry-matlab
fetch-depth: 0
- name: Debug
shell: bash
working-directory: opentelemetry-matlab
run: echo "$(git describe --tags --abbrev=0)"
- name: Get Version
id: getversion
shell: bash
Expand Down Expand Up @@ -49,7 +47,7 @@ jobs:
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.getversion.outputs.latest_tag }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake --build build --config Release --target install
- name: Run tests
env:
Expand Down Expand Up @@ -80,7 +78,7 @@ jobs:
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DFETCH_VCPKG=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.getversion.outputs.latest_tag }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DFETCH_VCPKG=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake --build build --config Release --target install
- name: Run tests
env:
Expand Down Expand Up @@ -112,7 +110,7 @@ jobs:
- name: Build OpenTelemetry-Matlab
working-directory: opentelemetry-matlab
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.getversion.outputs.latest_tag }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DUSE_BATCH_FOR_MCC=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
cmake --build build --config Release --target install
- name: Run tests
env:
Expand Down

0 comments on commit b7b0431

Please sign in to comment.