-
Notifications
You must be signed in to change notification settings - Fork 5
213 lines (206 loc) · 6.74 KB
/
ci.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# SPDX-FileCopyrightText: 2022-2024 Denis Danilov
# SPDX-License-Identifier: GPL-3.0-only
name: CI
on: [push, pull_request]
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
qt-version: ['6.7.3']
qt-arch: [win64_mingw]
build-type: [Release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install aqt
run: |
pip3 install aqtinstall
- name: install build tools
run: |
O_DIR=$HOME/Qt
echo "O_DIR=$O_DIR" >>$GITHUB_ENV
aqt install-tool windows desktop tools_cmake -O $O_DIR
CMake_BIN=$O_DIR/Tools/CMake_64/bin
echo "CMake_BIN=$CMake_BIN" >>$GITHUB_ENV
aqt install-tool windows desktop tools_ninja -O $O_DIR
Ninja_BIN=$O_DIR/Tools/Ninja
echo "Ninja_BIN=$Ninja_BIN" >>$GITHUB_ENV
- name: install Qt
run: |
aqt install-qt windows desktop ${{ matrix.qt-version }} ${{ matrix.qt-arch }} -m qtmultimedia -O $O_DIR
- name: Qt dir
run: |
Qt6_QMAKE=`find $O_DIR -name "qmake6*"`
Qt6_BINDIR=`dirname $Qt6_QMAKE`
Qt6_DIR=`dirname $Qt6_BINDIR`
QT_PLUGIN_PATH=$Qt6_DIR/plugins
QML2_IMPORT_PATH=$Qt6_DIR/qml
echo "Qt6_DIR=$Qt6_DIR" >>$GITHUB_ENV
echo "Qt6_BINDIR=$Qt6_BINDIR" >>$GITHUB_ENV
echo "QT_PLUGIN_PATH=$QT_PLUGIN_PATH" >>$GITHUB_ENV
echo "QML2_IMPORT_PATH=$QML2_IMPORT_PATH" >>$GITHUB_ENV
- name: install MinGW
run: |
aqt install-tool windows desktop tools_mingw90 -O $O_DIR
MinGW_BIN=$O_DIR/Tools/mingw1120_64/bin
echo "MinGW_BIN=$MinGW_BIN" >>$GITHUB_ENV
- name: configure
run: |
PATH=$MinGW_BIN:$CMake_BIN:$Ninja_BIN:$PATH
BUILD_DIR=build
echo "BUILD_DIR=$BUILD_DIR" >>$GITHUB_ENV
cmake -DWITH_DEPLOY_SCRIPT=ON -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -GNinja -B $BUILD_DIR
- name: build
run: |
PATH=$MinGW_BIN:$CMake_BIN:$Ninja_BIN:$PATH
cmake --build $BUILD_DIR --target package
- name: upload artefacts
uses: actions/upload-artifact@v4
with:
name: windows
path: ${{ env.BUILD_DIR }}/soundscape-*
- name: setup audio
uses: LABSN/sound-ci-helpers@v1
- name: test
run: |
ctest --output-on-failure --test-dir $BUILD_DIR/tests
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: ${{ env.BUILD_DIR }}/soundscape-*
macos:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
qt-version: ['6.7.3']
build-type: [Release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install aqt
run: |
pip3 install aqtinstall
- name: install build tools
run: |
brew install librsvg
- name: install Qt
run: |
O_DIR=$HOME/Qt
echo "O_DIR=$O_DIR" >>$GITHUB_ENV
aqt install-qt mac desktop ${{ matrix.qt-version }} -m qtmultimedia -O $O_DIR
- name: Qt dir
run: |
Qt6_QMAKE=`find $O_DIR -name "qmake6*"`
Qt6_BINDIR=`dirname $Qt6_QMAKE`
Qt6_DIR=`dirname $Qt6_BINDIR`
QT_PLUGIN_PATH=$Qt6_DIR/plugins
QML2_IMPORT_PATH=$Qt6_DIR/qml
echo "Qt6_DIR=$Qt6_DIR" >>$GITHUB_ENV
echo "Qt6_BINDIR=$Qt6_BINDIR" >>$GITHUB_ENV
echo "QT_PLUGIN_PATH=$QT_PLUGIN_PATH" >>$GITHUB_ENV
echo "QML2_IMPORT_PATH=$QML2_IMPORT_PATH" >>$GITHUB_ENV
- name: configure
run: |
BUILD_DIR=build
echo "BUILD_DIR=$BUILD_DIR" >>$GITHUB_ENV
cmake -DWITH_DEPLOY_SCRIPT=ON -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B $BUILD_DIR
- name: build
run: |
cmake --build $BUILD_DIR --target package
- name: upload artefacts
uses: actions/upload-artifact@v4
with:
name: macos
path: ${{ env.BUILD_DIR }}/soundscape-*
- name: test
run: |
ctest --output-on-failure --test-dir $BUILD_DIR/tests
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: ${{ env.BUILD_DIR }}/soundscape-*
linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
qt-version: ['6.7.3']
build-type: [Release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install aqt
run: |
pip3 install aqtinstall
- name: install Qt
run: |
O_DIR=$HOME/Qt
echo "O_DIR=$O_DIR" >>$GITHUB_ENV
aqt install-qt linux desktop ${{ matrix.qt-version }} -m qtmultimedia -O $O_DIR
- name: Qt dir
run: |
Qt6_QMAKE=`find $O_DIR -name "qmake6*"`
Qt6_BINDIR=`dirname $Qt6_QMAKE`
Qt6_DIR=`dirname $Qt6_BINDIR`
QT_PLUGIN_PATH=$Qt6_DIR/plugins
QML2_IMPORT_PATH=$Qt6_DIR/qml
echo "Qt6_DIR=$Qt6_DIR" >>$GITHUB_ENV
echo "Qt6_BINDIR=$Qt6_BINDIR" >>$GITHUB_ENV
echo "QT_PLUGIN_PATH=$QT_PLUGIN_PATH" >>$GITHUB_ENV
echo "QML2_IMPORT_PATH=$QML2_IMPORT_PATH" >>$GITHUB_ENV
- name: build dependencies
run: |
sudo apt-get -qq update
sudo apt-get install --assume-yes libgl1-mesa-dev
sudo apt-get install --assume-yes libpulse0
sudo apt-get install --assume-yes libqt5gui5
sudo apt-get install --assume-yes libxcb-cursor0
sudo apt-get install --assume-yes pulseaudio
sudo apt-get install --assume-yes xvfb
- name: configure
run: |
BUILD_DIR=build
echo "BUILD_DIR=$BUILD_DIR" >>$GITHUB_ENV
cmake -DWITH_DEPLOY_SCRIPT=ON -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B $BUILD_DIR
- name: build
run: |
cmake --build $BUILD_DIR --target package
- name: upload artefacts
uses: actions/upload-artifact@v4
with:
name: linux
path: ${{ env.BUILD_DIR }}/soundscape-*
- name: test
run: |
systemctl --user start pulseaudio
xvfb-run ctest --output-on-failure --test-dir $BUILD_DIR/tests --repeat until-pass:5
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: ${{ env.BUILD_DIR }}/soundscape-*