Skip to content

feat(tools): The ua-cli tool can select endpoints based on SecurityPo… #1590

feat(tools): The ua-cli tool can select endpoints based on SecurityPo…

feat(tools): The ua-cli tool can select endpoints based on SecurityPo… #1590

Workflow file for this run

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