-
-
Notifications
You must be signed in to change notification settings - Fork 218
111 lines (96 loc) · 2.9 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: "CI: Build Test"
on:
push:
branches-ignore:
- "releases/**"
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
build:
name: Build
strategy:
matrix:
qt_version:
- 5.15.0
- 6.2.4
- 6.5.0
platform:
- ubuntu-20.04
- windows-latest
- macos-latest
include:
- qt_version: 6.2.4
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
- qt_version: 6.5.0
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
- platform: ubuntu-20.04
make: make
CXXFLAGS: -Wall -Wextra -pedantic -Werror
MAKEFLAGS: -j2
- platform: macos-latest
make: make
CXXFLAGS: -Wall -Wextra -pedantic -Werror
MAKEFLAGS: -j3
- platform: windows-latest
make: nmake
CXXFLAGS: /W4 /WX /MP
runs-on: ${{ matrix.platform }}
env:
CXXFLAGS: ${{ matrix.CXXFLAGS }}
MAKEFLAGS: ${{ matrix.MAKEFLAGS }}
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
- name: Build library with CMake
run: |
cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Build basic example with CMake
working-directory: examples/basic/
run: |
cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Build calculator example with CMake
working-directory: examples/calculator/
run: |
cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Build sending_arguments example with CMake
working-directory: examples/sending_arguments/
run: |
cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Build windows_raise_widget example with CMake
working-directory: examples/windows_raise_widget/
run: |
cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Setup MSVC environment for QMake
uses: ilammy/msvc-dev-cmd@v1
- name: Build basic example with QMake
working-directory: examples/basic/
run: |
qmake
${{ matrix.make }}
- name: Build calculator example with QMake
working-directory: examples/calculator/
run: |
qmake
${{ matrix.make }}
- name: Build sending_arguments example with QMake
working-directory: examples/sending_arguments/
run: |
qmake
${{ matrix.make }}
- name: Build windows_raise_widget example with QMake
working-directory: examples/windows_raise_widget/
run: |
qmake
${{ matrix.make }}