-
Notifications
You must be signed in to change notification settings - Fork 456
93 lines (81 loc) · 2.46 KB
/
build-linux.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
---
name: Linux Build
# yamllint disable-line rule:truthy
on:
- push
jobs:
build:
name: ${{matrix.buildname}}
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- os: ubuntu-20.04
buildname: Linux-GCC
compiler: g++
coverage: true
compiler_flags: >-
--coverage
-fprofile-arcs
-ftest-coverage
-fprofile-abs-path
compiler_package: g++
with_qt6: false
- os: ubuntu-20.04
buildname: Linux-Clang
compiler: clang++
compiler_package: clang
with_qt6: false
- os: ubuntu-latest
buildname: Qt 6
compiler: g++
compiler_package: g++
with_qt6: true
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 1
- name: Enable ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.os }}
- name: Set up ccache
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Install dependencies
uses: nick-invision/retry@v2
env:
WITH_QT6: '${{matrix.with_qt6}}'
with:
timeout_minutes: 10
retry_wait_seconds: 30
max_attempts: 3
command: >-
'${{github.workspace}}/utils/github/install-linux.sh'
'${{matrix.compiler_package}}'
- name: Build with CMake
uses: lukka/run-cmake@v10
with:
configurePreset: Debug
buildPreset: Debug
configurePresetAdditionalArgs: >-
[
'-DCMAKE_CXX_COMPILER=${{matrix.compiler}}',
'-DCMAKE_CXX_FLAGS=${{matrix.compiler_flags}}',
'-DCMAKE_C_FLAGS=${{matrix.compiler_flags}}',
'-DWITH_QT6=${{matrix.with_qt6}}'
]
- name: Create gnupg directory for tests
run: mkdir -p ~/.gnupg
- name: Run tests
working-directory: '${{runner.workspace}}/install/bin'
run: '${{github.workspace}}/utils/github/test-linux.sh'
- name: Update coverage
if: matrix.coverage
env:
COVERALLS_REPO_TOKEN: '${{secrets.COVERALLS_REPO_TOKEN}}'
run: >-
'${{github.workspace}}/utils/github/coverage-linux.sh'
'${{runner.workspace}}/build'