mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
chore: Verify version of the binary on release (#2365)
This commit is contained in:
6
.github/workflows/build_and_test.yml
vendored
6
.github/workflows/build_and_test.yml
vendored
@@ -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
|
||||||
|
|||||||
20
.github/workflows/build_impl.yml
vendored
20
.github/workflows/build_impl.yml
vendored
@@ -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
|
||||||
#
|
#
|
||||||
|
|||||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user