add build info to release (#725)
* attempt to add VC_BUILD_NAME * fix * fix * update macos.yml * fix * update macos.yml * update macos.yml * add debug step * update * update * fix release.yml * update cmake * update WindowControl.cpp * update workflows * update release.yml * add --output-always * cleanup
This commit is contained in:
parent
149f418bed
commit
f5868b65f0
7
.github/workflows/appimage.yml
vendored
7
.github/workflows/appimage.yml
vendored
@ -6,6 +6,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev" ]
|
branches: [ "main", "dev" ]
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: 'Build name passed as VC_BUILD_NAME define'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-appimage:
|
build-appimage:
|
||||||
@ -37,7 +42,7 @@ jobs:
|
|||||||
sudo make install
|
sudo make install
|
||||||
cd ../..
|
cd ../..
|
||||||
- name: Configure
|
- 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
|
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 }}"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -t install
|
run: cmake --build build -t install
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|||||||
7
.github/workflows/macos.yml
vendored
7
.github/workflows/macos.yml
vendored
@ -6,6 +6,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev" ]
|
branches: [ "main", "dev" ]
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: 'Build name passed as VC_BUILD_NAME define'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dmg:
|
build-dmg:
|
||||||
@ -21,7 +26,7 @@ jobs:
|
|||||||
brew install glfw3 glew libpng openal-soft luajit libvorbis skypjack/entt/entt googletest glm
|
brew install glfw3 glew libpng openal-soft luajit libvorbis skypjack/entt/entt googletest glm
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_TESTS=ON -DVOXELENGINE_BUILD_APPDIR=1
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_TESTS=ON -DVOXELENGINE_BUILD_APPDIR=1 -DVC_BUILD_NAME="${{ inputs.build_name }}"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -t install
|
run: cmake --build build -t install
|
||||||
|
|||||||
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@ -10,12 +10,27 @@ env:
|
|||||||
RELEASE_VERSION: ${{ github.event.inputs.version || 'testrelease' }}
|
RELEASE_VERSION: ${{ github.event.inputs.version || 'testrelease' }}
|
||||||
BRANCH_NAME: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'main' }}
|
BRANCH_NAME: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'main' }}
|
||||||
jobs:
|
jobs:
|
||||||
|
prepare:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo "exists just for outputs"
|
||||||
|
outputs:
|
||||||
|
build_name: '${{ env.RELEASE_VERSION }}'
|
||||||
build_linux:
|
build_linux:
|
||||||
|
needs: [prepare]
|
||||||
uses: ./.github/workflows/appimage.yml
|
uses: ./.github/workflows/appimage.yml
|
||||||
|
with:
|
||||||
|
build_name: '${{ needs.prepare.outputs.build_name }}'
|
||||||
build_macos:
|
build_macos:
|
||||||
|
needs: [prepare]
|
||||||
uses: ./.github/workflows/macos.yml
|
uses: ./.github/workflows/macos.yml
|
||||||
|
with:
|
||||||
|
build_name: '${{ needs.prepare.outputs.build_name }}'
|
||||||
build_windows:
|
build_windows:
|
||||||
|
needs: [prepare]
|
||||||
uses: ./.github/workflows/windows-clang.yml
|
uses: ./.github/workflows/windows-clang.yml
|
||||||
|
with:
|
||||||
|
build_name: '${{ needs.prepare.outputs.build_name }}'
|
||||||
publish_release:
|
publish_release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build_linux, build_macos, build_windows]
|
needs: [build_linux, build_macos, build_windows]
|
||||||
|
|||||||
7
.github/workflows/windows-clang.yml
vendored
7
.github/workflows/windows-clang.yml
vendored
@ -6,6 +6,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev" ]
|
branches: [ "main", "dev" ]
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: 'Build name passed as VC_BUILD_NAME define'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
@ -48,7 +53,7 @@ jobs:
|
|||||||
export VCPKG_ROOT=$(pwd)/vcpkg
|
export VCPKG_ROOT=$(pwd)/vcpkg
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -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 }}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake ..
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
- name: Package for Windows
|
- name: Package for Windows
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@ -10,6 +10,8 @@ execute_process(COMMAND ${CMAKE_COMMAND} --version)
|
|||||||
option(VOXELENGINE_BUILD_APPDIR "Pack linux build" OFF)
|
option(VOXELENGINE_BUILD_APPDIR "Pack linux build" OFF)
|
||||||
option(VOXELENGINE_BUILD_TESTS "Build tests" OFF)
|
option(VOXELENGINE_BUILD_TESTS "Build tests" OFF)
|
||||||
|
|
||||||
|
add_compile_definitions(VC_BUILD_NAME="${VC_BUILD_NAME}")
|
||||||
|
|
||||||
# Need for static compilation on Windows with MSVC clang TODO: Make single build
|
# Need for static compilation on Windows with MSVC clang TODO: Make single build
|
||||||
# on Windows to avoid dependence on combinations of platforms and compilers and
|
# on Windows to avoid dependence on combinations of platforms and compilers and
|
||||||
# make it independent
|
# make it independent
|
||||||
|
|||||||
@ -37,8 +37,12 @@ WindowControl::Result WindowControl::initialize() {
|
|||||||
title += " - ";
|
title += " - ";
|
||||||
}
|
}
|
||||||
title += "VoxelCore v" +
|
title += "VoxelCore v" +
|
||||||
|
#ifdef VC_BUILD_NAME
|
||||||
|
std::string(VC_BUILD_NAME);
|
||||||
|
#else
|
||||||
std::to_string(ENGINE_VERSION_MAJOR) + "." +
|
std::to_string(ENGINE_VERSION_MAJOR) + "." +
|
||||||
std::to_string(ENGINE_VERSION_MINOR);
|
std::to_string(ENGINE_VERSION_MINOR);
|
||||||
|
#endif
|
||||||
if (ENGINE_DEBUG_BUILD) {
|
if (ENGINE_DEBUG_BUILD) {
|
||||||
title += " [debug]";
|
title += " [debug]";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,10 @@ static void sigterm_handler(int signum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
#ifdef VC_BUILD_NAME
|
||||||
|
logger.info() << "build: " << VC_BUILD_NAME;
|
||||||
|
#endif
|
||||||
|
|
||||||
CoreParameters coreParameters;
|
CoreParameters coreParameters;
|
||||||
try {
|
try {
|
||||||
if (!parse_cmdline(argc, argv, coreParameters)) {
|
if (!parse_cmdline(argc, argv, coreParameters)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user