-
Notifications
You must be signed in to change notification settings - Fork 181
176 lines (171 loc) · 6.32 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
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: CI build
on: [push]
jobs:
build:
strategy:
fail-fast: false
matrix:
version:
- 5.15.0
platform:
- gcc_64
- android
# - wasm_32
- msvc2019_64
- msvc2019
- winrt_x64_msvc2019
- winrt_x86_msvc2019
- winrt_armv7_msvc2019
# - msvc2017_64
# - msvc2017
- mingw81_64
- mingw81_32
- clang_64
- ios
include:
- platform: gcc_64
os: ubuntu-latest
- platform: android
os: ubuntu-latest
# - platform: wasm_32
# os: ubuntu-latest
# emsdk: sdk-fastcomp-1.39.8-64bit
- platform: msvc2019_64
os: windows-latest
- platform: msvc2019
os: windows-latest
- platform: winrt_x64_msvc2019
os: windows-latest
- platform: winrt_x86_msvc2019
os: windows-latest
- platform: winrt_armv7_msvc2019
os: windows-latest
# - platform: msvc2017_64
# os: windows-latest
# - platform: msvc2017
# os: windows-latest
- platform: mingw81_64
os: windows-latest
- platform: mingw81_32
os: windows-latest
- platform: clang_64
os: macos-latest
- platform: ios
os: macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/setup-python@v1
- uses: mymindstorm/setup-emsdk@v5
if: matrix.platform == 'wasm_32'
with:
version: ${{matrix.emsdk}}
actions-cache-folder: emsdk-cache
- uses: Skycoder42/action-setup-qt@master
id: qt
with:
version: ${{matrix.version}}
platform: ${{matrix.platform}}
packages: qt.tools.ifw.32
- name: build and install qthttpserver
if: steps.cache-qt.outputs.cache-hit != 'true' && matrix.platform != 'wasm_32'
working-directory: src/3rdparty/qthttpserver
run: |
qmake
${{steps.qt.outputs.make}} qmake_all
${{steps.qt.outputs.make}}
${{steps.qt.outputs.make}} install
- name: install packagekit
if: matrix.platform == 'gcc_64'
run: |
sudo apt-get -qq install packagekit
export PKG_CONFIG_PATH=${{steps.qt.outputs.qtdir}}/lib/pkgconfig/:$PKG_CONFIG_PATH
echo "::set-env name=PKG_CONFIG_PATH::$PKG_CONFIG_PATH"
- name: build PackageKit-Qt
if: steps.cache-qt.outputs.cache-hit != 'true' && matrix.platform == 'gcc_64'
run: |
sed -i 's/set(BUILD_SHARED_LIBS ON)/set(BUILD_SHARED_LIBS OFF)/g' CMakeLists.txt
export CMAKE_PREFIX_PATH=${{steps.qt.outputs.qtdir}}:$CMAKE_PREFIX_PATH
mkdir build && cd build
cmake \
"-DCMAKE_INSTALL_PREFIX=$(qmake -query QT_INSTALL_PREFIX)" \
"-DCMAKE_INSTALL_LIBDIR=$(qmake -query QT_INSTALL_LIBS)" \
"-DCMAKE_INSTALL_INCLUDEDIR=$(qmake -query QT_INSTALL_HEADERS)" \
".."
${{steps.qt.outputs.make}}
${{steps.qt.outputs.make}} install
pkg-config --exists packagekitqt5
working-directory: src/3rdparty/PackageKit-Qt
- name: qmake
run: |
qmake CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}} "QT_TOOL_PATH=${{steps.qt.outputs.qtdir}}/Tools"
${{steps.qt.outputs.make}} qmake_all
- name: make module
run: |
${{steps.qt.outputs.make}}
${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install
- name: make tests
if: steps.qt.outputs.tests == 'true' && !contains(matrix.platform, 'mingw')
run: |
${{steps.qt.outputs.make}} all
${{steps.qt.outputs.make}} ${{steps.qt.outputs.testflags}} run-tests
- name: make examples
if: matrix.platform == 'gcc_64'
run: |
${{steps.qt.outputs.make}} sub-examples
cd examples && ${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install
- name: make doc
if: matrix.platform == 'gcc_64'
run: |
${{steps.qt.outputs.make}} doxygen
cd doc && ${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install
- name: upload examples to releases
uses: Skycoder42/action-upload-release@master
if: matrix.platform == 'gcc_64' && startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
directory: ${{steps.qt.outputs.outdir}}
platform: examples
asset_name: qtautoupdater-examples-${{matrix.version}}
tag: ${{github.ref}}
overwrite: true
- name: upload doc to releases
uses: Skycoder42/action-upload-release@master
if: matrix.platform == 'gcc_64' && startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
directory: ${{steps.qt.outputs.outdir}}
platform: doc
asset_name: qtautoupdater-doc-${{matrix.version}}
tag: ${{github.ref}}
overwrite: true
- name: upload module to releases
uses: Skycoder42/action-upload-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
directory: ${{steps.qt.outputs.outdir}}
platform: ${{matrix.platform}}
asset_name: qtautoupdater-${{matrix.platform}}-${{matrix.version}}
tag: ${{github.ref}}
overwrite: true
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
path: source
- uses: actions/setup-python@v1
- uses: Skycoder42/action-deploy-qt@master
with:
token: ${{secrets.GITHUB_TOKEN}}
version: 5.15.0
excludes: wasm_32
host: ${{secrets.SSHFS_HOST}}
key: ${{secrets.SSHFS_KEY}}
port: ${{secrets.SSHFS_PORT}}