forked from open62541/open62541
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (124 loc) · 6.07 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
name: Linux Build & Test
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
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)"
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 (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.7.2.tar.gz --output libressl.tar.gz
tar -xvz -f libressl.tar.gz
cd libressl-3.7.2
./configure
sudo make install
cmd_action: unit_tests_encryption LIBRESSL
- build_name: "TPM Tool Build"
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 2.4.6
./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.6.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: "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"
cmd_deps: sudo apt-get install -y -qq clang-11 clang-tools-11 libmbedtls-dev mosquitto
cmd_action: build_clang_analyzer
- build_name: "Build All Companion Specifications"
cmd_deps: ""
cmd_action: build_all_companion_specs
name: ${{matrix.build_name}}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y -qq python3-sphinx graphviz check
${{ matrix.cmd_deps }}
- name: ${{matrix.build_name}}
run: source tools/ci.sh && ${{matrix.cmd_action}}
env:
ETHERNET_INTERFACE: eth0