-
Notifications
You must be signed in to change notification settings - Fork 139
135 lines (121 loc) · 4.05 KB
/
build.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
127
128
129
130
131
132
133
134
135
name: C/C++ CI
on:
push:
pull_request:
schedule:
- cron: '0 4 * * 5' # Every Friday at 4am
# Drop permissions to minimum for security
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libgcrypt-dev"
}
- {
name: "Ubuntu_CLANG",
os: ubuntu-22.04,
cc: "clang",
cxx: "clang++",
crypto: "libgcrypt-dev",
configure_args: "--enable-asan"
}
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libgcrypt-dev",
configure_args: "--without-ldap"
}
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libgcrypt-dev",
configure_args: "--enable-debug-build"
}
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libgcrypt-dev",
configure_args: "--enable-asan"
}
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libgcrypt-dev",
configure_args: "--with-crypto-library=gcrypt"
}
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libsodium-dev",
configure_args: "--with-crypto-library=sodium"
}
- {
name: "Ubuntu_GCC",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
crypto: "libssl-dev",
configure_args: "--with-crypto-library=openssl"
}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: installing dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y ansible
sudo apt-get install -y libudev-dev libsodium-dev libqb-dev libcap-ng-dev libseccomp-dev
sudo apt-get install -y libglib2.0-dev libdbus-glib-1-dev libxml2-utils libpolkit-gobject-1-dev xsltproc
sudo apt-get install -y lcov
sudo apt-get install -y aspell aspell-en
sudo apt-get install -y libprotobuf-dev protobuf-compiler
sudo apt-get install -y libldap-dev
sudo apt-get install -y valgrind
sudo apt-get install -y asciidoc docbook-xml docbook-xsl
sudo apt-get install -y umockdev libumockdev-dev
sudo gem install coveralls-lcov
sudo apt-get install -y ${{ matrix.config.cc }}
sudo apt-get install -y ${{ matrix.config.cxx }} || true
sudo apt-get install -y ${{ matrix.config.crypto }}
sudo apt-get install -y astyle
- name: setup environment
run: |
cd src/Tests/LDAP/ansible
ansible-playbook -i ./hosts -u root --connection=local playbook.yml
- name: build
run: |
./autogen.sh
mkdir build && cd build
${{ matrix.config.cc }} --version
${{ matrix.config.cxx }} --version
CC=${{ matrix.config.cc }} CXX=${{ matrix.config.cxx }} ../configure --enable-werror --disable-silent-rules --with-bundled-catch --with-bundled-pegtl --with-ldap --enable-full-test-suite ${{ matrix.config.configure_args }}
make "-j$(nproc)"
- name: install (off-system, for coverage)
run: |-
set -x -o pipefail
make -C build DESTDIR="${PWD}"/ROOT install
find ROOT/ -not -type d | sort | xargs ls -l
rm -Rf find ROOT/ # to not interfere with check-driver.sh
- name: check
run: sudo make -C build check -j1 || { find -name test-suite.log -print -exec cat {} \; ; false ; }
- name: distcheck
run: sudo make -C build distcheck -j1 || { find -name test-suite.log -print -exec cat {} \; ; false ; }