diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-10-02 12:26:15 +0200 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2023-10-02 16:36:29 +0200 |
| commit | 8cb79ee6711b3db3f138db6367752053f45efc17 (patch) | |
| tree | 13c8518c421c795294be742d659e9e186b253e95 | |
| parent | 42022bdfd2a00ce3bc7f20b779fecd3b8fad59db (diff) | |
| download | kristall-8cb79ee6711b3db3f138db6367752053f45efc17.tar.gz | |
build.yml: Test CMake builds
| -rw-r--r-- | .github/workflows/build.yml | 22 | ||||
| -rw-r--r-- | CMakeLists.txt | 10 |
2 files changed, 30 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 530c051..f07d96b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index b66d837..b5e1924 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |
