6060 required : true
6161 type : boolean
6262
63- expected_version :
64- description : Expected version of the clio_server binary
65- required : false
66- type : string
67- default : " "
68-
6963 package :
7064 description : Whether to generate Debian package
7165 required : false
7266 type : boolean
7367
68+ version :
69+ description : Version of the clio_server binary
70+ required : false
71+ type : string
72+ default : " "
73+
7474 secrets :
7575 CODECOV_TOKEN :
7676 required : false
9393 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9494 with :
9595 fetch-depth : 0
96- # We need to fetch tags to have correct version in the release
97- # The workaround is based on https://github.com/actions/checkout/issues/1467
98- fetch-tags : true
99- ref : ${{ github.ref }}
10096
10197 - name : Prepare runner
10298 uses : XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
@@ -139,6 +135,7 @@ jobs:
139135 static : ${{ inputs.static }}
140136 time_trace : ${{ inputs.analyze_build_time }}
141137 package : ${{ inputs.package }}
138+ version : ${{ inputs.version }}
142139
143140 - name : Build Clio
144141 uses : ./.github/actions/build-clio
@@ -162,7 +159,7 @@ jobs:
162159 - name : Show ccache's statistics and zero it
163160 if : ${{ inputs.download_ccache }}
164161 run : |
165- ccache --show-stats
162+ ccache --show-stats -vv
166163 ccache --zero-stats
167164
168165 - name : Save ccache cache
@@ -218,15 +215,19 @@ jobs:
218215 if : ${{ inputs.code_coverage }}
219216 uses : ./.github/actions/code-coverage
220217
221- - name : Verify expected version
222- if : ${{ inputs.expected_version != '' }}
218+ - name : Verify version is expected
219+ if : ${{ inputs.version != '' }}
223220 env :
224- INPUT_EXPECTED_VERSION : ${{ inputs.expected_version }}
221+ INPUT_VERSION : ${{ inputs.version }}
225222 run : |
226223 set -e
227- EXPECTED_VERSION="clio-${INPUT_EXPECTED_VERSION}"
228- actual_version=$(./build/clio_server --version)
229- if [[ "$actual_version" != "$EXPECTED_VERSION" ]]; then
224+ EXPECTED_VERSION="clio-${INPUT_VERSION}"
225+ if [[ ${{ inputs.build_type }} == "Debug" ]]; then
226+ EXPECTED_VERSION="${EXPECTED_VERSION}+DEBUG"
227+ fi
228+
229+ actual_version=$(./build/clio_server --version | head -n 1)
230+ if [[ "${actual_version}" != "${EXPECTED_VERSION}" ]]; then
230231 echo "Expected version '${EXPECTED_VERSION}', but got '${actual_version}'"
231232 exit 1
232233 fi
0 commit comments