-
Notifications
You must be signed in to change notification settings - Fork 13
176 lines (156 loc) · 5.92 KB
/
debug.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Debug
on: [ push, workflow_dispatch, pull_request, merge_group ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
# Avoid duplicate builds on PR from the same repository
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles",
qt_version: "native",
qt_install_command: "sudo apt-get update && sudo apt-get install qtbase5-dev",
# Apt is significantly faster that aqt.
}
- {
name: "Ubuntu Latest GCC + Qt6",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles",
qt_version: "6.2.1"
}
- {
name: "macOS AMD64 Clang",
os: macos-13,
build_type: "Debug",
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles",
qt_version: "5.15.2",
# Cached aqt is faster that brew.
}
- {
name: "macOS ARM Clang + Qt6",
os: macos-latest,
build_type: "Debug",
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles",
qt_version: "6.6.3",
# Cached aqt is faster that brew.
}
- {
name: "Windows 2019 MinGW",
os: windows-2019,
build_type: "Debug",
cc: "gcc", cxx: "g++", build_system: "MinGW Makefiles",
# Older Qt releases do not have 64bit mingw release
qt_version: "5.12.9", qt_arch: "win64_mingw73"
}
steps:
- uses: actions/checkout@v4
- name: Cache Qt
# Cache only when not installed by os package manager
if: matrix.config.qt_version != 'native'
id: cache-qt
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-${{ matrix.config.qt_version }}-Qt
- name: Install specified Qt version
if: matrix.config.qt_version != 'native'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.config.qt_version }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
arch: ${{ matrix.config.qt_arch }}
dir: ${{ github.workspace }}/Qt
- name: Install native Qt by package manager
if: matrix.config.qt_version == 'native'
run: ${{ matrix.config.qt_install_command }}
- name: Create Build Environment
run: cmake -E make_directory ${{ github.workspace }}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: "cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
-DCMAKE_C_COMPILER=${{ matrix.config.cc }}
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }}
-DFORCE_COLORED_OUTPUT=true
-G \"${{ matrix.config.build_system }}\""
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j3
- name: Test
working-directory: ${{ github.workspace }}/build
shell: bash
run: ctest --output-on-failure --verbose
- name: Store created artifacts
uses: actions/upload-artifact@v4
with:
name: target-${{ runner.os }}-qt${{ matrix.config.qt_version }}
path: ${{ github.workspace }}/build/target
build-emscripten:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
config:
- {
name: "WASM Linux",
os: ubuntu-latest,
build_type: Release,
qt_arch: wasm_32,
emsdk_version: 1.39.8,
qt_version: 5.15.2,
}
steps:
- uses: actions/checkout@v4
- name: Cache Qt
id: cache-qt
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-${{ matrix.config.qt_version }}-wasm-Qt
- name: Setup EMSDK cache
id: cache-system-libraries
uses: actions/cache@v4
with:
path: 'emsdk-cache'
key: ${{ runner.os }}-${{ matrix.config.emsdk_version }}-${{ matrix.config.qt_version }}-emsdk
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v11
with:
version: ${{ matrix.config.emsdk_version }}
actions-cache-folder: 'emsdk-cache'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.config.qt_version }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
arch: ${{ matrix.config.qt_arch }}
dir: ${{ github.workspace }}/Qt
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: "emcmake cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
-DCMAKE_PREFIX_PATH=$Qt5_DIR
-DCMAKE_FIND_ROOT_PATH=$Qt5_DIR
-DFORCE_COLORED_OUTPUT=true
-Wno-dev"
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j3
- name: Store created artifacts
uses: actions/upload-artifact@v4
with:
name: target-wasm-${{ runner.os }}-qt${{ matrix.config.qt_version }}
path: ${{ github.workspace }}/build/target