forked from mesonbuild/meson
-
-
Notifications
You must be signed in to change notification settings - Fork 5
98 lines (85 loc) · 2.66 KB
/
unusedargs_missingreturn.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
name: UnusedMissingReturn
# this workflow checks for
# * unused input arguments
# * missing return values
# * strict prototypes
# some users have default configs that will needlessly fail Meson self-tests due to these syntax.
env:
CFLAGS: "-Werror=unused-parameter -Werror=return-type -Werror=strict-prototypes"
CPPFLAGS: "-Werror=unused-parameter -Werror=return-type"
FFLAGS: "-fimplicit-none"
concurrency:
group: unusedargs-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
paths:
- ".github/workflows/unusedargs_missingreturn.yml"
- "test cases/cmake/**"
- "test cases/common/**"
- "test cases/fortran/**"
- "test cases/linuxlike/**"
- "test cases/objc/**"
- "test cases/objcpp/**"
- "test cases/windows/**"
pull_request:
paths:
- ".github/workflows/unusedargs_missingreturn.yml"
- "test cases/cmake/**"
- "test cases/common/**"
- "test cases/fortran/**"
- "test cases/linuxlike/**"
- "test cases/objc/**"
- "test cases/objcpp/**"
- "test cases/windows/**"
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Compilers
run: |
sudo apt update -yq
sudo apt install -yq --no-install-recommends g++ gfortran ninja-build gobjc gobjc++
python -m pip install coverage
- run: ./tools/run_with_cov.py run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++"
env:
MESON_CI_JOBNAME: linux-ubuntu-gcc-werror
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "UnusedMissingReturn"
fail_ci_if_error: false
verbose: true
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install ninja pefile coverage
- run: python ./tools/run_with_cov.py run_project_tests.py --only platform-windows
env:
CC: gcc
CXX: g++
FC: gfortran
MESON_CI_JOBNAME: msys2-gcc-werror
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "UnusedMissingReturn Windows"
fail_ci_if_error: false
verbose: true