forked from OpenSC/OpenSC
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (80 loc) · 2.86 KB
/
linux-strict.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
---
name: Linux (latest, strict)
on:
pull_request:
paths:
- '**.c'
- '**.h'
- '**.sh'
- .github/workflows/linux.yml
- '**.am'
- doc/**
- configure.ac
push:
permissions:
contents: read # to fetch code (actions/checkout)
# -Wno-incompatible-library-redeclaration -- strlcat and strlcpy compat
# functions make the build fail with
# incompatible redeclaration of library function 'strlcat'
# even if there is no implementation in Linux.
# Worth investigating
# -Wno-strict-prototypes -- is needed for the configure to pass
# otherwise it fails detect dlopen()
# -Wno-variadic-macros -- we are ok using the GNU extension in log.c
# -Wno-gnu-zero-variadic-macro-arguments -- related
# -Wno-incompatible-pointer-types-discards-qualifiers -- again with logging
# -Wno-unused-function -- the inline compat functions for openssl
# are included in files where they are needed and clang does not like it
# -Wformat-pedantic - this complains about missing casts to (void *) which is
# pointles
# -Wno-pedantic -- this complains about void and function pointers casts
# -Wno-incompatible-function-pointer-types -- this looks just buggy as it
# complains about missing const, which is there
env:
CFLAGS: >-
-pedantic -Werror -Wall
-Wno-strict-prototypes -Wno-empty-translation-unit
-Wno-incompatible-library-redeclaration
-Wno-variadic-macros -Wno-unused-function
-Wno-incompatible-pointer-types-discards-qualifiers
-Wno-gnu-zero-variadic-macro-arguments
-Wno-format-pedantic
-Wno-pedantic
-Wno-incompatible-function-pointer-types
BASE_DEPS: |
build-essential docbook-xsl xsltproc gengetopt help2man pcscd check
pcsc-tools libtool make autoconf autoconf-archive automake pkg-config
git xxd openssl valgrind socat gawk
libpcsclite-dev libcmocka-dev libssl-dev zlib1g-dev libreadline-dev softhsm2
jobs:
build-strict:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: [fedora, debian, ubuntu]
compiler: [clang, gcc]
include:
- name: fedora
container: fedora:rawhide
- name: debian
container: debian:sid
- name: ubuntu
container: ubuntu:latest
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- run: .github/setup-linux.sh ${{ matrix.compiler }} force-install
- run: .github/build.sh dist
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ env.CFLAGS }} ${{ matrix.compiler == 'clang' && env.CLANG_CFLAGS || '' }}
- name: Upload test logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.name }}-${{ matrix.compiler }}-strict-test-logs
path: |
config.log
tests/*.log
src/tests/unittests/*.log