mumble/.github/workflows/build.sh
Robert Adam 472a5f2849 CI(github-actions): Ensure build number tagging
If the actual build is skipped due to a duplicate workflow run, the
build  number script won't run. This can be problematic if this would
have been the only place where the script runs for the given commit as
that'll mean that for this commit no build number will be tagged on our
central server.

Therefore, we now fetch the build number in a separate step that will
not be skipped, if the build itself is skipped.
2023-01-14 14:32:13 +01:00

26 lines
464 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -x
buildDir="${GITHUB_WORKSPACE}/build"
mkdir "$buildDir"
cd "$buildDir"
# Run cmake with all necessary options
cmake -G Ninja \
-S "$GITHUB_WORKSPACE" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DBUILD_NUMBER=$MUMBLE_BUILD_NUMBER \
$CMAKE_OPTIONS \
-DCMAKE_UNITY_BUILD=ON \
-Ddisplay-install-paths=ON \
$ADDITIONAL_CMAKE_OPTIONS \
$VCPKG_CMAKE_OPTIONS
# Actually build
cmake --build . --config $BUILD_TYPE