build.yml: Test CMake builds

This commit is contained in:
Xavier Del Campo Romero 2023-10-02 12:26:15 +02:00 committed by Felix Queißner
parent 42022bdfd2
commit 8cb79ee671
2 changed files with 30 additions and 2 deletions

View File

@ -33,7 +33,27 @@ jobs:
- name: make
run: make build/kristall
build_cmake:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: jurplel/install-qt-action@v2
with:
version: "5.12.8"
- name: Install OpenSSL
run: sudo apt install -y libssl-dev
- name: Configure the project
uses: threeal/cmake-action@v1.3.0
with:
build-dir: build
- name: Build the project
run: cmake --build build
# Disabled until both aqinstall and install-qt-action support the fixes…
# build_windows:
# runs-on: windows-latest

View File

@ -7,11 +7,19 @@ if(NOT KRISTALL_VERSION)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT KRISTALL_CMAKE_VERSION)
set(KRISTALL_CMAKE_VERSION "0.0.0")
endif()
execute_process(COMMAND git describe --tags
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE KRISTALL_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT KRISTALL_VERSION)
set(KRISTALL_VERSION "development")
endif()
endif()
# CMake requires the following format for versions:
@ -170,7 +178,7 @@ if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(${PROJECT_NAME})
endif()
find_package(OpenSSL 3.0 REQUIRED)
find_package(OpenSSL 1.1 REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::SSL)
if(NOT UNIX)