aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2020-10-27 20:26:05 +0100
committerGitHub <noreply@github.com>2020-10-27 20:26:05 +0100
commit3dd0c6dfbd4c828fc022501078fbc0b6d1473957 (patch)
tree3e6203b6232fcca6dc3090cc2ec5bcccc9cba900
parentMerge pull request #118 from Shatur95/improve-qt6-support (diff)
parentEnable checks for warnings (diff)
downloadsingleapplication-3dd0c6dfbd4c828fc022501078fbc0b6d1473957.tar.xz
Merge pull request #120 from Shatur95/master
Add Qt6 CI builds
-rw-r--r--.github/workflows/build-cmake.yml21
-rw-r--r--examples/basic/CMakeLists.txt3
-rw-r--r--examples/calculator/CMakeLists.txt5
-rw-r--r--examples/sending_arguments/CMakeLists.txt5
4 files changed, 23 insertions, 11 deletions
diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml
index 82a432c..0fd3f51 100644
--- a/.github/workflows/build-cmake.yml
+++ b/.github/workflows/build-cmake.yml
@@ -7,10 +7,21 @@ jobs:
strategy:
matrix:
- qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0]
+ qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0, 6.0.0]
platform: [ubuntu-latest, windows-latest, macos-latest]
+ include:
+ - qt_version: 6.0.0
+ additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
+ - platform: ubuntu-latest
+ CXXFLAGS: -Wall -Wextra -pedantic -Werror
+ - platform: macos-latest
+ CXXFLAGS: -Wall -Wextra -pedantic -Werror
+ - platform: windows-latest
+ CXXFLAGS: /W4 /WX
runs-on: ${{ matrix.platform }}
+ env:
+ CXXFLAGS: ${{ matrix.CXXFLAGS }}
steps:
- uses: actions/checkout@v2
@@ -21,7 +32,7 @@ jobs:
version: ${{ matrix.qt_version }}
- name: cmake
- run: cmake .
+ run: cmake . ${{ matrix.additional_arguments }}
- name: cmake build
run: cmake --build .
@@ -29,17 +40,17 @@ jobs:
- name: Build example - basic (cmake)
working-directory: examples/basic/
run: |
- cmake .
+ cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Build example - calculator (cmake)
working-directory: examples/calculator/
run: |
- cmake .
+ cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Build example - sending_arguments (cmake)
working-directory: examples/sending_arguments/
run: |
- cmake .
+ cmake . ${{ matrix.additional_arguments }}
cmake --build .
diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt
index 49be29c..c142923 100644
--- a/examples/basic/CMakeLists.txt
+++ b/examples/basic/CMakeLists.txt
@@ -4,10 +4,9 @@ project(basic LANGUAGES CXX)
# SingleApplication base class
set(QAPPLICATION_CLASS QCoreApplication)
+add_subdirectory(../.. SingleApplication)
add_executable(basic main.cpp)
-find_package(Qt5 COMPONENTS Core REQUIRED)
-add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
diff --git a/examples/calculator/CMakeLists.txt b/examples/calculator/CMakeLists.txt
index 990bff5..82305f0 100644
--- a/examples/calculator/CMakeLists.txt
+++ b/examples/calculator/CMakeLists.txt
@@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)
# SingleApplication base class
set(QAPPLICATION_CLASS QApplication)
+add_subdirectory(../.. SingleApplication)
+
+find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)
add_executable(${PROJECT_NAME}
button.h
@@ -15,6 +18,4 @@ add_executable(${PROJECT_NAME}
main.cpp
)
-find_package(Qt5 COMPONENTS Widgets REQUIRED)
-add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
diff --git a/examples/sending_arguments/CMakeLists.txt b/examples/sending_arguments/CMakeLists.txt
index 06c740f..2cc5597 100644
--- a/examples/sending_arguments/CMakeLists.txt
+++ b/examples/sending_arguments/CMakeLists.txt
@@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)
# SingleApplication base class
set(QAPPLICATION_CLASS QCoreApplication)
+add_subdirectory(../.. SingleApplication)
+
+find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)
add_executable(${PROJECT_NAME}
main.cpp
@@ -14,6 +17,4 @@ add_executable(${PROJECT_NAME}
main.cpp
)
-find_package(Qt5 COMPONENTS Core REQUIRED)
-add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)