chore: Verify version of the binary on release (#2365)

This commit is contained in:
Ayaz Salikhov
2025-07-25 16:49:58 +01:00
committed by GitHub
parent ad5f0642ba
commit 0be712c363
3 changed files with 27 additions and 0 deletions

View File

@@ -57,6 +57,12 @@ on:
type: string type: string
default: all default: all
expected_version:
description: Expected version of the clio_server binary
required: false
type: string
default: ""
jobs: jobs:
build: build:
uses: ./.github/workflows/build_impl.yml uses: ./.github/workflows/build_impl.yml

View File

@@ -53,6 +53,12 @@ on:
required: true required: true
type: boolean type: boolean
expected_version:
description: Expected version of the clio_server binary
required: false
type: string
default: ""
secrets: secrets:
CODECOV_TOKEN: CODECOV_TOKEN:
required: false required: false
@@ -183,6 +189,20 @@ jobs:
if: ${{ inputs.code_coverage }} if: ${{ inputs.code_coverage }}
uses: ./.github/actions/code_coverage uses: ./.github/actions/code_coverage
- name: Verify expected version
if: ${{ inputs.expected_version != '' }}
run: |
EXPECTED_VERSION="clio-${{ inputs.expected_version }}"
if [[ ! -f build/clio_server ]]; then
echo "clio_server binary not found"
exit 1
fi
actual_version=$(./build/clio_server --version)
if [[ "$actual_version" != "$EXPECTED_VERSION" ]]; then
echo "Expected version '$EXPECTED_VERSION', but got '$actual_version'"
exit 1
fi
# `codecov/codecov-action` will rerun `gcov` if it's available and build directory is present # `codecov/codecov-action` will rerun `gcov` if it's available and build directory is present
# To prevent this from happening, we run this action in a separate workflow # To prevent this from happening, we run this action in a separate workflow
# #

View File

@@ -42,6 +42,7 @@ jobs:
run_integration_tests: true run_integration_tests: true
upload_clio_server: true upload_clio_server: true
disable_cache: true disable_cache: true
expected_version: ${{ github.event_name == 'push' && github.ref_name || '' }}
release: release:
needs: build-and-test needs: build-and-test