pass patch number to the engine

This commit is contained in:
MihailRis 2026-11-01 17:30:34 +03:00
parent e370ec6495
commit 3e22dd6329
7 changed files with 48 additions and 7 deletions

View file

@ -11,6 +11,11 @@ on:
required: true
type: string
description: 'Build name passed as VC_BUILD_NAME define'
version_patch:
required: false
type: string
default: ''
description: 'Engine version patch number passed as VC_VERSION_PATCH define'
jobs:
build-appimage:
@ -36,7 +41,7 @@ jobs:
sudo ln -s /usr/lib/x86_64-linux-gnu/libluajit-5.1.a /usr/lib/x86_64-linux-gnu/liblua5.1.a
sudo ln -s /usr/include/luajit-2.1 /usr/include/lua
- name: Configure
run: cmake -S . -B build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_APPDIR=1 -DVOXELENGINE_BUILD_TESTS=ON -DVC_BUILD_NAME="${{ inputs.build_name }}"
run: cmake -S . -B build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_APPDIR=1 -DVOXELENGINE_BUILD_TESTS=ON -DVC_BUILD_NAME="${{ inputs.build_name }}" -DVC_VERSION_PATCH="${{ inputs.version_patch }}"
- name: Build
run: cmake --build build -t install
- name: Run tests

View file

@ -11,6 +11,11 @@ on:
required: true
type: string
description: 'Build name passed as VC_BUILD_NAME define'
version_patch:
required: false
type: string
default: ''
description: 'Engine version patch number passed as VC_VERSION_PATCH define'
jobs:
build-dmg:
@ -29,7 +34,7 @@ jobs:
run: |
cmake -DOPENAL_INCLUDE_DIR=$(brew --prefix openal-soft)/include \
-DOPENAL_LIBRARY=$(brew --prefix openal-soft)/lib/libopenal.dylib \
-S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOXELENGINE_BUILD_TESTS=ON -DVOXELENGINE_BUILD_APPDIR=1 -DVC_BUILD_NAME="${{ inputs.build_name }}"
-S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOXELENGINE_BUILD_TESTS=ON -DVOXELENGINE_BUILD_APPDIR=1 -DVC_BUILD_NAME="${{ inputs.build_name }}" -DVC_VERSION_PATCH="${{ inputs.version_patch }}"
- name: Build
run: |

View file

@ -13,24 +13,32 @@ jobs:
prepare:
runs-on: ubuntu-latest
steps:
- run: echo "exists just for outputs"
- id: version
run: |
if [[ "$RELEASE_VERSION" =~ ^[0-9]+\.[0-9]+\.([0-9]+) ]]; then
echo "patch=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
fi
outputs:
build_name: '${{ env.RELEASE_VERSION }}'
version_patch: '${{ steps.version.outputs.patch }}'
build_linux:
needs: [prepare]
uses: ./.github/workflows/appimage.yml
with:
build_name: '${{ needs.prepare.outputs.build_name }}'
version_patch: '${{ needs.prepare.outputs.version_patch }}'
build_macos:
needs: [prepare]
uses: ./.github/workflows/macos.yml
with:
build_name: '${{ needs.prepare.outputs.build_name }}'
version_patch: '${{ needs.prepare.outputs.version_patch }}'
build_windows:
needs: [prepare]
uses: ./.github/workflows/windows-clang.yml
with:
build_name: '${{ needs.prepare.outputs.build_name }}'
version_patch: '${{ needs.prepare.outputs.version_patch }}'
publish_release:
runs-on: ubuntu-latest
needs: [build_linux, build_macos, build_windows]

View file

@ -11,6 +11,11 @@ on:
required: true
type: string
description: 'Build name passed as VC_BUILD_NAME define'
version_patch:
required: false
type: string
default: ''
description: 'Engine version patch number passed as VC_VERSION_PATCH define'
jobs:
build-windows:
@ -53,7 +58,7 @@ jobs:
export VCPKG_ROOT=$(pwd)/vcpkg
mkdir build
cd build
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVC_BUILD_NAME="${{ inputs.build_name }}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVC_BUILD_NAME="${{ inputs.build_name }}" -DVC_VERSION_PATCH="${{ inputs.version_patch }}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake --build . --config Release
- name: Package for Windows
run: |