-
Notifications
You must be signed in to change notification settings - Fork 73
99 lines (99 loc) · 3.28 KB
/
checks.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
name: checks
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler:
- { cc: clang }
- { cc: clang, env: "CFLAGS=-flto\nLDFLAGS=-flto" }
# Ubuntu 22.04 ships with GCC 11 as the default version
- { cc: gcc }
- { cc: gcc, env: "CFLAGS=-flto\nLDFLAGS=-flto" }
-
cc: gcc-9
env: |
NO_32BIT_TEST=1
AR=gcc-ar-9
NM=gcc-nm-9
RANLIB=gcc-ranlib-9
-
cc: gcc-10
env: |
NO_32BIT_TEST=1
AR=gcc-ar-10
NM=gcc-nm-10
RANLIB=gcc-ranlib-10
-
cc: gcc-10
env: |
NO_32BIT_TEST=1
AR=gcc-ar-10
NM=gcc-nm-10
RANLIB=gcc-ranlib-10
CFLAGS=-flto
LDFLAGS=-flto
-
cc: gcc-12
env: |
NO_32BIT_TEST=1
AR=gcc-ar-12
NM=gcc-nm-12
RANLIB=gcc-ranlib-12
-
cc: gcc-12
env: |
NO_32BIT_TEST=1
AR=gcc-ar-12
NM=gcc-nm-12
RANLIB=gcc-ranlib-12
CFLAGS=-flto
LDFLAGS=-flto
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y \
pkg-config \
openssl \
cppcheck \
xmlto \
docbook-utils \
gcc-multilib \
${{ matrix.compiler.cc }}
echo "CC=${{ matrix.compiler.cc }}" >> $GITHUB_ENV
echo "${{ matrix.compiler.env }}" >> $GITHUB_ENV
- name: Configure build
run: |
autoreconf -i
./configure \
--prefix=/usr \
--enable-kcapi-hasher \
--enable-kcapi-test \
--enable-kcapi-rngapp \
--enable-kcapi-encapp \
--enable-kcapi-dgstapp \
--enable-lib-asym \
--enable-lib-kpp
- name: Run build
run: make -j$(nproc)
- name: Run install
run: sudo make install
- name: Check installed binaries FIPS self-checks
env:
KCAPI_HASHER_FORCE_FIPS: 1
run: |
rc=0
/usr/bin/kcapi-hasher -n sha512hmac /bin/true || rc=$?
/usr/libexec/libkcapi/sha512hmac /bin/true || rc=$?
/usr/libexec/libkcapi/fipshmac /bin/true || rc=$?
exit $rc
- name: Run cppcheck
run: make cppcheck
- name: Run CLang static analysis
run: make scan
- name: Run tests
run: cd test && bash ./test-invocation.sh