-
Notifications
You must be signed in to change notification settings - Fork 164
71 lines (61 loc) · 1.91 KB
/
build.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
name: Build
on:
push:
branches-ignore:
- "releases/**"
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
build:
strategy:
matrix:
qt_version: [5.12.12, 5.15.2, 6.2.2]
platform: [ubuntu-20.04, windows-latest, macos-latest]
include:
- qt_version: 6.2.2
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 -Wno-gnu-zero-variadic-macro-arguments # Ignore false-positive warning for qCWarning
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/[email protected]
- name: Install Qt
uses: jurplel/[email protected]
with:
version: ${{ matrix.qt_version }}
- name: Build with CMake as static
run: |
cmake . -D QHOTKEY_EXAMPLES=ON ${{ matrix.additional_arguments }}
cmake --build .
- name: Build with CMake as shared
run: |
cmake . -D BUILD_SHARED_LIBS=ON -D QHOTKEY_EXAMPLES=ON ${{ matrix.additional_arguments }}
cmake --build .
- name: Setup MSVC environment for QMake
uses: ilammy/msvc-dev-cmd@v1
- name: Build with QMake as static
working-directory: HotkeyTest
run: |
qmake
${{ matrix.make }}
- name: Build with QMake as shared
working-directory: HotkeyTest
run: |
qmake "DEFINES+=QHOTKEY_SHARED QHOTKEY_LIBRARY"
${{ matrix.make }}