forked from open62541/open62541
-
Notifications
You must be signed in to change notification settings - Fork 0
234 lines (231 loc) · 11.9 KB
/
build_linux.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
name: Linux Build & Test
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
build_name: [
"Debug Build & Unit Tests (gcc)",
"Debug Build & Unit Tests (gcc, 32bit)",
"Debug Build & Unit Tests without Subscriptions (gcc)",
"Debug Build & Unit Tests with Diagnostics (gcc)",
"Debug Build & Unit Tests with multithreading (gcc)",
"Debug Build & Unit Tests with Alarms&Conditions (gcc)",
"Debug Build & Unit Tests (clang-11)",
"Debug Build & Unit Tests (clang-15)",
"Debug Build & Unit Tests (clang-18)",
"Debug Build & Unit Tests (tcc)",
"Encryption (MbedTLS) Build & Unit Tests (gcc)",
"PubSub Encryption (MbedTLS) Build & Unit Tests (gcc)",
"PubSub SKS Build & Unit Tests (gcc)",
"Encryption (OpenSSL) Build & Unit Tests (gcc)",
"Encryption (LibreSSL) Build & Unit Tests (gcc)",
"TPM Tool Build ubuntu-20.04",
"TPM Tool Build ubuntu-22.04",
"TPM Tool Build ubuntu-24.04",
"Release Build",
"Amalgamation Build",
"Amalgamation Build with Multithreading",
"Valgrind Build & Unit Tests with MbedTLS (gcc)",
"Valgrind Build & Unit Tests with OpenSSL (gcc)",
"Valgrind Examples with MbedTLS (gcc)",
"Valgrind Examples with OpenSSL (gcc)",
"Clang Static Analyzer (clang11)",
"Clang Static Analyzer (clang15)",
"Clang Static Analyzer (clang18)",
"Build All Companion Specifications"
]
include:
- build_name: "Debug Build & Unit Tests (gcc)"
cmd_deps: sudo apt-get install -y -qq mosquitto
cmd_action: unit_tests
- build_name: "Debug Build & Unit Tests (gcc, 32bit)"
cmd_deps: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y -qq gcc-multilib libsubunit-dev:i386 check:i386 libxml2-dev:i386
cmd_action: unit_tests_32
- build_name: "Debug Build & Unit Tests without Subscriptions (gcc)"
cmd_deps: ""
cmd_action: unit_tests_nosub
- build_name: "Debug Build & Unit Tests with Diagnostics (gcc)"
cmd_deps: ""
cmd_action: unit_tests_diag
- build_name: "Debug Build & Unit Tests with multithreading (gcc)"
cmd_deps: ""
cmd_action: unit_tests_mt
- build_name: "Debug Build & Unit Tests with Alarms&Conditions (gcc)"
cmd_deps: ""
cmd_action: unit_tests_alarms
- build_name: "Debug Build & Unit Tests (clang-11)"
runs_on: "ubuntu-20.04"
cmd_deps: sudo apt-get install -y -qq clang-11 clang-tools-11 mosquitto
cmd_action: CC=clang-11 CXX=clang++-11 unit_tests
- build_name: "Debug Build & Unit Tests (clang-15)"
runs_on: "ubuntu-22.04"
cmd_deps: sudo apt-get install -y -qq clang-15 clang-tools-15 mosquitto && sudo sysctl -w vm.mmap_rnd_bits=28
cmd_action: CC=clang-15 CXX=clang++-15 unit_tests
- build_name: "Debug Build & Unit Tests (clang-18)"
runs_on: "ubuntu-24.04"
cmd_deps: sudo apt-get install -y -qq clang-18 clang-tools-18 mosquitto && sudo sysctl -w vm.mmap_rnd_bits=28
cmd_action: CC=clang-18 CXX=clang++-18 unit_tests
- build_name: "Debug Build & Unit Tests (tcc)"
cmd_deps: sudo apt-get install -y -qq tcc mosquitto
cmd_action: CC=tcc unit_tests
- build_name: "Encryption (MbedTLS) Build & Unit Tests (gcc)"
cmd_deps: sudo apt-get install -y -qq libmbedtls-dev
cmd_action: unit_tests_encryption MBEDTLS
- build_name: "PubSub Encryption (MbedTLS) Build & Unit Tests (gcc)"
cmd_deps: sudo apt-get install -y -qq libmbedtls-dev
cmd_action: unit_tests_encryption_mbedtls_pubsub
- build_name: "PubSub SKS Build & Unit Tests (gcc)"
cmd_deps: sudo apt-get install -y -qq valgrind libmbedtls-dev
cmd_action: unit_tests_pubsub_sks
- build_name: "Encryption (OpenSSL) Build & Unit Tests (gcc)"
cmd_deps: sudo apt-get install -y -qq openssl
cmd_action: unit_tests_encryption OPENSSL
- build_name: "Encryption (LibreSSL) Build & Unit Tests (gcc)"
cmd_deps: |
sudo apt-get install -y -qq curl
curl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.9.1.tar.gz --output libressl.tar.gz
tar -xvz -f libressl.tar.gz
cd libressl-3.9.1
./configure
sudo make install
cmd_action: unit_tests_encryption LIBRESSL
- build_name: "TPM Tool Build ubuntu-20.04"
runs_on: "ubuntu-20.04"
cmd_deps: |
sudo apt-get install -y -qq acl autoconf autoconf-archive automake build-essential cmake doxygen gcc git iproute2 libcurl4-openssl-dev libjson-c-dev libcmocka0 libcmocka-dev libgcrypt20-dev libglib2.0-dev libini-config-dev libmbedtls-dev libssl-dev libsqlite3-dev libtool libyaml-dev pkg-config procps python3-pip sqlite3 udev uthash-dev
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-tss.git
cd ${HOME}/tpm2-tss
git checkout 3.2.3
./bootstrap && ./configure --with-udevrulesdir=/etc/udev/rules.d --with-udevrulesprefix=70-
make -j$(nproc)
sudo make install
sudo ldconfig
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo apt-get install -y -qq tpm2-tools opensc
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-pkcs11.git
cd ${HOME}/tpm2-pkcs11
git checkout 1.7.0
./bootstrap && ./configure
make -j$(nproc)
sudo make install
sudo ldconfig
sudo cp ${HOME}/tpm2-pkcs11/src/pkcs11.h /usr/include
cd ${HOME}/tpm2-pkcs11/tools/
sudo pip3 install pyasn1_modules
pip3 install .
cmd_action: build_tpm_tool
- build_name: "TPM Tool Build ubuntu-22.04"
runs_on: "ubuntu-22.04"
cmd_deps: |
sudo apt-get install -y -qq acl autoconf autoconf-archive automake build-essential cmake doxygen gcc git iproute2 libcurl4-openssl-dev libjson-c-dev libcmocka0 libcmocka-dev libgcrypt20-dev libglib2.0-dev libini-config-dev libmbedtls-dev libssl-dev libsqlite3-dev libtool libyaml-dev pkg-config procps python3-pip sqlite3 udev uthash-dev
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-tss.git
cd ${HOME}/tpm2-tss
git checkout 3.2.3
./bootstrap && ./configure --with-udevrulesdir=/etc/udev/rules.d --with-udevrulesprefix=70-
make -j$(nproc)
sudo make install
sudo ldconfig
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo apt-get install -y -qq tpm2-tools opensc
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-pkcs11.git
cd ${HOME}/tpm2-pkcs11
git checkout 1.7.0
./bootstrap && ./configure
make -j$(nproc)
sudo make install
sudo ldconfig
sudo cp ${HOME}/tpm2-pkcs11/src/pkcs11.h /usr/include
cd ${HOME}/tpm2-pkcs11/tools/
sudo pip3 install pyasn1_modules
pip3 install .
cmd_action: build_tpm_tool
- build_name: "TPM Tool Build ubuntu-24.04"
runs_on: "ubuntu-24.04"
cmd_deps: |
sudo apt-get install -y -qq acl autoconf autoconf-archive automake build-essential cmake doxygen gcc git iproute2 libcurl4-openssl-dev libjson-c-dev libcmocka0 libcmocka-dev libgcrypt20-dev libglib2.0-dev libini-config-dev libmbedtls-dev libssl-dev libsqlite3-dev libtool libyaml-dev pkg-config procps python3-pip sqlite3 udev uthash-dev libltdl-dev
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-tss.git
cd ${HOME}/tpm2-tss
git checkout 4.1.3
./bootstrap && ./configure --with-udevrulesdir=/etc/udev/rules.d --with-udevrulesprefix=70-
make -j$(nproc)
sudo make install
sudo ldconfig
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo apt-get install -y -qq tpm2-tools python3-tpm2-pytss opensc
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-pkcs11.git
cd ${HOME}/tpm2-pkcs11
git checkout 1.9.1
./bootstrap && ./configure
make -j$(nproc)
sudo make install
sudo ldconfig
sudo cp ${HOME}/tpm2-pkcs11/src/pkcs11.h /usr/include
cd ${HOME}/tpm2-pkcs11/tools/
sudo pip3 install pyasn1_modules
pip3 install .
cmd_action: build_tpm_tool
- build_name: "Release Build"
cmd_deps: sudo apt-get install -y -qq libmbedtls-dev
cmd_action: build_release
- build_name: "Amalgamation Build"
cmd_deps: ""
cmd_action: build_amalgamation
- build_name: "Amalgamation Build with Multithreading"
cmd_deps: ""
cmd_action: build_amalgamation_mt
- build_name: "Valgrind Build & Unit Tests with MbedTLS (gcc)"
cmd_deps: sudo apt-get install -y -qq valgrind libmbedtls-dev mosquitto
cmd_action: unit_tests_valgrind MBEDTLS
- build_name: "Valgrind Build & Unit Tests with OpenSSL (gcc)"
cmd_deps: sudo apt-get install -y -qq valgrind openssl mosquitto
cmd_action: unit_tests_valgrind OPENSSL
- build_name: "Valgrind Examples with MbedTLS (gcc)"
cmd_deps: sudo apt-get install -y -qq valgrind libmbedtls-dev mosquitto
cmd_action: examples_valgrind MBEDTLS
- build_name: "Valgrind Examples with OpenSSL (gcc)"
cmd_deps: sudo apt-get install -y -qq valgrind openssl libmbedtls-dev mosquitto
cmd_action: examples_valgrind OPENSSL
- build_name: "Clang Static Analyzer (clang11)"
runs_on: "ubuntu-20.04"
cmd_deps: sudo apt-get install -y -qq clang-11 clang-tools-11 libmbedtls-dev mosquitto
cmd_action: CC=clang-11 CXX=clang++-11 build_clang_analyzer 11
- build_name: "Clang Static Analyzer (clang15)"
runs_on: "ubuntu-22.04"
cmd_deps: sudo apt-get install -y -qq clang-15 clang-tools-15 libmbedtls-dev mosquitto
cmd_action: CC=clang-15 CXX=clang++-15 build_clang_analyzer 15
- build_name: "Clang Static Analyzer (clang18)"
runs_on: "ubuntu-24.04"
cmd_deps: sudo apt-get install -y -qq clang-18 clang-tools-18 libmbedtls-dev mosquitto
cmd_action: CC=clang-18 CXX=clang++-18 build_clang_analyzer 18
- build_name: "Build All Companion Specifications"
cmd_deps: ""
cmd_action: build_all_companion_specs
name: ${{matrix.os}}-${{matrix.build_name}}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
if: ${{ matrix.runs_on == '' || matrix.runs_on == matrix.os }}
run: |
sudo apt-get update
sudo apt-get install -y -qq python3-sphinx graphviz check
${{ matrix.cmd_deps }}
- name: ${{matrix.build_name}}
if: ${{ matrix.runs_on == '' || matrix.runs_on == matrix.os }}
run: source tools/ci/ci.sh && ${{matrix.cmd_action}}
env:
ETHERNET_INTERFACE: eth0