-
Notifications
You must be signed in to change notification settings - Fork 4
140 lines (117 loc) · 4.15 KB
/
main.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
name: GitHub CI
on: [ push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
os-name: windows
qt-version: '5.12'
mingw-short-version: 73
qt5-extra-archives: 'qtwinextras opengl32sw i686'
- os: ubuntu-latest
os-name: linux
qt-version: '5.12'
qt5-extra-archives: 'qtx11extras icu'
- os: ubuntu-latest
os-name: linux
qt-version: '5.15'
qt5-extra-archives: 'qtx11extras icu'
- os: macos-12
os-name: mac
qt-version: '5.12'
qt5-extra-archives: 'qtmacextras'
- os: ubuntu-latest
os-name: linux
qt-version: '6.5'
defaults:
run:
shell: bash
permissions:
contents: read
pull-requests: read
steps:
- name: Configure git
run: |
git config --global core.symlinks true
git config --global core.autocrlf input
cygpath -w /usr/bin >> $GITHUB_PATH || :
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
host: ${{ matrix.os-name }}
modules: ${{ startsWith(matrix.qt-version, '6') && 'qt5compat qtmultimedia qtimageformats' || '' }}
arch: ${{ matrix.mingw-short-version != '' && format('win32_mingw{0}', matrix.mingw-short-version) || '' }}
tools: ${{ matrix.mingw-short-version != '' && format('tools_mingw,qt.tools.win32_mingw{0}0', matrix.mingw-short-version) || '' }}
archives: ${{ startsWith(matrix.qt-version, '5') && format('qttools qtsvg qtbase qttranslations qtmultimedia qtimageformats {0}', matrix.qt5-extra-archives) || '' }}
add-tools-to-path: true
# cache: true
- name: Check available tools
run: |
set -xueo pipefail
echo $PATH
uname -a
qmake --version
make --version
g++ --version
- name: Check translations
run: |
rm aqtinstall.log
lupdate trikCheckApp.pro
gitStatus=$(git status -s && git submodule --quiet foreach --recursive git status -s)
if [ ! -z "$gitStatus" ]
then
echo $gitStatus
echo git status must be clean
git diff
false
else
true
fi
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends bear
- name: Create build dir
run: mkdir -p ../build
- name: QMake
run: qmake ../trik-checkapp/trikCheckApp.pro CONFIG+=release
working-directory: ../build
- name: QMake all
timeout-minutes: 1
run: make -j $(nproc) qmake_all
working-directory: ../build
- name: Make all with bear
timeout-minutes: 10
if: ${{ matrix.os == 'ubuntu-latest' }}
run: bear -- make -j $(nproc) all
working-directory: ../build
- name: Make all
timeout-minutes: 10
if: ${{ matrix.os != 'ubuntu-latest' }}
run: make -j $(nproc) all
working-directory: ../build
- name: Lint
if: ${{ matrix.os == 'ubuntu-latest'}}
uses: cpp-linter/[email protected]
id: linter
with:
style: 'file'
tidy-checks: ''
version: 15
database: '../build'
verbosity: 'info'
- name: Clang-tidy exit
if: ${{ matrix.os == 'ubuntu-latest' && steps.linter.outputs.checks-failed > 0 }}
run: exit 1
- name: Clazy-standalone
if: ${{ matrix.os == 'ubuntu-latest'}}
uses: MinyazevR/[email protected]
with:
checks: 'level0,level1,no-connect-by-name,no-non-pod-global-static'
database: '../build'
install-stable: true