-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (83 loc) · 2.99 KB
/
autobuild.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
name: Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
name: "Build and test"
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, windows-2022 ]
qt: [ 6.5.3, 6.6.3 ] # 6.7.1
include:
- os: ubuntu-22.04
qt-host: 'linux'
qt-arch: 'gcc_64'
qt-tools: 'tools_ninja'
cmake-flags: >-
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-14
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-14
-DCMAKE_MAKE_PROGRAM:FILEPATH=$IQTA_TOOLS/Ninja/ninja
-DCPACK_BINARY_STGZ:BOOL=OFF
-DCPACK_BINARY_TGZ:BOOL=ON
-DCPACK_BINARY_TZ:BOOL=OFF
package-ext: '.tar.gz'
- os: ubuntu-22.04
qt: 6.7.1
qt-arch: 'linux_gcc_64'
- os: windows-2022
qt-host: 'windows'
qt-arch: 'win64_mingw'
qt-tools: 'tools_mingw1310 tools_ninja tools_opensslv3_x64'
cmake-flags: >-
-DCMAKE_C_COMPILER:FILEPATH=$env:IQTA_TOOLS/mingw1310_64/bin/gcc.exe
-DCMAKE_CXX_COMPILER:FILEPATH=$env:IQTA_TOOLS/mingw1310_64/bin/g++.exe
-DCMAKE_MAKE_PROGRAM:FILEPATH=$env:IQTA_TOOLS/Ninja/ninja.exe
-DOPENSSL_ROOT_DIR:PATH=$env:IQTA_TOOLS/OpenSSLv3/Win_x64
-DCPACK_BINARY_NSIS:BOOL=OFF
-DCPACK_BINARY_ZIP:BOOL=ON
package-ext: '.zip'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt }}
host: ${{ matrix.qt-host }}
target: 'desktop'
arch: ${{ matrix.qt-arch }}
modules: 'qtcharts qtmultimedia qtserialport'
tools: ${{ matrix.qt-tools }}
cache: true
- name: Set up compiler cache
uses: chocobo1/setup-ccache-action@v1
with:
ccache_options: |
max_size=100M
override_cache_key: ccache-${{ matrix.os }}-${{ matrix.qt }}
update_packager_index: false
windows_compile_environment: msvc
- name: Configure project
run: mkdir build && cd build && cmake -GNinja ${{ matrix.cmake-flags }} ..
- name: Build project
run: cd build && cmake --build . --target all -- -k0
- name: Test project
run: cd build && ctest --rerun-failed --output-on-failure
continue-on-error: true # remove once tests are expected to be stable
env:
QT_QPA_PLATFORM: offscreen
- name: Package project
run: cd build && cmake --build . --target package
- name: Archive packages
uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.os }}-${{ matrix.qt }}
path: build/*${{ matrix.package-ext }}
retention-days: 3