mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
CI: Also fetch build number token on GA
GitHub Actions previously did not use the build number token. This is changed by this commit. In order to to so, the build process has been outsourced into its own script.
This commit is contained in:
parent
28e97073cb
commit
26d64edcc5
27
.github/workflows/build.sh
vendored
Executable file
27
.github/workflows/build.sh
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
buildDir="${GITHUB_WORKSPACE}/build"
|
||||
|
||||
mkdir "$buildDir"
|
||||
|
||||
cd "$buildDir"
|
||||
|
||||
VERSION=$("${GITHUB_WORKSPACE}/scripts/mumble-version.py")
|
||||
BUILD_NUMBER=$("${GITHUB_WORKSPACE}/scripts/mumble-build-number.py" --commit "${GITHUB_SHA}" --version "${VERSION}" \
|
||||
--password "${MUMBLE_BUILD_NUMBER_TOKEN}" --default 0)
|
||||
|
||||
# Run cmake with all necessary options
|
||||
cmake -G Ninja \
|
||||
-S "$GITHUB_WORKSPACE" \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DBUILD_NUMBER=$BUILD_NUMBER \
|
||||
$CMAKE_OPTIONS \
|
||||
-DCMAKE_UNITY_BUILD=ON \
|
||||
$ADDITIONAL_CMAKE_OPTIONS \
|
||||
$VCPKG_CMAKE_OPTIONS
|
||||
|
||||
# Actually build
|
||||
cmake --build . --config $BUILD_TYPE
|
||||
|
||||
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@ -50,22 +50,14 @@ jobs:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
|
||||
- name: Create build dir
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
|
||||
- name: Run CMake
|
||||
run: |
|
||||
cmake -G Ninja -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_OPTIONS \
|
||||
-DCMAKE_UNITY_BUILD=ON $ADDITIONAL_CMAKE_OPTIONS $VCPKG_CMAKE_OPTIONS
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
run: ./.github/workflows/build.sh
|
||||
shell: bash
|
||||
env:
|
||||
MUMBLE_BUILD_NUMBER_TOKEN: ${{ secrets.BUILD_NUMBER_TOKEN }}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
shell: bash
|
||||
run: QT_QPA_PLATFORM=offscreen ctest -output-on-failure -C $BUILD_TYPE
|
||||
run: QT_QPA_PLATFORM=offscreen ctest --output-on-failure -C $BUILD_TYPE
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user