forked from qxmpp-project/qxmpp
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (119 loc) · 3.5 KB
/
tests.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
# SPDX-FileCopyrightText: 2020 Jeremy Lainé <jeremy.laine@m4x.org>
#
# SPDX-License-Identifier: CC0-1.0
name: tests
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
container:
image: debian:stable
env:
CONFIG: ${{ matrix.config }}
QT_VERSION: ${{ matrix.qt_version }}
strategy:
fail-fast: false
matrix:
config: [minimal, full, full-debug]
qt_version: ['5.15.*']
include:
- config: minimal
qt_version: 6.1.*
- config: full-debug
qt_version: 6.6.*
steps:
- name: Install sudo
run: apt update && apt install -qq -y sudo
- uses: actions/checkout@v2
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
modules: ${{ (startsWith(matrix.qt_version, '6.') && 'qt5compat') || '' }}
setup-python: true
- name: Install extra packages
run: tests/travis/install-build-depends-debian
- name: Run tests
run: tests/travis/build-and-test
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
macos:
runs-on: macos-latest
env:
CONFIG: ${{ matrix.config }}
QT_VERSION: ${{ matrix.qt_version }}
strategy:
fail-fast: false
matrix:
config: [minimal, full, full-debug]
qt_version: ['5.15.*']
include:
- config: full-debug
qt_version: 6.*.*
steps:
- uses: actions/checkout@v2
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
modules: ${{ matrix.qt_version[0] == '6' && 'qt5compat' || '' }}
setup-python: false
- name: Install extra packages
run: tests/travis/install-build-depends-macos
- name: Disable OS X firewall
run: |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
- name: Run tests
run: tests/travis/build-and-test
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
windows:
runs-on: windows-latest
env:
QT_VERSION: ${{ matrix.qt_version }}
strategy:
fail-fast: false
matrix:
qt_version: ['5.15.*', '6.*.*']
steps:
- uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
- name: Run tests
run: |
${env:PATH} += ";D:/a/qxmpp/qxmpp/src/Debug"
cmake . && cmake --build .
# ctest
# ctest --rerun-failed --output-on-failure
xmllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt update && sudo apt install -y libxml2-utils
- run: xmllint --noout $(find . -type f -name *.xml)
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
version: 15
files-changed-only: false
thread-comments: true
- name: C++ Linter
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the linting checks!"